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-22805] Blueprints do not handle some failures properly #146

Conversation

adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

Introduce ABORTED state for topology host requests (cluster creation, scale hosts) to handle errors that happen in the pre-stage phase (during configure cluster task and other topology tasks). Return such state and cause of failure in requests API (cause is returned in request_context).

https://issues.apache.org/jira/browse/AMBARI-22805

How was this patch tested?

Tested the following scenarios:

  • cluster installation from scratch:
    • successful one
    • with wrong Kerberos admin credential
    • invalid blueprint (no NAMENODE)
  • upscale cluster:
    • directly after install
    • scale request before restart, agent started after server restart
    • both scale request and agent start issued after restart
  • upscale cluster with missing Kerberos credentials (same scenarios)
  • upgrade from Ambari 2.6.1
  • upscale cluster after upgrade

Unit tests:

...
Tests run: 4943, Failures: 0, Errors: 0, Skipped: 34
...
Total run:1201
Total errors:0
Total failures:0
OK
...
BUILD SUCCESS

Sample failed cluster creation:

{
  "href" : "http://localhost:8080/api/v1/clusters/TEST/requests/1",
  "Requests" : {
    "cluster_name" : "TEST",
    "id" : 1,
    "progress_percent" : -1.0,
    "request_context" : "Logical Request: Provision Cluster 'TEST'\nFAILED: Missing KDC administrator credentials.",
    "request_status" : "ABORTED"
  }
}

@rnettleton @mhmxs

@asfgit
Copy link

asfgit commented Jan 18, 2018

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants