]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-deploy.git/commitdiff
refuse to purgedata if ceph is installed
authorAlfredo Deza <alfredo.deza@inktank.com>
Mon, 2 Dec 2013 19:14:25 +0000 (14:14 -0500)
committerAlfredo Deza <alfredo.deza@inktank.com>
Mon, 2 Dec 2013 19:46:37 +0000 (14:46 -0500)
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
ceph_deploy/install.py

index bfd08fc31794032934381903793cbb48ec3ea67a..cdc6bb25720289e51a293eefd6be07aea5547435 100644 (file)
@@ -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)