From 2496e53bbb217535267796c105a4450c79663764 Mon Sep 17 00:00:00 2001 From: dahn Date: Tue, 10 Sep 2019 18:33:42 +0200 Subject: [PATCH] cloudutils: `service is-active` output check for "failed" (#3574) Small change to check for the right output of the system call. Fixes: #3572 --- python/lib/cloudutils/utilities.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/python/lib/cloudutils/utilities.py b/python/lib/cloudutils/utilities.py index 6fbc5829003..2a7043dfa18 100755 --- a/python/lib/cloudutils/utilities.py +++ b/python/lib/cloudutils/utilities.py @@ -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