clmprint returns 0 for the error case
root@SC-1:~# clmprint -n 0x3060f
node_id:198159(3060f)
error - clmprint:: saClmClusterNodeGet_4 failed, rc = 12
root@SC-1:~# echo $?
clmprint does not handle invalid inputs
clmprint -b -m -a -n
node_id:4294967295(ffffffff)
node_id:4294967295(ffffffff)
...
clmprint is not able to print non-member node information
root@SC-1:~# clm-adm -o lock safNode=PL-5,safCluster=myClmCluster
root@SC-1:~# clm-state safNode=PL-5,safCluster=myClmCluster
safNode=PL-5,safCluster=myClmCluster
saClmNodeAdminState=LOCKED(2)
saClmNodeIsMember=NON_MEMBER(0)
saClmNodeID=132367(0x2050f)
root@SC-1:~# clmprint -n 0x2050f
node_id:132367(2050f)
error - clmprint:: saClmClusterNodeGet_4 failed, rc = 31
Here are major changes in this ticket.
// printout when input wrong data format for timeout option
$ clmprint -n 0x2020f -t 11safasd
error - input wrong data format!
// printout when querying non-member node information from a member node
$ clmprint -n 0x3060f
Node id 0x3060f is not in cluster membership
// printout when inputing multiple options
$ clmprint -b -m -a -n
error - multiple options!
// printout when passing duplicated option
$ clmprint -n 0x2030f -n 0x2030f
error - duplicated option!
// printout when invoking clmprint from non-member node
$clmprint -n 0x2030f
error - invoking clmprint from non-member node
Last edit: Vu Minh Nguyen 2017-10-24
commit e070300a38f0f564c8c8493f112c68c442c6528c (HEAD, origin/develop, ticket-2651, develop)
Author: Vu Minh Nguyen vu.m.nguyen@dektech.com.au
Date: Wed Oct 25 10:57:17 2017 +0700
When querying non-member node, should return error (EXIT_FAILURE) instead of ok (EXIT_SUCCESS). Re-open the ticket to fix this.
commit 8bc5c1badd2934caa9de550bc03421faf9e2a6af (HEAD, origin/develop, develop)
Author: Vu Minh Nguyen vu.m.nguyen@dektech.com.au
Date: Wed Nov 15 09:54:57 2017 +0700
commit 4582b9355e12f7ca8e13d6b431d28b26e12f7a46 (HEAD, origin/release, release)
Author: Vu Minh Nguyen vu.m.nguyen@dektech.com.au
Date: Wed Nov 15 09:54:57 2017 +0700