GeezerVison is showing github.com — CLOUDSTACK-7213: fixed continuing cloud-setup-database if there is no… · disller/cloudstack@79fcbd4
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: python/lib/cloud_utils.py +1Lines changed: 1 addition & 0 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -314,6 +314,7 @@ def check_cgroups(): |
314 | 314 | def check_selinux(): |
315 | 315 | if distro not in [Fedora,CentOS,RHEL6]: return # no selinux outside of those |
316 | 316 | enforcing = False |
| 317 | + config_enforcing = False |
317 | 318 | try: |
318 | 319 | output = getenforce().stdout.strip() |
319 | 320 | if "nforcing" in output: |
|
Collapse file
Copy file name to clipboardExpand all lines: setup/bindir/cloud-setup-databases.in +9-2Lines changed: 9 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -167,6 +167,10 @@ Sql parameters: |
167 | 167 | '''%(table, e.__str__(), kwargs) |
168 | 168 | self.errorAndExit(err) |
169 | 169 |
|
| 170 | + def errorAndContinue(self, msg): |
| 171 | + sys.stderr.write(msg) |
| 172 | + sys.stderr.flush() |
| 173 | + |
170 | 174 | def errorAndExit(self, msg): |
171 | 175 | self.postRun() |
172 | 176 | err = '''\n\nWe apologize for below error: |
@@ -389,10 +393,13 @@ for example: |
389 | 393 | try: |
390 | 394 | check_selinux() |
391 | 395 | except CheckFailed, e: |
392 | | - self.errorAndExit(e.__str__()) |
| 396 | + self.info("checkSelinux failed with error continuing...", None) |
| 397 | + self.errorAndContinue(e.__str__()) |
393 | 398 | except OSError, e: |
394 | 399 | 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__()) |
396 | 403 | self.info(None, True) |
397 | 404 |
|
398 | 405 | checkCloudDbFiles() |
|