You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by vb...@apache.org on 2016/12/14 16:36:46 UTC
ambari git commit: AMBARI-19202. Devdeploy: Database check
failed.(vbrodetskyi)
Repository: ambari
Updated Branches:
refs/heads/branch-2.5 d29220d8a -> fe828aef7
AMBARI-19202. Devdeploy: Database check failed.(vbrodetskyi)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/fe828aef
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/fe828aef
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/fe828aef
Branch: refs/heads/branch-2.5
Commit: fe828aef7b2cc646fdd9decb431f96d8047b943a
Parents: d29220d
Author: Vitaly Brodetskyi <vb...@hortonworks.com>
Authored: Wed Dec 14 18:11:51 2016 +0200
Committer: Vitaly Brodetskyi <vb...@hortonworks.com>
Committed: Wed Dec 14 18:11:51 2016 +0200
----------------------------------------------------------------------
ambari-common/src/main/python/ambari_commons/os_linux.py | 7 ++++++-
ambari-server/src/main/python/ambari_server/checkDatabase.py | 5 ++---
2 files changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/fe828aef/ambari-common/src/main/python/ambari_commons/os_linux.py
----------------------------------------------------------------------
diff --git a/ambari-common/src/main/python/ambari_commons/os_linux.py b/ambari-common/src/main/python/ambari_commons/os_linux.py
index 497b1a5..25368c6 100644
--- a/ambari-common/src/main/python/ambari_commons/os_linux.py
+++ b/ambari-common/src/main/python/ambari_commons/os_linux.py
@@ -45,8 +45,13 @@ def os_run_os_command(cmd, env=None, shell=False, cwd=None):
env=env,
cwd=cwd,
shell=shell
- )
+ )
+ process_pid = process.pid
(stdoutdata, stderrdata) = process.communicate()
+ if stdoutdata:
+ stdoutdata = stdoutdata + "\nprocess_pid=" + str(process_pid) + "\n"
+ else:
+ stdoutdata = "\nprocess_pid=" + str(process_pid) + "\n"
return process.returncode, stdoutdata, stderrdata
def os_change_owner(filePath, user, recursive):
http://git-wip-us.apache.org/repos/asf/ambari/blob/fe828aef/ambari-server/src/main/python/ambari_server/checkDatabase.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/checkDatabase.py b/ambari-server/src/main/python/ambari_server/checkDatabase.py
index a6c58e0..2a3e0ba 100644
--- a/ambari-server/src/main/python/ambari_server/checkDatabase.py
+++ b/ambari-server/src/main/python/ambari_server/checkDatabase.py
@@ -80,9 +80,8 @@ def check_database(options):
if retcode > 0:
- print str(stdout)
- raise FatalException(1, 'Database check failed to complete. Please check ' + configDefaults.SERVER_LOG_FILE +
- ' and ' + configDefaults.DB_CHECK_LOG + ' for more information.')
+ raise FatalException(int(retcode), "Database check failed to complete: {0}. \nPlease check {1} and {2} for more "
+ "information.".format(stdout+stderr, configDefaults.SERVER_LOG_FILE, configDefaults.DB_CHECK_LOG))
else:
print str(stdout)
if not stdout.startswith("No errors"):