Merge "Trivial: shorten the deploy/clean step failure message"

This commit is contained in:
Zuul 2021-09-09 17:32:53 +00:00 committed by Gerrit Code Review
commit f8763bae57
2 changed files with 8 additions and 4 deletions
ironic
drivers/modules
tests/unit/drivers/modules

@ -1060,12 +1060,12 @@ class AgentDeployMixin(HeartbeatMixin, AgentOobStepsMixin):
return
if command.get('command_status') == 'FAILED':
msg = (_('Agent returned error for %(type)s step %(step)s on node '
'%(node)s : %(err)s.') %
msg = (_('%(type)s step %(step)s failed on node %(node)s. '
'%(err)s') %
{'node': node.uuid,
'err': agent_client.get_command_error(command),
'step': current_step,
'type': step_type})
'step': conductor_steps.step_id(current_step),
'type': step_type.capitalize()})
return _step_failure_handler(task, msg, step_type)
# NOTE(dtantsur): VERSION_MISMATCH is a new alias for
# CLEAN_VERSION_MISMATCH, remove the old one after IPA removes it.

@ -1703,6 +1703,10 @@ class AgentDeployMixinTest(AgentDeployMixinBaseTest):
}]
with task_manager.acquire(self.context, self.node['uuid'],
shared=False) as task:
task.node.clean_step = {
'step': 'erase_devices',
'interface': 'deploy',
}
self.deploy.continue_cleaning(task)
error_mock.assert_called_once_with(task, mock.ANY, traceback=False)
collect_logs_mock.assert_called_once_with(task.node,