From: Zack Cerza Date: Tue, 26 Jan 2016 17:37:20 +0000 (-0700) Subject: lock_machines(): Use dead status for lock failures X-Git-Tag: 1.1.0~684^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5afcede055d39b7e2d8d975683e207ba6574fff5;p=teuthology.git lock_machines(): Use dead status for lock failures Signed-off-by: Zack Cerza --- diff --git a/teuthology/task/internal.py b/teuthology/task/internal.py index 8be59843e..1d80ba5da 100644 --- a/teuthology/task/internal.py +++ b/teuthology/task/internal.py @@ -110,8 +110,14 @@ def lock_machines(ctx, config): assert 0, ('not enough machines free; need %s + %s, have %s' % (reserved, requested, len(machines))) - newly_locked = lock.lock_many(ctx, requested, machine_type, ctx.owner, - ctx.archive, os_type, os_version, arch) + try: + newly_locked = lock.lock_many(ctx, requested, machine_type, + ctx.owner, ctx.archive, os_type, + os_version, arch) + except Exception: + # Lock failures should map to the 'dead' status instead of 'fail' + set_status(ctx.summary, 'dead') + raise all_locked.update(newly_locked) log.info( '{newly_locked} {mtype} machines locked this try, '