fixed conserver problem on service node boot
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1361 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
a96297af14
commit
d572735255
@ -109,10 +109,12 @@ sub setup_CONS
|
||||
my $cmdref;
|
||||
$cmdref->{command}->[0] = "makeconservercf";
|
||||
$cmdref->{cwd}->[0] = "/opt/xcat/sbin";
|
||||
$cmdref->{svboot}->[0] = "yes";
|
||||
|
||||
my $modname = "conserver";
|
||||
${"xCAT_plugin::" . $modname . "::"}{process_request}
|
||||
->($cmdref, \&xCAT::Client::handle_response);
|
||||
|
||||
my $cmd = "chkconfig conserver on";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
@ -121,8 +123,17 @@ sub setup_CONS
|
||||
return 1;
|
||||
}
|
||||
|
||||
# stop conserver
|
||||
my $cmd = "/etc/rc.d/init.d/conserver stop";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{ # error
|
||||
xCAT::MsgUtils->message("S", "Error stoping Conserver");
|
||||
}
|
||||
|
||||
|
||||
# start conserver
|
||||
my $cmd = "/etc/rc.d/init.d/conserver start";
|
||||
$cmd = "/etc/rc.d/init.d/conserver start";
|
||||
xCAT::Utils->runcmd($cmd, 0);
|
||||
if ($::RUNCMD_RC != 0)
|
||||
{ # error
|
||||
|
@ -35,7 +35,7 @@ sub preprocess_request {
|
||||
if ($request->{_xcatdest}) { return [$request]; } #exit if preprocessed
|
||||
my $callback=shift;
|
||||
my @requests;
|
||||
my $noderange = $request->{node}; #Should be arrayref
|
||||
my $noderange = $request->{node}; #Should be arrayref
|
||||
|
||||
#display usage statement if -h
|
||||
my $extrargs = $request->{arg};
|
||||
@ -195,6 +195,8 @@ sub makeconservercf {
|
||||
%termservers = (); #clear hash of existing entries
|
||||
my $cb = shift;
|
||||
my $nodes = $req->{node};
|
||||
my $svboot=0;
|
||||
if (exists($req->{svboot})) { $svboot=1;}
|
||||
my $cfile;
|
||||
my @filecontent;
|
||||
open $cfile,'/etc/conserver.cf';
|
||||
@ -286,11 +288,14 @@ sub makeconservercf {
|
||||
}
|
||||
close $cfile;
|
||||
|
||||
#restart conserver daemon
|
||||
my $cmd = "/etc/rc.d/init.d/conserver stop";
|
||||
xCAT::Utils->runcmd($cmd, -1);
|
||||
$cmd = "/etc/rc.d/init.d/conserver start";
|
||||
xCAT::Utils->runcmd($cmd, -1);
|
||||
|
||||
if (!$svboot) {
|
||||
#restart conserver daemon
|
||||
my $cmd = "/etc/rc.d/init.d/conserver stop";
|
||||
xCAT::Utils->runcmd($cmd, -1);
|
||||
$cmd = "/etc/rc.d/init.d/conserver start";
|
||||
xCAT::Utils->runcmd($cmd, -1);
|
||||
}
|
||||
}
|
||||
|
||||
sub dotsent {
|
||||
|
@ -133,7 +133,7 @@ sub copyCertstoSN
|
||||
|
||||
}
|
||||
# TODO fix for SuSE and AIX
|
||||
`service xcatd restart`;
|
||||
# `service xcatd restart`;
|
||||
return $rc;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user