mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02: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
|
result = False
|
||||||
try:
|
try:
|
||||||
result = self.config()
|
result = self.config()
|
||||||
|
if result is None:
|
||||||
|
result = False
|
||||||
|
|
||||||
self.status = result
|
self.status = result
|
||||||
writeProgressBar(None, result)
|
writeProgressBar(None, result)
|
||||||
return result
|
return result
|
||||||
@ -369,7 +372,9 @@ class securityPolicyConfigRedhat(serviceCfgBase):
|
|||||||
except:
|
except:
|
||||||
raise CloudRuntimeException("Failed to configure selinux, please see the /var/log/cloud/setupAgent.log for detail, \
|
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")
|
or you can manually disable it before starting myCloud")
|
||||||
|
else:
|
||||||
|
return True
|
||||||
|
|
||||||
def restore(self):
|
def restore(self):
|
||||||
try:
|
try:
|
||||||
bash("setenforce 1")
|
bash("setenforce 1")
|
||||||
|
|||||||
@ -71,6 +71,7 @@ def initLoging(logFile=None):
|
|||||||
logging.basicConfig(level=logging.DEBUG)
|
logging.basicConfig(level=logging.DEBUG)
|
||||||
|
|
||||||
def writeProgressBar(msg, result):
|
def writeProgressBar(msg, result):
|
||||||
|
output = "[%-6s]\n"%"Failed"
|
||||||
if msg is not None:
|
if msg is not None:
|
||||||
output = "%-30s"%msg
|
output = "%-30s"%msg
|
||||||
elif result is True:
|
elif result is True:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user