incubator-ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From swa...@apache.org
Subject svn commit: r1497966 - /incubator/ambari/trunk/ambari-server/src/main/python/ambari-server.py
Date Sat, 29 Jun 2013 01:00:18 GMT
Author: swagle
Date: Sat Jun 29 01:00:17 2013
New Revision: 1497966

URL: http://svn.apache.org/r1497966
Log:
AMBARI-2520. Setting up encryption after chaning ambari user account fails. (swagle)

Modified:
    incubator/ambari/trunk/ambari-server/src/main/python/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=1497966&r1=1497965&r2=1497966&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 Sat Jun 29 01:00:17
2013
@@ -2472,6 +2472,12 @@ def setup_master_key(resetKey=False):
       if retCode != 0:
         print 'Saving secure ldap password failed. Exiting.'
 
+  # Since files for store and master are created we need to ensure correct
+  # permissions
+  ambari_user = read_ambari_user()
+  if ambari_user:
+    adjust_directory_permissions(ambari_user)
+
   return key, True, persist
 
 def get_credential_store_location(properties):
@@ -2674,13 +2680,18 @@ def setup_https(args):
       f = open(conf_file, 'w')
       properties.store(f, "Changed by 'ambari-server setup-https' command")
       if is_server_runing():
-        print 'NOTE: Reset Ambari Server to apply changes'+\
+        print 'NOTE: Restart Ambari Server to apply changes'+\
               ' ("ambari-server restart|stop|start")'
     except (KeyError), e:
       err = 'Property ' + str(e) + ' is not defined at ' + conf_file
       raise FatalException(1, err)
   else:
     print "setup-https is not enabled in silent mode."
+
+  ambari_user = read_ambari_user()
+  if ambari_user:
+    adjust_directory_permissions(ambari_user)
+
   print "Ambari Server 'HTTPS setup' completed successfully. Exiting."
   
 def is_server_runing():



Mime
View raw message