Author: ncole
Date: Fri Jun 14 01:52:46 2013
New Revision: 1492928

URL: http://svn.apache.org/r1492928
Log:
AMBARI-2385. Fix for PostgreSQL not starting on RHEL-5.8 (ncole)

Modified:
    incubator/ambari/trunk/ambari-server/sbin/ambari-server
    incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py

Modified: incubator/ambari/trunk/ambari-server/sbin/ambari-server
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/sbin/ambari-server?rev=1492928&r1=1492927&r2=1492928&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/sbin/ambari-server (original)
+++ incubator/ambari/trunk/ambari-server/sbin/ambari-server Fri Jun 14 01:52:46 
2013
@@ -87,6 +87,9 @@ case "$1" in
         $PYTHON /usr/sbin/ambari-server.py $@
         ;;
   setup)
+        initdb_res=`/sbin/service postgresql initdb 2>&1 > /dev/null`
+        initdb_res=`/sbin/service postgresql start 2>&1 > /dev/null`
+        initdb_res=`/sbin/service postgresql stop 2>&1 > /dev/null`
         echo -e "Setup ambari-server"
         $PYTHON /usr/sbin/ambari-server.py $@
         ;;

Modified: incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py
URL: 
http://svn.apache.org/viewvc/incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py?rev=1492928&r1=1492927&r2=1492928&view=diff
==============================================================================
--- incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py 
(original)
+++ incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py Fri 
Jun 14 01:52:46 2013
@@ -783,7 +783,7 @@ def check_postgre_up():
         stdin=subprocess.PIPE,
         stderr=subprocess.PIPE
       )
-      time.sleep(5)
+      time.sleep(20)
       result = process.poll()
       print_info_msg("Result of postgres start cmd: " + str(result))
       if result is None:


Reply via email to