You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ma...@apache.org on 2013/08/27 20:49:42 UTC

git commit: AMBARI-3026. Ambari server setup with silent option prints error statement for the first time. (Artem via mahadev)

Updated Branches:
  refs/heads/trunk 3bc5effcf -> f94f39403


AMBARI-3026. Ambari server setup with silent option prints error statement for the first time. (Artem via mahadev)


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

Branch: refs/heads/trunk
Commit: f94f394038f86c4f6b94963588f6a9fcd2eb113e
Parents: 3bc5eff
Author: Mahadev Konar <ma...@apache.org>
Authored: Tue Aug 27 11:49:23 2013 -0700
Committer: Mahadev Konar <ma...@apache.org>
Committed: Tue Aug 27 11:49:23 2013 -0700

----------------------------------------------------------------------
 ambari-server/src/main/python/ambari-server.py | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ambari/blob/f94f3940/ambari-server/src/main/python/ambari-server.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari-server.py b/ambari-server/src/main/python/ambari-server.py
index a141635..7d1320c 100755
--- a/ambari-server/src/main/python/ambari-server.py
+++ b/ambari-server/src/main/python/ambari-server.py
@@ -1345,11 +1345,10 @@ def is_jdbc_user_changed(args):
   if previos_user and new_user:
     if previos_user != new_user:
       return True
-  else:
-    print_error_msg("Cannot find jdbc username in config file.")
-    return None
+    else:
+      return False
 
-  return False
+  return None
 
 # Store local database connection properties
 def store_local_properties(args):
@@ -1965,6 +1964,8 @@ def setup(args):
   #DB setup should be done last after doing any setup.
   
   if is_local_database(args):
+    #check if jdbc user is changed
+    is_user_changed = is_jdbc_user_changed(args)
 
     print 'Default properties detected. Using built-in database.'
     store_local_properties(args)
@@ -1981,7 +1982,7 @@ def setup(args):
       err = 'Running database init script was failed. Exiting.'
       raise FatalException(retcode, err)
 
-    if is_jdbc_user_changed(args):
+    if is_user_changed:
       #remove backup for pg_hba in order to reconfigure postgres
       remove_file(PG_HBA_CONF_FILE_BACKUP)