删除stop后置校验,多余且导致出错

This commit is contained in:
zhang_xubo
2023-08-10 21:09:18 +08:00
parent e2f741c65f
commit 39b7dda233

View File

@ -127,15 +127,6 @@ class Kernel(BaseComponent):
if status != 0:
raise Exception(ErrorCode.GAUSS_516["GAUSS_51610"] %
"instance" + " Error: \n%s." % output)
if output.find("No such process") > 0:
cmd = "ps c -eo pid,euid,cmd | grep gaussdb | grep -v grep | " \
"awk '{if($2 == curuid && $1!=\"-n\") " \
"print \"/proc/\"$1\"/cwd\"}' curuid=`id -u`|" \
" xargs ls -l |awk '{if ($NF==\"%s\") print $(NF-2)}' | " \
"awk -F/ '{print $3 }'" % (self.instInfo.datadir)
(status, rightpid) = subprocess.getstatusoutput(cmd)
if rightpid or status != 0:
GaussLog.exitWithError(output)
def isPidFileExist(self):
pidFile = "%s/postmaster.pid" % self.instInfo.datadir