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/25d1cd24
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/25d1cd24
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/25d1cd24

Branch: refs/heads/branch-2.4
Commit: 25d1cd24bb097944437525c1aca5d76f15b8983c
Parents: f3c55c7
Author: Andrew Onishuk <[email protected]>
Authored: Fri Jun 24 17:15:18 2016 +0300
Committer: Andrew Onishuk <[email protected]>
Committed: Fri Jun 24 17:15:18 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/25d1cd24/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