Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion teuthology/dispatcher/supervisor.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ def reimage(job_config):
try:
reimaged = lock_ops.reimage_machines(ctx, targets, job_config['machine_type'])
except Exception as e:
log.exception('Reimaging error. Nuking machines...')
log.exception('Reimaging error. Unlocking machines...')
unlock_targets(job_config)
# Reimage failures should map to the 'dead' status instead of 'fail'
report.try_push_job_info(
Expand Down
7 changes: 6 additions & 1 deletion teuthology/lock/ops.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,12 @@ def lock_many(ctx, num, machine_type, user=None, description=None,
update_nodes(ok_machs)
return ok_machs
elif reimage and machine_type in reimage_types:
return reimage_machines(ctx, machines, machine_type)
try:
return reimage_machines(ctx, machines, machine_type)
except Exception:
log.exception('Reimaging error. Unlocking machines...')
unlock_many(machines, user)
continue
return machines
elif response.status_code == 503:
log.error('Insufficient nodes available to lock %d %s nodes.',
Expand Down
Loading