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/branches/2.8@16094 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
sjing 2013-04-27 06:04:50 +00:00
parent 2eff25fb6a
commit 49667756cb

View File

@ -536,29 +536,7 @@ 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);
@ -579,6 +557,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)
{