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
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 aonis...@hortonworks.com Authored: Wed Aug 26 12:31:40 2015 +0300 Committer: Andrew Onishuk aonis...@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', -
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
Repository: ambari Updated Branches: refs/heads/trunk fac57e538 - 6ccabc61e 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/6ccabc61 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/6ccabc61 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/6ccabc61 Branch: refs/heads/trunk Commit: 6ccabc61e451347d1b3168d8fe1eb7a98d6bd6b6 Parents: fac57e5 Author: Andrew Onishuk aonis...@hortonworks.com Authored: Wed Aug 26 12:29:18 2015 +0300 Committer: Andrew Onishuk aonis...@hortonworks.com Committed: Wed Aug 26 12:30:49 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/6ccabc61/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 9c4352a..bd44caf 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 @@ -30,25 +30,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 @@ -62,7 +60,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: @@ -71,7 +69,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/6ccabc61/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 368eb68..b553a29 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 @@ -48,87 +48,69 @@ class TestHookBeforeInstall(RMFTestCase): ) 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',