You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by jo...@apache.org on 2017/07/21 04:38:21 UTC
[21/23] ambari git commit: AMBARI-21535. ACTIVITY_ANALYZER Install
failed: Error: Unable to run the custom hook script (aonishuk)
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/86787c37
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/86787c37
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/86787c37
Branch: refs/heads/branch-feature-AMBARI-21450
Commit: 86787c37f669440a85a0038fe834f267ad992b07
Parents: 282c4e2
Author: Andrew Onishuk <ao...@hortonworks.com>
Authored: Thu Jul 20 16:21:27 2017 +0300
Committer: Andrew Onishuk <ao...@hortonworks.com>
Committed: Thu Jul 20 16:21:27 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/86787c37/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/86787c37/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 aa33261..bcd4b17 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)