defect 3525895: check the status of xcatd before continuing in the xcatconfig
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@12662 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
79d57e9c49
commit
98e9f25aaf
@ -368,6 +368,9 @@ if ($::INITIALINSTALL || $::FORCE || $::UPDATEINSTALL || $::genCredentials)
|
||||
system($xcmd);
|
||||
}
|
||||
|
||||
# wait for the starting of xcatd
|
||||
&waitxcatd;
|
||||
|
||||
# more config needed after xcatd start
|
||||
if ($::INITIALINSTALL || $::FORCE)
|
||||
{
|
||||
@ -1697,6 +1700,31 @@ sub mknb
|
||||
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
=head3 waitxcatd
|
||||
|
||||
Wait xcatd to function after the restart of xcatd
|
||||
|
||||
=cut
|
||||
#-----------------------------------------------------------------------------
|
||||
sub waitxcatd {
|
||||
my $cmd = "$::XCATROOT/bin/nodels -v";
|
||||
my $n = 0;
|
||||
while ($n++ < 10) {
|
||||
sleep 1;
|
||||
my $output = xCAT::Utils->runcmd("$cmd", -1);
|
||||
if ($::RUNCMD_RC == 0 || $output =~ /Version/) {
|
||||
last;
|
||||
} else {
|
||||
next;
|
||||
}
|
||||
}
|
||||
|
||||
if ($n >= 10) {
|
||||
print "Failed to check the status of xcatd\n";
|
||||
}
|
||||
}
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
|
||||
=head3 makenetworks
|
||||
|
Loading…
Reference in New Issue
Block a user