Repository: ambari
Updated Branches:
  refs/heads/branch-2.4 f3c55c769 -> 25d1cd24b
  refs/heads/trunk fe97cfd52 -> 5efdce84d


AMBARI-17426. Ambari server setup failed on debian with postgres local db 
(aonishuk)


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/5efdce84
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/5efdce84
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/5efdce84

Branch: refs/heads/trunk
Commit: 5efdce84d244e5031934d822355c5303a3e391e2
Parents: fe97cfd
Author: Andrew Onishuk <[email protected]>
Authored: Fri Jun 24 17:15:16 2016 +0300
Committer: Andrew Onishuk <[email protected]>
Committed: Fri Jun 24 17:15:16 2016 +0300

----------------------------------------------------------------------
 .../src/main/python/ambari_server/dbConfiguration_linux.py      | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/5efdce84/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py
----------------------------------------------------------------------
diff --git 
a/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py 
b/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py
index 5a3e290..95c82c1 100644
--- a/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py
+++ b/ambari-server/src/main/python/ambari_server/dbConfiguration_linux.py
@@ -579,7 +579,10 @@ class PGConfig(LinuxDBMSConfig):
     retcode, out, err = run_os_command(PGConfig.PG_ST_CMD)
     # on RHEL and SUSE PG_ST_COMD returns RC 0 for running and 3 for stoppped
     if retcode == 0:
-      pg_status = PGConfig.PG_STATUS_RUNNING
+      if out.strip() == "Running clusters:":
+        pg_status = "stopped"
+      else:
+        pg_status = PGConfig.PG_STATUS_RUNNING
     else:
       if retcode == 3:
         pg_status = "stopped"

Reply via email to