New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AMBARI-23206 - Use Agent Command Response To Update Mpack Install State #668
AMBARI-23206 - Use Agent Command Response To Update Mpack Install State #668
Conversation
Refer to this link for build results (access rights to CI server needed): |
Logger.info("Reporting installation state for {0}".format(command_repository)) | ||
|
||
self.put_structured_out({"mpackId": command_repository.mpack_id}) | ||
self.put_structured_out({"mpackName":command_repository.mpack_id}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this for the future? The id is the mpackName?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, this is a bug - nice catch. Turns out we're not actually using the mpack name in the structured output, but I'll update it to be correct.
… structured output of the mpack associated with the command
*/ | ||
private static class InstallCommandStructuredOutput { | ||
/** | ||
* Either SUCCESS or FAIL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can it be IN_PROGRESS or something like that? Would agent send FAIL after sudden agent restart?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, actually - I don't even think this field is going to be used. The CommandReportReceivedEvent
is only sent when the command is in a completed state:
if (HostRoleStatus.valueOf(report.getStatus()).isCompletedState()) {
CommandReportReceivedEvent event = new CommandReportReceivedEvent(
clusterId, hostname, report);
commandReportEventPublisher.publish(event);
}
Refer to this link for build results (access rights to CI server needed): |
Refer to this link for build results (access rights to CI server needed): |
What changes were proposed in this pull request?
A continuation of AMBARI-23205, this will allow commands (like INSTALL and install_packages) to update the management pack installation state. They currently are stuck at NOT_INSTALLED.
How was this patch tested?
Manual testing of installation states.