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
This commit is contained in:
Edison Su 2011-09-15 14:34:00 -07:00
parent 72d987aa23
commit fd759c60df
2 changed files with 3 additions and 3 deletions

View File

@ -296,14 +296,14 @@ class cgroupConfig(serviceCfgBase):
}\n"
cfo.add_lines(addConfig)
self.syscfg.svo.stopService("cgconfig")
self.syscfg.svo.stopService("cgconfig", True)
self.syscfg.svo.enableService("cgconfig",forcestart=True)
cfo = configFileOps("/etc/cgrules.conf", self)
cfgline = "root:/usr/sbin/libvirtd cpu virt/\n"
cfo.add_lines(cfgline)
self.syscfg.svo.stopService("cgred")
self.syscfg.svo.stopService("cgred", True)
if not self.syscfg.svo.enableService("cgred"):
return False
return True

View File

@ -120,7 +120,7 @@ class serviceOpsRedhat(serviceOps):
def isServiceRunning(self, servicename):
try:
o = bash("service " + servicename + " status")
if "running" in o.getStdout() or "start" in o.getStdout():
if "running" in o.getStdout() or "start" in o.getStdout() or "Running" in o.getStdout():
return True
else:
return False