mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
fix cloud-setup-agent, if selinux is disabled, should return successful, instead of raise an exception
This commit is contained in:
parent
5590cd93ce
commit
a89f7c0866
@ -20,6 +20,9 @@ class serviceCfgBase(object):
|
||||
result = False
|
||||
try:
|
||||
result = self.config()
|
||||
if result is None:
|
||||
result = False
|
||||
|
||||
self.status = result
|
||||
writeProgressBar(None, result)
|
||||
return result
|
||||
@ -369,7 +372,9 @@ class securityPolicyConfigRedhat(serviceCfgBase):
|
||||
except:
|
||||
raise CloudRuntimeException("Failed to configure selinux, please see the /var/log/cloud/setupAgent.log for detail, \
|
||||
or you can manually disable it before starting myCloud")
|
||||
|
||||
else:
|
||||
return True
|
||||
|
||||
def restore(self):
|
||||
try:
|
||||
bash("setenforce 1")
|
||||
|
||||
@ -71,6 +71,7 @@ def initLoging(logFile=None):
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
|
||||
def writeProgressBar(msg, result):
|
||||
output = "[%-6s]\n"%"Failed"
|
||||
if msg is not None:
|
||||
output = "%-30s"%msg
|
||||
elif result is True:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user