Skip to content

Commit 79fcbd4

Browse files
author
Jayapal
committed
CLOUDSTACK-7213: fixed continuing cloud-setup-database if there is no selinux
1 parent 3d6c64d commit 79fcbd4

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

python/lib/cloud_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ def check_cgroups():
314314
def check_selinux():
315315
if distro not in [Fedora,CentOS,RHEL6]: return # no selinux outside of those
316316
enforcing = False
317+
config_enforcing = False
317318
try:
318319
output = getenforce().stdout.strip()
319320
if "nforcing" in output:

setup/bindir/cloud-setup-databases.in

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ Sql parameters:
167167
'''%(table, e.__str__(), kwargs)
168168
self.errorAndExit(err)
169169

170+
def errorAndContinue(self, msg):
171+
sys.stderr.write(msg)
172+
sys.stderr.flush()
173+
170174
def errorAndExit(self, msg):
171175
self.postRun()
172176
err = '''\n\nWe apologize for below error:
@@ -389,10 +393,13 @@ for example:
389393
try:
390394
check_selinux()
391395
except CheckFailed, e:
392-
self.errorAndExit(e.__str__())
396+
self.info("checkSelinux failed with error continuing...", None)
397+
self.errorAndContinue(e.__str__())
393398
except OSError, e:
394399
if e.errno == 2: pass
395-
else: self.errorAndExit(e.__str__())
400+
else:
401+
self.info("checkSelinux failed with error continuing...", None)
402+
self.errorAndContinue(e.__str__())
396403
self.info(None, True)
397404

398405
checkCloudDbFiles()

0 commit comments

Comments
 (0)