Description of problem: The configure hook will return an error message starting with "Source Code repository" if there is a problem with the external repository URL. The field for the message returned from the broker should hint to the UI that the dialogue box with incorrect information is Source Code and not Public Url. According to Clayton, this is done by setting 'field' => 'initial_git_url'. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Log into the UI 2. Create an application with an external Source Code repository 3. Specify an invalid repository such as "https://github.com/openshift/nothing.git" Actual results: The error message is properly displayed but the "Public URL" dialogue box is highlighted. Expected results: The "Source Code" dialogue box is highlighted. Additional info:
We can't really do this unless the node communicates something back to the broker what value caused the problem. Do we want to add a another directive like ERROR_FIELD: Or is init_git_url special enough that we want to reserve an exit code for it?
Do we have a list of reserved exit codes? I think it makes the most sense to have cartridge hooks and node calls set ERROR_FIELD based on the argument that they had a problem with. The broker call can adjust the value of Message.field its returning based on how it translated arguments to make the mcollective call. If there's agreement, I'll make the node changes for this ticket.
There is only 1 reserved exit code from the node. 127 meaning the hook isn't found. Thinking about this a little bit more we can add something more than :output from the agent. We can define more fields like: :error_field :error_message And anything at the agent (platform) level should be able to set these.
Moved to a new Trello card as this is really a new feature request. https://trello.com/card/return-which-parameter-failed-back-to-the-broker/50fc6814d58223727e0074e4/3