From 2c88757882ed1f74eab85397972846ce3452eb86 Mon Sep 17 00:00:00 2001 From: Warren Usui Date: Wed, 14 Aug 2013 10:31:21 -0700 Subject: [PATCH] Revert "Display error message when locking a vpm fails due to downburst errors." This reverts commit 4681b35016619ece44730a368070220e6c2e56a3. --- teuthology/lock.py | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/teuthology/lock.py b/teuthology/lock.py index 79f88d8cbd38d..e98444e763243 100644 --- a/teuthology/lock.py +++ b/teuthology/lock.py @@ -29,13 +29,8 @@ def lock_many(ctx, num, machinetype, user=None, description=None): machines = json.loads(content) log.debug('locked {machines}'.format(machines=', '.join(machines.keys()))) if ctx.machine_type == 'vps': - ok_machs = {} for machine in machines: - if create_if_vm(ctx, machine): - ok_machs[machine] = machines[machine] - else: - unlock(ctx, machine) - return ok_machs + create_if_vm(ctx, machine) return machines if status == 503: log.error('Insufficient nodes available to lock %d nodes.', num) @@ -62,7 +57,7 @@ def unlock(ctx, name, user=None): if success: log.debug('unlocked %s', name) if not destroy_if_vm(ctx, name): - log.info('downburst destroy failed for %s',name) + log.error('downburst destroy failed for %s',name) else: log.error('failed to unlock %s', name) return success @@ -383,11 +378,6 @@ Lock, unlock, or query lock status of machines. if ctx.machine_type == 'vps': shortnames = ' '.join([name.split('@')[1].split('.')[0] for name in result.keys()]) print "Successfully Locked:\n%s\n" % shortnames - if len(result) < ctx.num_to_lock: - print "Error: Locking failed." - for machn in result: - unlock(ctx,machn) - return 1 print "Unable to display keys at this time (virtual machines are booting)." print "Please run teuthology-lock --list-targets %s once these machines come up." % shortnames else: @@ -606,7 +596,7 @@ def create_if_vm(ctx, machine_name): metadata = "--meta-data=%s" % tmp.name dbrst = _get_downburst_exec() if not dbrst: - log.error("No downburst executable found.") + log.info("Error: no downburst executable found") return False p = subprocess.Popen([dbrst, '-c', phys_host, 'create', metadata, createMe], -- 2.39.5