mirror of
https://github.com/apache/cloudstack.git
synced 2025-11-02 20:02: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():
|
def check_selinux():
|
||||||
if distro not in [Fedora,CentOS,RHEL6]: return # no selinux outside of those
|
if distro not in [Fedora,CentOS,RHEL6]: return # no selinux outside of those
|
||||||
enforcing = False
|
enforcing = False
|
||||||
|
config_enforcing = False
|
||||||
try:
|
try:
|
||||||
output = getenforce().stdout.strip()
|
output = getenforce().stdout.strip()
|
||||||
if "nforcing" in output:
|
if "nforcing" in output:
|
||||||
|
|||||||
@ -167,6 +167,10 @@ Sql parameters:
|
|||||||
'''%(table, e.__str__(), kwargs)
|
'''%(table, e.__str__(), kwargs)
|
||||||
self.errorAndExit(err)
|
self.errorAndExit(err)
|
||||||
|
|
||||||
|
def errorAndContinue(self, msg):
|
||||||
|
sys.stderr.write(msg)
|
||||||
|
sys.stderr.flush()
|
||||||
|
|
||||||
def errorAndExit(self, msg):
|
def errorAndExit(self, msg):
|
||||||
self.postRun()
|
self.postRun()
|
||||||
err = '''\n\nWe apologize for below error:
|
err = '''\n\nWe apologize for below error:
|
||||||
@ -389,10 +393,13 @@ for example:
|
|||||||
try:
|
try:
|
||||||
check_selinux()
|
check_selinux()
|
||||||
except CheckFailed, e:
|
except CheckFailed, e:
|
||||||
self.errorAndExit(e.__str__())
|
self.info("checkSelinux failed with error continuing...", None)
|
||||||
|
self.errorAndContinue(e.__str__())
|
||||||
except OSError, e:
|
except OSError, e:
|
||||||
if e.errno == 2: pass
|
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)
|
self.info(None, True)
|
||||||
|
|
||||||
checkCloudDbFiles()
|
checkCloudDbFiles()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user