From 33bf3ee3cf4f911a00c5231d58368269223fd899 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Fri, 21 Jun 2019 09:02:58 -0400 Subject: [PATCH] Add confirmation to cluster init --- client-cli/pvc.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/client-cli/pvc.py b/client-cli/pvc.py index ec8771c8..61f30bad 100755 --- a/client-cli/pvc.py +++ b/client-cli/pvc.py @@ -1504,8 +1504,11 @@ def init_cluster(): Perform initialization of a new PVC cluster. """ - import pvc_init - pvc_init.init_zookeeper(zk_host) + click.echo('DANGER: This will remove any existing cluster on these coordinators and create a new cluster. Any existing resources on the old cluster will be left abandoned.'.format(name)) + choice = input('Are you sure you want to do this? (y/N) ') + if choice == 'y' or choice == 'Y': + import pvc_init + pvc_init.init_zookeeper(zk_host) ###############################################################################