mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 01:26:38 +00:00
update node status when enter shell/standby
This commit is contained in:
parent
38d36145ce
commit
9d5dede0d1
@ -319,6 +319,11 @@ if [ "$destiny" != "discover" ]; then #we aren't discoverying, we probably can a
|
||||
logger -s -t $log_label -p local4.info "Getting initial certificate --> $XCATMASTER:$XCATPORT"
|
||||
/bin/getcert $XCATMASTER:$XCATPORT
|
||||
fi
|
||||
if [ "$destiny" ]; then
|
||||
# run getdestiny to update node status
|
||||
/bin/getdestiny $XCATMASTER:$XCATPORT >/dev/null 2>&1
|
||||
fi
|
||||
|
||||
while :; do
|
||||
|
||||
grepconfigraid=`echo $destiny|grep "configraid"`
|
||||
@ -389,7 +394,7 @@ while :; do
|
||||
tar xvf `basename $destparameter`
|
||||
./runme.sh
|
||||
cd -
|
||||
logger -s -t $log_label -p local4.info "Running nextdestiny $XCATMASTER:$XCATPORT..."
|
||||
logger -s -t $log_label -p local4.info "Running nextdestiny $XCATMASTER:$XCATPORT..."
|
||||
destiny=`/bin/nextdestiny $XCATMASTER:$XCATPORT`
|
||||
dest=`echo $destiny|awk -F= '{print $1}'`
|
||||
logger -s -t $log_label -p local4.info "nextdestiny - Complete."
|
||||
|
@ -915,6 +915,16 @@ sub getdestiny {
|
||||
my %node_status = ();
|
||||
foreach $node (@$nodes) {
|
||||
unless ($chaintab) { #Without destiny, have the node wait with ssh hopefully open at least
|
||||
my $stat = xCAT_monitoring::monitorctrl->getNodeStatusFromNodesetState("standby", "getdestiny");
|
||||
if ($stat) {
|
||||
if (exists($node_status{$stat})) {
|
||||
push @{ $node_status{$stat} }, $node;
|
||||
} else {
|
||||
$node_status{$stat} = [$node];
|
||||
}
|
||||
xCAT_monitoring::monitorctrl::setNodeStatusAttributes(\%node_status, 1);
|
||||
}
|
||||
|
||||
$callback->({ node => [ { name => [$node], data => ['standby'], destiny => ['standby'] } ] });
|
||||
return;
|
||||
}
|
||||
@ -928,10 +938,10 @@ sub getdestiny {
|
||||
#print "node=$node, stat=$stat\n";
|
||||
if ($stat) {
|
||||
if (exists($node_status{$stat})) {
|
||||
my $pa = $node_status{$stat};
|
||||
push(@$pa, $node);
|
||||
push @{ $node_status{$stat} }, $node;
|
||||
} else {
|
||||
$node_status{$stat} = [$node];
|
||||
}
|
||||
else { $node_status{$stat} = [$node]; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -979,10 +989,10 @@ sub getdestiny {
|
||||
#print "node=$node, stat=$stat\n";
|
||||
if ($stat) {
|
||||
if (exists($node_status{$stat})) {
|
||||
my $pa = $node_status{$stat};
|
||||
push(@$pa, $node);
|
||||
push @{ $node_status{$stat} }, $node;
|
||||
} else {
|
||||
$node_status{$stat} = [$node];
|
||||
}
|
||||
else { $node_status{$stat} = [$node]; }
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user