Skip to content

Commit fd759c6

Browse files
committed
bug 11458: stop cgconfig before start libvirtd, "service cgconfig status" returns "Running" instead of "running", then cloud-setup-agent doesn't stop it
status 11458: resolved fixed
1 parent 72d987a commit fd759c6

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

python/lib/cloudutils/serviceConfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -296,14 +296,14 @@ def config(self):
296296
}\n"
297297
cfo.add_lines(addConfig)
298298

299-
self.syscfg.svo.stopService("cgconfig")
299+
self.syscfg.svo.stopService("cgconfig", True)
300300
self.syscfg.svo.enableService("cgconfig",forcestart=True)
301301

302302
cfo = configFileOps("/etc/cgrules.conf", self)
303303
cfgline = "root:/usr/sbin/libvirtd cpu virt/\n"
304304
cfo.add_lines(cfgline)
305305

306-
self.syscfg.svo.stopService("cgred")
306+
self.syscfg.svo.stopService("cgred", True)
307307
if not self.syscfg.svo.enableService("cgred"):
308308
return False
309309
return True

python/lib/cloudutils/utilities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ class serviceOpsRedhat(serviceOps):
120120
def isServiceRunning(self, servicename):
121121
try:
122122
o = bash("service " + servicename + " status")
123-
if "running" in o.getStdout() or "start" in o.getStdout():
123+
if "running" in o.getStdout() or "start" in o.getStdout() or "Running" in o.getStdout():
124124
return True
125125
else:
126126
return False

0 commit comments

Comments
 (0)