Skip to content

Commit 2496e53

Browse files
DaanHooglandrohityadavcloud
authored andcommitted
cloudutils: service is-active output check for "failed" (apache#3574)
Small change to check for the right output of the system call. Fixes: apache#3572
1 parent d43b499 commit 2496e53

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

python/lib/cloudutils/utilities.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ class serviceOpsRedhat7(serviceOps):
217217
def isServiceRunning(self, servicename):
218218
try:
219219
o = bash("systemctl is-active " + servicename)
220-
return "inactive" not in o.getStdout()
220+
textout = o.getStdout()
221+
return "inactive" not in textout and "failed" not in textout
221222
except:
222223
return False
223224

0 commit comments

Comments
 (0)