You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ambari.apache.org by ad...@apache.org on 2019/02/04 14:22:19 UTC
[ambari] branch trunk updated: AMBARI-25020. Allow unattended mpack
install with purge (#2794)
This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ambari.git
The following commit(s) were added to refs/heads/trunk by this push:
new b2a0297 AMBARI-25020. Allow unattended mpack install with purge (#2794)
b2a0297 is described below
commit b2a0297051a9603ab695b640ba37bc13e90877a1
Author: Doroszlai, Attila <64...@users.noreply.github.com>
AuthorDate: Mon Feb 4 15:22:13 2019 +0100
AMBARI-25020. Allow unattended mpack install with purge (#2794)
---
ambari-server/src/main/python/ambari_server/setupMpacks.py | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/ambari-server/src/main/python/ambari_server/setupMpacks.py b/ambari-server/src/main/python/ambari_server/setupMpacks.py
index b8c0974..640cc2f 100755
--- a/ambari-server/src/main/python/ambari_server/setupMpacks.py
+++ b/ambari-server/src/main/python/ambari_server/setupMpacks.py
@@ -347,11 +347,12 @@ def validate_purge(options, purge_list, mpack_dir, mpack_metadata, replay_mode=F
if not replay_mode:
purge_resources = set((v) for k, v in RESOURCE_FRIENDLY_NAMES.iteritems() if k in purge_list)
+ answer = 'yes' if options.silent else 'no'
warn_msg = "CAUTION: You have specified the --purge option with --purge-list={0}. " \
"This will replace all existing {1} currently installed.\n" \
- "Are you absolutely sure you want to perform the purge [yes/no]? (no)".format(
- purge_list, ", ".join(purge_resources))
- okToPurge = get_YN_input(warn_msg, False)
+ "Are you absolutely sure you want to perform the purge [yes/no]? ({2})".format(
+ purge_list, ", ".join(purge_resources), answer)
+ okToPurge = get_YN_input(warn_msg, options.silent, answer)
if not okToPurge:
err = "Management pack installation cancelled by user"
raise FatalException(1, err)