mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
cloudutils: service is-active output check for "failed" (#3574)
Small change to check for the right output of the system call. Fixes: #3572
This commit is contained in:
parent
d43b499429
commit
2496e53bbb
@ -217,7 +217,8 @@ class serviceOpsRedhat7(serviceOps):
|
||||
def isServiceRunning(self, servicename):
|
||||
try:
|
||||
o = bash("systemctl is-active " + servicename)
|
||||
return "inactive" not in o.getStdout()
|
||||
textout = o.getStdout()
|
||||
return "inactive" not in textout and "failed" not in textout
|
||||
except:
|
||||
return False
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user