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-23246 - Pass Mpack ID In Agent Commands For Installation Updates #963
AMBARI-23246 - Pass Mpack ID In Agent Commands For Installation Updates #963
Conversation
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): |
well, in general: the biggest problem is the situation like below:
i think here it is better to remove not used line completely, instead of removing only unused variable |
Ugh - I figured out what setting was causing this in my IDE and I turned it off. I guess we have a lot of unused variables :) ... I'll revert those changes or just get rid of the lines entirely. |
…removal option.
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?
When an mpack is initially registered in Ambari, we will create {{NOT_INSTALLED}} records for it on every host. During a normal installation, the resource provider will set the correct rows to a value of {{INSTALLING}}.
However, on a blueprint deployment or initial cluster deployment, this doesn't happen. As a result, the value stays at {{NOT_INSTALLED}} until the installation commands come back.
If for some reason the installation command fails (aborts, times out, etc), then there will be no structured output indicating the mpack which was attempted. Therefore, we cannot find the right values to lookup.
This Jira will allow the mpack ID to be set on the command so that it doesn't need to be specifically reported by an agent.
To summary some of the code changes so they are easier to see:
-- `'mpackId': command['mpackId'] if 'mpackId' in command else None``
MpackInstallStateListener.java
to use the value from the command report if the structured output can't be parsed.How was this patch tested?
Manually testing for now. The unit tests are in a pretty bad state, so I'll see how many I can clean up while this review is open.