When can 'hasys -nodeid' fail?
- 10 years ago
“hasys –nodeid”
What scenario can this command fail?
“hasys –nodeid” is purely a read operation. VCS accepts this command in all states(viz. LOCAL_BUILD, REMOTE_BUILD, RUNNING, LEAVING, EXITING, EXITING_FORCIBLY, etc.). In fact, this command is honored in ADMIN_WAIT state too. If HAD is running, this command is successful. Only if HAD isn’t running, this command will fail.
Behavior/usage of “hasys –nodeid”
hasys -nodeid [<nodeid>]
As mentioned earlier, “hasys –nodeid” is purely a read operation. It doesn’t set anything. nodeid is optional parameter, if specified, command displays corresponding node name. If nodeid not specified, details of local node is displayed.There must have been some discrepancy in older releases’ man pages, which has been rectified in 6.1 release’s man pages.
E.g. In a 2 node cluster, node ID and node name are as follows:
#System Attribute Value
vcslx545-vm1 SysState RUNNING
vcslx545-vm2 SysState RUNNING
# cat /etc/llthosts
0 vcslx545-vm1
1 vcslx545-vm2Commands executed from Node 1 i.e. vcslx545-vm1
[root@vcslx545-vm1 ~]# hasys -nodeid <--- nodeid not specified. Local nodes’ detail displayed.
VCS INFO V-16-1-10753 Node name: vcslx545-vm1 Node ID: 0[root@vcslx545-vm1 ~]# hasys -nodeid 1 <---nodeid specified. Corresponding node displayed.
VCS INFO V-16-1-10753 Node name: vcslx545-vm2 Node ID: 1Commands executed from Node 2 i.e. vcslx545-vm2
[root@vcslx545-vm2 ~]# hasys -nodeid
VCS INFO V-16-1-10753 Node name: vcslx545-vm2 Node ID: 1[root@vcslx545-vm2 ~]# hasys -nodeid 0
VCS INFO V-16-1-10753 Node name: vcslx545-vm1 Node ID: 0[root@vcslx545-vm2 ~]# hasys -nodeid 3 <---Out of clusters’ range OR invalid node id specified.
VCS INFO V-16-1-10754 Node ID: 3 does not exist in cluster configuration.
Thanks & Regards,
Sunil Y