Forum Discussion

ClusterUser's avatar
10 years ago

When can 'hasys -nodeid' fail?

Dear All,

We are running VCS Engine version 6.1.0.000 and need to use 'hasys -nodeid'  to  get info about the node.

So in what scenario can this command fail  ?

Also in VCS  6.1 . , the man page info for this command states that it will display the nodeid  value for the corresponding system if the nodeid is  supplied whereas in older versions it states that it will set the supplied nodeid .

Can anyone confirm the behaviour when the nodeid is supplied as well  please ?

Thanks in advance.

 

  • “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-vm2 

     

    Commands 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: 1

     

    Commands 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

1 Reply

  • “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-vm2 

     

    Commands 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: 1

     

    Commands 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