ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aonis...@apache.org
Subject ambari git commit: AMBARI-12871. Ambari startup scripts exhibit long delays (5+ seconds each) on every "modifying user" operation. This adds a few minutes to the time it takes to start or restart any component, causing excessive downtime for every config
Date Wed, 26 Aug 2015 09:31:48 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.1 8967aa315 -> a808ddc71


AMBARI-12871. Ambari startup scripts exhibit long delays (5+ seconds each) on every "modifying
user" operation. This adds a few minutes to the time it takes to start or restart any component,
causing excessive downtime for every config change. (aonishuk)


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

Branch: refs/heads/branch-2.1
Commit: a808ddc71db74c461abdd016d830b7a5aca146f7
Parents: 8967aa3
Author: Andrew Onishuk <aonishuk@hortonworks.com>
Authored: Wed Aug 26 12:31:40 2015 +0300
Committer: Andrew Onishuk <aonishuk@hortonworks.com>
Committed: Wed Aug 26 12:31:40 2015 +0300

----------------------------------------------------------------------
 .../before-ANY/scripts/shared_initialization.py   | 12 +++++-------
 .../2.0.6/hooks/before-ANY/test_before_any.py     | 18 ------------------
 2 files changed, 5 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/a808ddc7/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
index 4def30f..a22c27c 100644
--- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
+++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/scripts/shared_initialization.py
@@ -64,25 +64,23 @@ def setup_users():
   """
   import params
 
-  if not params.host_sys_prepped:
+  if not params.host_sys_prepped and not params.ignore_groupsusers_create:
     for group in params.group_list:
       Group(group,
-          ignore_failures = params.ignore_groupsusers_create
       )
 
     for user in params.user_list:
       User(user,
           gid = params.user_to_gid_dict[user],
           groups = params.user_to_groups_dict[user],
-          ignore_failures = params.ignore_groupsusers_create
       )
 
     if params.override_uid == "true":
       set_uid(params.smoke_user, params.smoke_user_dirs)
     else:
-      print 'Skipping setting uid for smoke user as host is sys prepped'
+      Logger.info('Skipping setting uid for smoke user as host is sys prepped')
   else:
-    print 'Skipping creation of User and Group as host is sys prepped'
+    Logger.info('Skipping creation of User and Group as host is sys prepped or ignore_groupsusers_create
flag is on')
     pass
 
 
@@ -96,7 +94,7 @@ def setup_users():
     if not params.host_sys_prepped and params.override_uid == "true":
       set_uid(params.hbase_user, params.hbase_user_dirs)
     else:
-      print 'Skipping setting uid for hbase user as host is sys prepped'
+      Logger.info('Skipping setting uid for hbase user as host is sys prepped')      
       pass
 
   if not params.host_sys_prepped:
@@ -105,7 +103,7 @@ def setup_users():
     if params.has_tez and params.hdp_stack_version != "" and compare_versions(params.hdp_stack_version,
'2.3') >= 0:
         create_tez_am_view_acls()
   else:
-    print 'Skipping setting dfs cluster admin and tez view acls as host is sys prepped'
+    Logger.info('Skipping setting dfs cluster admin and tez view acls as host is sys prepped')
 
 def create_dfs_cluster_admins():
   """

http://git-wip-us.apache.org/repos/asf/ambari/blob/a808ddc7/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
index 37a52df..82740fc 100644
--- a/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
+++ b/ambari-server/src/test/python/stacks/2.0.6/hooks/before-ANY/test_before_any.py
@@ -50,87 +50,69 @@ class TestHookBeforeInstall(RMFTestCase):
         content = DownloadSource('http://c6401.ambari.apache.org:8080/resources//UnlimitedJCEPolicyJDK7.zip'),
     )
     self.assertResourceCalled('Group', 'hadoop',
-        ignore_failures = False,
     )
     self.assertResourceCalled('Group', 'nobody',
-        ignore_failures = False,
     )
     self.assertResourceCalled('Group', 'users',
-        ignore_failures = False,
     )
     self.assertResourceCalled('User', 'hive',
         gid = 'hadoop',
-        ignore_failures = False,
         groups = [u'hadoop'],
     )
     self.assertResourceCalled('User', 'oozie',
         gid = 'hadoop',
-        ignore_failures = False,
         groups = [u'users'],
     )
     self.assertResourceCalled('User', 'nobody',
         gid = 'hadoop',
-        ignore_failures = False,
         groups = [u'nobody'],
     )
     self.assertResourceCalled('User', 'ambari-qa',
         gid = 'hadoop',
-        ignore_failures = False,
         groups = [u'users'],
     )
     self.assertResourceCalled('User', 'flume',
         gid = 'hadoop',
-        ignore_failures = False,
         groups = [u'hadoop'],
     )
     self.assertResourceCalled('User', 'hdfs',
-        ignore_failures = False,
         gid = 'hadoop',
         groups = [u'hadoop'],
     )
     self.assertResourceCalled('User', 'storm',
         gid = 'hadoop',
-        ignore_failures = False,
         groups = [u'hadoop'],
     )
     self.assertResourceCalled('User', 'mapred',
         gid = 'hadoop',
-        ignore_failures = False,
         groups = [u'hadoop'],
     )
     self.assertResourceCalled('User', 'hbase',
         gid = 'hadoop',
-        ignore_failures = False,
         groups = [u'hadoop'],
     )
     self.assertResourceCalled('User', 'tez',
         gid = 'hadoop',
-        ignore_failures = False,
         groups = [u'users'],
     )
     self.assertResourceCalled('User', 'zookeeper',
         gid = 'hadoop',
-        ignore_failures = False,
         groups = [u'hadoop'],
     )
     self.assertResourceCalled('User', 'falcon',
         gid = 'hadoop',
-        ignore_failures = False,
         groups = [u'users'],
     )
     self.assertResourceCalled('User', 'sqoop',
         gid = 'hadoop',
-        ignore_failures = False,
         groups = [u'hadoop'],
     )
     self.assertResourceCalled('User', 'yarn',
         gid = 'hadoop',
-        ignore_failures = False,
         groups = [u'hadoop'],
     )
     self.assertResourceCalled('User', 'hcat',
         gid = 'hadoop',
-        ignore_failures = False,
         groups = [u'hadoop'],
     )
     self.assertResourceCalled('File', '/tmp/changeUid.sh',


Mime
View raw message