ambari-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlun...@apache.org
Subject ambari git commit: AMBARI-18637: Management pack purge option should warn user and ask for confirmation before purging - addendum (jluniya)
Date Tue, 15 Nov 2016 19:40:13 GMT
Repository: ambari
Updated Branches:
  refs/heads/branch-2.5 2a859ff73 -> fb056d9c5


AMBARI-18637: Management pack purge option should warn user and ask for confirmation before
purging - addendum (jluniya)


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

Branch: refs/heads/branch-2.5
Commit: fb056d9c5aa9b383b38cdd59a4b54a3c0fd36852
Parents: 2a859ff
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 11:40:01 2016 -0800

----------------------------------------------------------------------
 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/fb056d9c/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 f0c4f86..b6d9051 100644
--- a/ambari-server/src/main/python/ambari_server/setupMpacks.py
+++ b/ambari-server/src/main/python/ambari_server/setupMpacks.py
@@ -640,7 +640,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