Compact nailgun hook error message
This change change error message by adding '\n\n' before error details which give Fuel UI ability to hide this part of message. Change-Id: I2e93ee3aa0aae183cd320d2438f781a975c5e70f Closes-Bug: #1614422
This commit is contained in:
parent
7d69504cf6
commit
3905cab1ea
|
@ -57,9 +57,9 @@ module Astute
|
||||||
end
|
end
|
||||||
error_message = 'Failed to execute hook'
|
error_message = 'Failed to execute hook'
|
||||||
error_message += " '#{hook_name}'" if hook_name
|
error_message += " '#{hook_name}'" if hook_name
|
||||||
error_message += " #{hook_return['error']}"
|
error_message += "\n\n#{hook_return['error']}"
|
||||||
@ctx.report_and_update_status('nodes' => nodes, 'error' => error_message)
|
@ctx.report_and_update_status('nodes' => nodes, 'error' => error_message)
|
||||||
error_message += "\n\n#{hook.to_yaml}"
|
error_message += "#{hook.to_yaml}"
|
||||||
|
|
||||||
raise Astute::DeploymentEngineError, error_message
|
raise Astute::DeploymentEngineError, error_message
|
||||||
|
|
||||||
|
|
|
@ -304,7 +304,7 @@ describe Astute::NailgunHooks do
|
||||||
'error_msg' => error_msg
|
'error_msg' => error_msg
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
'error' => "Failed to execute hook 'shell-example-1.0' #{error_msg}"
|
'error' => "Failed to execute hook 'shell-example-1.0'\n\n#{error_msg}"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -478,7 +478,7 @@ describe Astute::NailgunHooks do
|
||||||
'error_msg' => error_msg
|
'error_msg' => error_msg
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
'error' => "Failed to execute hook 'copy-example-1.0' #{error_msg}"
|
'error' => "Failed to execute hook 'copy-example-1.0'\n\n#{error_msg}"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -1073,7 +1073,7 @@ describe Astute::NailgunHooks do
|
||||||
'error_msg' => error_msg
|
'error_msg' => error_msg
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
'error' => "Failed to execute hook 'puppet-example-1.0' #{error_msg}"
|
'error' => "Failed to execute hook 'puppet-example-1.0'\n\n#{error_msg}"
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue