Fix for bug 3538 - sometimes stopsrc -s named takes a longer time to take effect.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@16095 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
8cf5c6de87
commit
2cd7e5aaa4
@ -540,28 +540,6 @@ sub process_request {
|
||||
|
||||
update_namedconf($ctx);
|
||||
update_zones($ctx);
|
||||
|
||||
# check if named is active before update dns records.
|
||||
if (xCAT::Utils->isAIX())
|
||||
{
|
||||
my $cmd = "/usr/bin/lssrc -s $service |grep active";
|
||||
my @output=xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
system("/usr/bin/startsrc -s $service");
|
||||
xCAT::SvrUtils::sendmsg("Starting named complete", $callback);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
my $cmd = "service $service status|grep running";
|
||||
my @output=xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
system("service $service start");
|
||||
xCAT::SvrUtils::sendmsg("Starting named complete", $callback);
|
||||
}
|
||||
}
|
||||
|
||||
if ($ctx->{restartneeded}) {
|
||||
xCAT::SvrUtils::sendmsg("Restarting $service", $callback);
|
||||
@ -585,6 +563,29 @@ sub process_request {
|
||||
xCAT::SvrUtils::sendmsg([1,"Unable to update DNS due to lack of credentials in passwd to communicate with remote server"], $callback);
|
||||
}
|
||||
}
|
||||
|
||||
# check if named is active before update dns records.
|
||||
if (xCAT::Utils->isAIX())
|
||||
{
|
||||
my $cmd = "/usr/bin/lssrc -s $service |grep active";
|
||||
my @output=xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
system("/usr/bin/startsrc -s $service");
|
||||
xCAT::SvrUtils::sendmsg("Starting named complete", $callback);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
my $cmd = "service $service status|grep running";
|
||||
my @output=xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{
|
||||
system("service $service start");
|
||||
xCAT::SvrUtils::sendmsg("Starting named complete", $callback);
|
||||
}
|
||||
}
|
||||
|
||||
#now we stick to Net::DNS style updates, with TSIG if possible. TODO: kerberized (i.e. Windows) DNS server support, maybe needing to use nsupdate -g....
|
||||
if ($external)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user