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/05/12 14:36:44 UTC
[05/26] ambari git commit: AMBARI-20974. Ambari fails to start due to
NPE after installation of HDF mpack - Addendum (mradhakrishnan)
AMBARI-20974. Ambari fails to start due to NPE after installation of HDF mpack - Addendum (mradhakrishnan)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/09ca0316
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/09ca0316
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/09ca0316
Branch: refs/heads/branch-feature-AMBARI-12556
Commit: 09ca0316d42240ea375e83b901ad3a4b0f55b37a
Parents: a60f132
Author: Madhuvanthi Radhakrishnan <mr...@hortonworks.com>
Authored: Wed May 10 14:26:55 2017 -0700
Committer: Madhuvanthi Radhakrishnan <mr...@hortonworks.com>
Committed: Wed May 10 14:26:55 2017 -0700
----------------------------------------------------------------------
ambari-server/src/main/python/ambari_server/setupMpacks.py | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/09ca0316/ambari-server/src/main/python/ambari_server/setupMpacks.py
----------------------------------------------------------------------
diff --git a/ambari-server/src/main/python/ambari_server/setupMpacks.py b/ambari-server/src/main/python/ambari_server/setupMpacks.py
index 1bb7a70..aaf9c10 100755
--- a/ambari-server/src/main/python/ambari_server/setupMpacks.py
+++ b/ambari-server/src/main/python/ambari_server/setupMpacks.py
@@ -798,9 +798,10 @@ def _install_mpack(options, replay_mode=False, is_upgrade=False):
ambari_user = read_ambari_user()
- # This is required when a non-admin user is configured to setup ambari-server
- print_info_msg("Adjusting file permissions and ownerships")
- for pack in adjust_ownership_list:
+ if ambari_user:
+ # This is required when a non-admin user is configured to setup ambari-server
+ print_info_msg("Adjusting file permissions and ownerships")
+ for pack in adjust_ownership_list:
file = pack[0]
mod = pack[1]
user = pack[2].format(ambari_user)
@@ -808,7 +809,7 @@ def _install_mpack(options, replay_mode=False, is_upgrade=False):
logger.info("Setting file permissions: {0} {1} {2} {3}".format(file, mod, user, recursive))
set_file_permissions(file, mod, user, recursive)
- for pack in change_ownership_list:
+ for pack in change_ownership_list:
path = pack[0]
user = pack[1].format(ambari_user)
recursive = pack[2]