Skip to content
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

Merged
merged 4 commits into from Apr 11, 2018
Merged

Conversation

jonathan-hurley
Copy link
Member

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:

  • Added the mpack ID to the command reports from the agent:
    -- `'mpackId': command['mpackId'] if 'mpackId' in command else None``
  • Adjusted the signatures of methods which build tasks to take an mpack ID
  • Changed the 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.

@jonathan-hurley jonathan-hurley added the repos OS & Repository Management label Apr 10, 2018
@jonathan-hurley jonathan-hurley self-assigned this Apr 10, 2018
@asfgit
Copy link

asfgit commented Apr 11, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/1756/
Test FAILed.
Test FAILured.

@asfgit
Copy link

asfgit commented Apr 11, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/1758/
Test FAILed.
Test FAILured.

@hapylestat
Copy link
Contributor

hapylestat commented Apr 11, 2018

well, in general: the biggest problem is the situation like below:

-    Cluster cluster = heartbeatTestHelper.getDummyCluster();
+    heartbeatTestHelper.getDummyCluster();

i think here it is better to remove not used line completely, instead of removing only unused variable

@jonathan-hurley
Copy link
Member Author

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.

@asfgit
Copy link

asfgit commented Apr 11, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/1777/
Test FAILed.
Test FAILured.

@jonathan-hurley jonathan-hurley merged commit 7ca1a5a into apache:branch-feature-AMBARI-14714 Apr 11, 2018
@jonathan-hurley jonathan-hurley deleted the AMBARI-23246 branch April 11, 2018 17:11
@asfgit
Copy link

asfgit commented Apr 11, 2018

Refer to this link for build results (access rights to CI server needed):
https://builds.apache.org/job/Ambari-Github-PullRequest-Builder/1789/
Test FAILed.
Test FAILured.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
repos OS & Repository Management
Projects
None yet
3 participants