You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by sw...@apache.org on 2013/06/29 02:59:42 UTC

svn commit: r1497965 - /incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/python/ambari-server.py

Author: swagle
Date: Sat Jun 29 00:59:42 2013
New Revision: 1497965

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

Modified:
    incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/python/ambari-server.py

Modified: incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/python/ambari-server.py
URL: http://svn.apache.org/viewvc/incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/python/ambari-server.py?rev=1497965&r1=1497964&r2=1497965&view=diff
==============================================================================
--- incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/python/ambari-server.py (original)
+++ incubator/ambari/branches/branch-1.2.5/ambari-server/src/main/python/ambari-server.py Sat Jun 29 00:59:42 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():