ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rz...@apache.org
Subject [19/51] [abbrv] ambari git commit: AMBARI-18637: Management pack purge option should warn user and ask for confirmation before purging - addendum (jluniya)
Date Mon, 27 Mar 2017 22:57:29 GMT
AMBARI-18637: Management pack purge option should warn user and ask for confirmation before
purging - addendum (jluniya)

(cherry picked from commit b637bb15c5955b497c9573c3c84b5a12e09bf6ef)

Change-Id: Id0c8f881e8adb2eb4a74f5996ab29740d736406d


Project: http://git-wip-us.apache.org/repos/asf/ambari/repo
Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/cab680c8
Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/cab680c8
Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/cab680c8

Branch: refs/heads/AMBARI-2.4.2.16
Commit: cab680c82c53018f7213d62dc5509edfd02627d6
Parents: b5325dc
Author: Jayush Luniya <jluniya@hortonworks.com>
Authored: Tue Nov 15 11:39:16 2016 -0800
Committer: Jayush Luniya <jluniya@hortonworks.com>
Committed: Tue Nov 15 20:25:14 2016 +0000

----------------------------------------------------------------------
 ambari-server/src/main/python/ambari_server/setupMpacks.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ambari/blob/cab680c8/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 a70e75e..cdbdd16 100644
--- a/ambari-server/src/main/python/ambari_server/setupMpacks.py
+++ b/ambari-server/src/main/python/ambari_server/setupMpacks.py
@@ -637,7 +637,9 @@ 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 and options.purge_list:
+  if options.purge:
+    if not 'purge_list' in options:
+      options.purge_list = ",".join([STACK_DEFINITIONS_RESOURCE_NAME, MPACKS_RESOURCE_NAME])
     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)


Mime
View raw message