Ensure all errors are passed during cleaning
Related Bug: https://bugs.launchpad.net/ironic/+bug/1628422 This change makes sure that the caught error is passed through to node_history_record() Change-Id: I9b78ec37f37024d04928403bbf0b85ed96906441
This commit is contained in:
parent
7ca3995267
commit
41ee6aa2ff
|
@ -480,7 +480,10 @@ def cleaning_error_handler(task, logmsg, errmsg=None, traceback=False,
|
|||
msg2 = ('Failed to tear down cleaning on node %(uuid)s, '
|
||||
'reason: %(err)s' % {'err': e, 'uuid': node.uuid})
|
||||
LOG.exception(msg2)
|
||||
errmsg = _('%s. Also failed to tear down cleaning.') % errmsg
|
||||
errmsg = _(
|
||||
'%(orig_err)s. '
|
||||
'Also %(msg2)s'
|
||||
) % {'orig_err': errmsg, 'msg2': msg2}
|
||||
|
||||
if node.provision_state in (
|
||||
states.CLEANING,
|
||||
|
|
Loading…
Reference in New Issue