diff --git a/perl-xCAT/xCAT/GlobalDef.pm b/perl-xCAT/xCAT/GlobalDef.pm index 54e5ba3cd..5c86ff4c7 100644 --- a/perl-xCAT/xCAT/GlobalDef.pm +++ b/perl-xCAT/xCAT/GlobalDef.pm @@ -25,8 +25,15 @@ $::NODETYPE_HMC="hmc"; $::NODETYPE_IVM="ivm"; # valid values for nodelist.status columns or other status -$::STATUS_ACTIVE="active"; -$::STATUS_INACTIVE="inactive"; +$::STATUS_ACTIVE="alive"; +$::STATUS_INACTIVE="unreachable"; +$::STATUS_INSTALLING="installing"; +$::STATUS_INSTALLED="installed"; +$::STATUS_BOOTING="booting"; +$::STATUS_NETBOOTING="netbooting"; +$::STATUS_BOOTED="booted"; +$::STATUS_POWERING_OFF="powering-off"; +$::STATUS_DISCOVERING="discovering"; $::STATUS_UNKNOWN="unknown"; 1; diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index 078f08f98..3a2d41077 100644 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -263,7 +263,7 @@ nodelist => { descriptions => { node => 'The hostname of a node in the cluster.', groups => "A comma-delimited list of groups this node is a member of. Group names are arbitrary, except all nodes should be part of the 'all' group.", - status => 'The current status of this node. This attribute will be set by xCAT software. Valid values: defined, booting, discovering, installing, installed, alive, off.', + status => 'The current status of this node. This attribute will be set by xCAT software. Valid values: defined, booting, netbooting, booted, discovering, installing, installed, alive, powering-off, unreachable. The default value is defined. The possible status change sequenses are: defined->[discovering]->installing->installed->alive, defined->netbooting->booted->alive, alive/unreachable->booting->alive, alive->powering-off->unreachable, alive->unreachable', comments => 'Any user-written notes.', disable => "Set to 'yes' or '1' to comment out this row.", }, diff --git a/xCAT-rmc/plugin/rmcmon.pm b/xCAT-rmc/plugin/rmcmon.pm index 3ca08aa9a..4ee993d77 100644 --- a/xCAT-rmc/plugin/rmcmon.pm +++ b/xCAT-rmc/plugin/rmcmon.pm @@ -193,7 +193,7 @@ sub start { nodes-- an array of nodes. Returns: a hash that has the node status. The format is: - {active=>[node1, node3,...], unreachable=>[node4, node2...]} + {alive=>[node1, node3,...], unreachable=>[node4, node2...]} =cut #-------------------------------------------------------------------------------- sub pingNodeStatus { diff --git a/xCAT-rmc/scripts/updatexcatnodestatus b/xCAT-rmc/scripts/updatexcatnodestatus index 03f84b7ba..2dbea2079 100755 --- a/xCAT-rmc/scripts/updatexcatnodestatus +++ b/xCAT-rmc/scripts/updatexcatnodestatus @@ -61,8 +61,8 @@ if ($cond_name eq "NodeReachability") { exit 1; } my $status_string; -if ($status == 1) { $status_string="active"; } -else { $status_string="inactive"; } +if ($status == 1) { $status_string="alive"; } +else { $status_string="unreachable"; } my $result=`$::XCATROOT/bin/nodech $node nodelist.status=$status_string 2>&1`; my $code=$?; diff --git a/xCAT-server/lib/xcat/monitoring/monitorctrl.pm b/xCAT-server/lib/xcat/monitoring/monitorctrl.pm index 26d65dc80..22a06c88c 100644 --- a/xCAT-server/lib/xcat/monitoring/monitorctrl.pm +++ b/xCAT-server/lib/xcat/monitoring/monitorctrl.pm @@ -539,7 +539,7 @@ sub processMonitoringTableChanges { Arguments: status -- a hash pointer of the node status. A key is a status string. The value is an array pointer of nodes that have the same status. - for example: {active=>["node1", "node1"], inactive=>["node5","node100"]} + for example: {alive=>["node1", "node1"], unreachable=>["node5","node100"]} Returns: 0 for successful. non-0 for not successful. @@ -581,7 +581,7 @@ sub setNodeStatusAttributes { none. Returns: a hash that has the node status. The format is: - {active=>[node1, node3,...], unreachable=>[node4, node2...], unknown=>[node8, node101...]} + {alive=>[node1, node3,...], unreachable=>[node4, node2...], unknown=>[node8, node101...]} =cut #-------------------------------------------------------------------------------- sub getNodeStatus { @@ -821,7 +821,7 @@ sub getNodeMonServerPair { Returns: A hash reference keyed by the monitoring server nodes and each value is a ref to an array of [nodes, nodetype, status] arrays monitored by the server. So the format is: - {monserver1=>[['node1', 'osi', 'active'], ['node2', 'switch', 'booting']...], ...} + {monserver1=>[['node1', 'osi', 'alive'], ['node2', 'switch', 'booting']...], ...} A key is a pair of hostnames with the first one being the service node ip/hostname that faces the mn and the second one being the service node ip/hostname that faces the cn. The value of the first one can be "noservicenode" meaning that there is no service node @@ -913,7 +913,7 @@ sub getMonHierarchy { Returns: A hash reference keyed by the monitoring server nodes and each value is a ref to an array of [nodes, nodetype, status] arrays monitored by the server. So the format is: - {monserver1=>[['node1', 'osi', 'active'], ['node2', 'switch', 'booting']...], ...} + {monserver1=>[['node1', 'osi', 'alive'], ['node2', 'switch', 'booting']...], ...} A key is a pair of hostnames with the first one being the service node ip/hostname that faces the mn and the second one being the service node ip/hostname that faces the cn. The value of the first one can be "noservicenode" meaning that there is no service node @@ -976,7 +976,7 @@ sub getMonServerWithInfo { Returns: A hash reference keyed by the monitoring server nodes and each value is a ref to an array of [nodes, nodetype, status] arrays monitored by the server. So the format is: - {monserver1=>[['node1', 'osi', 'active'], ['node2', 'switch', 'booting']...], ...} + {monserver1=>[['node1', 'osi', 'alive'], ['node2', 'switch', 'booting']...], ...} A key is a pair of hostnames with the first one being the service node ip/hostname that faces the mn and the second one being the service node ip/hostname that faces the cn. The value of the first one can be "noservicenode" meaning that there is no service node diff --git a/xCAT-server/lib/xcat/monitoring/xcatmon.pm b/xCAT-server/lib/xcat/monitoring/xcatmon.pm index 02183f67e..125b2a278 100644 --- a/xCAT-server/lib/xcat/monitoring/xcatmon.pm +++ b/xCAT-server/lib/xcat/monitoring/xcatmon.pm @@ -273,7 +273,7 @@ sub deconfig { none. Returns: a hash that has the node status. The format is: - {active=>[node1, node3,...], unreachable=>[node4, node2...], unknown=>[node8, node101...]} + {alive=>[node1, node3,...], unreachable=>[node4, node2...], unknown=>[node8, node101...]} =cut #-------------------------------------------------------------------------------- sub getMonNodesStatus { @@ -328,7 +328,7 @@ sub getMonNodesStatus { Arguments: status -- a hash pointer of the node status. A key is a status string. The value is an array pointer of nodes that have the same status. - for example: {active=>["node1", "node1"], inactive=>["node5","node100"]} + for example: {alive=>["node1", "node1"], unreachable=>["node5","node100"]} Returns: 0 for successful. non-0 for not successful. diff --git a/xCAT-server/sbin/xcatnodemon b/xCAT-server/sbin/xcatnodemon index 0e864cf91..06bddeff5 100755 --- a/xCAT-server/sbin/xcatnodemon +++ b/xCAT-server/sbin/xcatnodemon @@ -71,7 +71,7 @@ if (keys(%node_status) > 0) { nodes-- an array of nodes. Returns: a hash that has the node status. The format is: - {active=>[node1, node3,...], unreachable=>[node4, node2...]} + {alive=>[node1, node3,...], unreachable=>[node4, node2...]} =cut #-------------------------------------------------------------------------------- sub pingNodeStatus {