Updated Branches:
  refs/heads/branch-1.4 00e1d98ab -> a50a34674

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

Branch: refs/heads/branch-1.4
Commit: a50a3467433c2073407f2650dc98203a42bf76bb
Parents: 00e1d98
Author: Mahadev Konar <[email protected]>
Authored: Tue Aug 27 11:49:23 2013 -0700
Committer: Mahadev Konar <[email protected]>
Committed: Tue Aug 27 11:50:03 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/a50a3467/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 ba46dac..82b45a1 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)
 

Reply via email to