mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-7213: fixed continuing cloud-setup-database if there is no selinux
This commit is contained in:
parent
3d6c64d262
commit
79fcbd4a59
@ -314,6 +314,7 @@ def check_cgroups():
|
||||
def check_selinux():
|
||||
if distro not in [Fedora,CentOS,RHEL6]: return # no selinux outside of those
|
||||
enforcing = False
|
||||
config_enforcing = False
|
||||
try:
|
||||
output = getenforce().stdout.strip()
|
||||
if "nforcing" in output:
|
||||
|
||||
@ -167,6 +167,10 @@ Sql parameters:
|
||||
'''%(table, e.__str__(), kwargs)
|
||||
self.errorAndExit(err)
|
||||
|
||||
def errorAndContinue(self, msg):
|
||||
sys.stderr.write(msg)
|
||||
sys.stderr.flush()
|
||||
|
||||
def errorAndExit(self, msg):
|
||||
self.postRun()
|
||||
err = '''\n\nWe apologize for below error:
|
||||
@ -389,10 +393,13 @@ for example:
|
||||
try:
|
||||
check_selinux()
|
||||
except CheckFailed, e:
|
||||
self.errorAndExit(e.__str__())
|
||||
self.info("checkSelinux failed with error continuing...", None)
|
||||
self.errorAndContinue(e.__str__())
|
||||
except OSError, e:
|
||||
if e.errno == 2: pass
|
||||
else: self.errorAndExit(e.__str__())
|
||||
else:
|
||||
self.info("checkSelinux failed with error continuing...", None)
|
||||
self.errorAndContinue(e.__str__())
|
||||
self.info(None, True)
|
||||
|
||||
checkCloudDbFiles()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user