You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by rz...@apache.org on 2017/03/27 22:57:30 UTC
[20/51] [abbrv] ambari git commit: AMBARI-18637: Management pack
purge option should warn user and ask for confirmation before purging -
addendum (jluniya)
AMBARI-18637: Management pack purge option should warn user and ask for confirmation before purging - addendum (jluniya)
(cherry picked from commit 6db111308f79ac179b311cb4e5f2f6322cce5583)
Change-Id: Iaf22a2cec1f307b639758a1ff4fcdf04a6d7ea55
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/8e34693e
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/8e34693e
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/8e34693e
Branch: refs/heads/AMBARI-2.4.2.16
Commit: 8e34693e7d70d53f57ff9ee1bff4058b0dafaeb7
Parents: cab680c
Author: Jayush Luniya <jl...@hortonworks.com>
Authored: Tue Nov 15 23:25:44 2016 -0800
Committer: Jayush Luniya <jl...@hortonworks.com>
Committed: Wed Nov 16 08:20:15 2016 +0000
----------------------------------------------------------------------
ambari-server/src/main/python/ambari_server/setupMpacks.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ambari/blob/8e34693e/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
old mode 100644
new mode 100755
index cdbdd16..0d7905e
--- a/ambari-server/src/main/python/ambari_server/setupMpacks.py
+++ b/ambari-server/src/main/python/ambari_server/setupMpacks.py
@@ -637,9 +637,7 @@ def _install_mpack(options, replay_mode=False, is_upgrade=False):
_execute_hook(mpack_metadata, BEFORE_INSTALL_HOOK_NAME, tmp_root_dir)
# Purge previously installed stacks and management packs
- if options.purge:
- if not 'purge_list' in options:
- options.purge_list = ",".join([STACK_DEFINITIONS_RESOURCE_NAME, MPACKS_RESOURCE_NAME])
+ if options.purge and options.purge_list:
purge_resources = options.purge_list.split(",")
validate_purge(options, purge_resources, tmp_root_dir, mpack_metadata, replay_mode)
purge_stacks_and_mpacks(purge_resources, replay_mode)
@@ -822,6 +820,8 @@ def replay_mpack_logs():
print_info_msg(replay_log)
print_info_msg("===========================================================================================")
replay_options = _named_dict(ast.literal_eval(replay_log))
+ if 'purge_list' not in replay_options:
+ replay_options.purge_list = ",".join([STACK_DEFINITIONS_RESOURCE_NAME, MPACKS_RESOURCE_NAME])
if replay_options.mpack_command == INSTALL_MPACK_ACTION:
install_mpack(replay_options, replay_mode=True)
elif replay_options.mpack_command == UPGRADE_MPACK_ACTION: