From 9158c83167bab7ea8d2a711b800dedcc8b43d7a3 Mon Sep 17 00:00:00 2001 From: Josh Durgin Date: Wed, 6 Jul 2011 15:55:17 -0700 Subject: [PATCH] Verify that machines are locked before nuking them. --- teuthology/run.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/teuthology/run.py b/teuthology/run.py index 8e75cc3a1ae3e..5afea491458c1 100644 --- a/teuthology/run.py +++ b/teuthology/run.py @@ -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', -- 2.39.5