From 1e92257e0a3d52820d1333b7a8ddcf29cd88c161 Mon Sep 17 00:00:00 2001 From: chenglch Date: Wed, 13 Dec 2017 15:35:52 +0800 Subject: [PATCH] Do not restart conserver if goconserver was started If goconserver was enabled, do not start conserver when restart xcatd on service node. --- xCAT-server/lib/xcat/plugins/AAsn.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/AAsn.pm b/xCAT-server/lib/xcat/plugins/AAsn.pm index 40b90d15a..4bef1e5e0 100755 --- a/xCAT-server/lib/xcat/plugins/AAsn.pm +++ b/xCAT-server/lib/xcat/plugins/AAsn.pm @@ -488,8 +488,14 @@ sub setup_CONS { my ($nodename) = @_; my $rc = 0; - - my $cmd; + if (-x "/usr/bin/goconserver") { + my $cmd = "ps axf | grep -v grep | grep \/usr\/bin\/goconserver"; + xCAT::Utils->runcmd($cmd, 0); + if ($::RUNCMD_RC == 0) { + xCAT::MsgUtils->message("S", "INFO: goconserver was started, do nothing for conserver."); + return 0; + } + } my $cmdref; $cmdref->{command}->[0] = "makeconservercf"; $cmdref->{arg}->[0] = "-l";