]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Verify that machines are locked before nuking them.
authorJosh Durgin <josh.durgin@dreamhost.com>
Wed, 6 Jul 2011 22:55:17 +0000 (15:55 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Thu, 7 Jul 2011 19:35:11 +0000 (12:35 -0700)
teuthology/run.py

index 8e75cc3a1ae3e950ce666543bb896a1a23c815f1..5afea491458c1e736393017a0b7d2f96d211466e 100644 (file)
@@ -157,20 +157,14 @@ def nuke():
         )
 
     log.info('\n  '.join(['targets:', ] + yaml.safe_dump(ctx.config['targets'], default_flow_style=False).splitlines()))
-    log.info('Opening connections...')
 
-    from orchestra import connection, remote, run
-    import orchestra.cluster
-
-    remotes = [remote.Remote(name=t, ssh=connection.connect(t))
-               for t in ctx.config['targets']]
-    ctx.cluster = orchestra.cluster.Cluster()
-
-    for rem, name in zip(remotes, ctx.config['targets']):
-        ctx.cluster.add(rem, name)
+    from teuthology.task.internal import check_lock, connect
+    check_lock(ctx, None)
+    connect(ctx, None)
 
     log.info('Killing daemons, unmounting, and removing data...')
 
+    from orchestra import run
     ctx.cluster.run(
         args=[
             'killall',