AMBARI-21535. ACTIVITY_ANALYZER Install failed: Error: Unable to run the custom hook script (aonishuk)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/9c451107 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/9c451107 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/9c451107 Branch: refs/heads/branch-feature-AMBARI-14714 Commit: 9c451107f316dbfcc45f99d536d2a6d4a4d99249 Parents: d999343 Author: Andrew Onishuk <aonis...@hortonworks.com> Authored: Thu Jul 20 16:21:20 2017 +0300 Committer: Andrew Onishuk <aonis...@hortonworks.com> Committed: Thu Jul 20 16:21:20 2017 +0300 ---------------------------------------------------------------------- .../hooks/before-ANY/files/changeToSecureUid.sh | 2 ++ .../before-ANY/scripts/shared_initialization.py | 19 ++++++------------- 2 files changed, 8 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/9c451107/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/files/changeToSecureUid.sh ---------------------------------------------------------------------- diff --git a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/files/changeToSecureUid.sh b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/files/changeToSecureUid.sh index 4663f10..a6b8b77 100644 --- a/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/files/changeToSecureUid.sh +++ b/ambari-server/src/main/resources/stacks/HDP/2.0.6/hooks/before-ANY/files/changeToSecureUid.sh @@ -44,6 +44,8 @@ if [ -z $2 ]; then fi echo $newUid exit 0 +else + find_available_uid fi if [ $newUid -eq 0 ] http://git-wip-us.apache.org/repos/asf/ambari/blob/9c451107/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 b687229..ee950e8 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 @@ -44,19 +44,12 @@ def setup_users(): ) for user in params.user_list: - if params.override_uid == "true": - User(user, - uid = get_uid(user), - gid = params.user_to_gid_dict[user], - groups = params.user_to_groups_dict[user], - fetch_nonlocal_groups = params.fetch_nonlocal_groups, - ) - else: - User(user, - gid = params.user_to_gid_dict[user], - groups = params.user_to_groups_dict[user], - fetch_nonlocal_groups = params.fetch_nonlocal_groups, - ) + User(user, + uid = get_uid(user) if params.override_uid == "true" else None, + gid = params.user_to_gid_dict[user], + groups = params.user_to_groups_dict[user], + fetch_nonlocal_groups = params.fetch_nonlocal_groups, + ) if params.override_uid == "true": set_uid(params.smoke_user, params.smoke_user_dirs)