From: Alfredo Deza Date: Mon, 2 Dec 2013 19:14:25 +0000 (-0500) Subject: refuse to purgedata if ceph is installed X-Git-Tag: v1.3.4~6^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2939d766b14b23613e9c6dd0693ca5d22d21cc88;p=ceph-deploy.git refuse to purgedata if ceph is installed Signed-off-by: Alfredo Deza --- diff --git a/ceph_deploy/install.py b/ceph_deploy/install.py index bfd08fc..cdc6bb2 100644 --- a/ceph_deploy/install.py +++ b/ceph_deploy/install.py @@ -1,6 +1,5 @@ import argparse import logging -from distutils.util import strtobool import os from . import hosts @@ -112,10 +111,8 @@ def purge_data(args): distro.conn.exit() if installed_hosts: - print "ceph is still installed on: ", installed_hosts - answer = raw_input("Continue (y/n)") - if not strtobool(answer): - return + LOG.error("ceph is still installed on: ", installed_hosts) + raise RuntimeError("refusing to purge data while ceph is still installed") for hostname in args.host: distro = hosts.get(hostname, username=args.username)