Trivial: shorten the deploy/clean step failure message
It looks like this now: Agent returned error for deploy step {'step': 'write_image', 'priority': 80, 'argsinfo': None, 'interface': 'deploy'} on node 878c3113-0035-5033-9f99-46520b89b56d : Error performing deploy_step write_image: <next level error message> Change-Id: Iabfb802cbfb96a9a02d6811f450f151623d5ca1f
This commit is contained in:
parent
8ea1a438d3
commit
a76fc6f54e
|
@ -1060,12 +1060,12 @@ class AgentDeployMixin(HeartbeatMixin, AgentOobStepsMixin):
|
||||||
return
|
return
|
||||||
|
|
||||||
if command.get('command_status') == 'FAILED':
|
if command.get('command_status') == 'FAILED':
|
||||||
msg = (_('Agent returned error for %(type)s step %(step)s on node '
|
msg = (_('%(type)s step %(step)s failed on node %(node)s. '
|
||||||
'%(node)s : %(err)s.') %
|
'%(err)s') %
|
||||||
{'node': node.uuid,
|
{'node': node.uuid,
|
||||||
'err': agent_client.get_command_error(command),
|
'err': agent_client.get_command_error(command),
|
||||||
'step': current_step,
|
'step': conductor_steps.step_id(current_step),
|
||||||
'type': step_type})
|
'type': step_type.capitalize()})
|
||||||
return _step_failure_handler(task, msg, step_type)
|
return _step_failure_handler(task, msg, step_type)
|
||||||
# NOTE(dtantsur): VERSION_MISMATCH is a new alias for
|
# NOTE(dtantsur): VERSION_MISMATCH is a new alias for
|
||||||
# CLEAN_VERSION_MISMATCH, remove the old one after IPA removes it.
|
# 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'],
|
with task_manager.acquire(self.context, self.node['uuid'],
|
||||||
shared=False) as task:
|
shared=False) as task:
|
||||||
|
task.node.clean_step = {
|
||||||
|
'step': 'erase_devices',
|
||||||
|
'interface': 'deploy',
|
||||||
|
}
|
||||||
self.deploy.continue_cleaning(task)
|
self.deploy.continue_cleaning(task)
|
||||||
error_mock.assert_called_once_with(task, mock.ANY, traceback=False)
|
error_mock.assert_called_once_with(task, mock.ANY, traceback=False)
|
||||||
collect_logs_mock.assert_called_once_with(task.node,
|
collect_logs_mock.assert_called_once_with(task.node,
|
||||||
|
|
Loading…
Reference in New Issue