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-24158] Provide a way to disable topology validation in cluster creation request #1593

Merged

Conversation

adoroszlai
Copy link
Contributor

@adoroszlai adoroszlai commented Jun 21, 2018

What changes were proposed in this pull request?

Allow passing ?validate_topology=false in the cluster creation request to disable topology validation.

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

How was this patch tested?

  1. Tested with invalid blueprint:

    Submitted cluster creation request for a blueprint with invalid topology (HDFS components except NAMENODE).

    Result with validation:

    { "status" : 400, "message" : "Topology validation failed: org.apache.ambari.server.topology.InvalidTopologyException: Cluster Topology validation failed. Invalid service component count: [Component{name=NAMENODE, mpack_instance=null, service_instance=null, provision_action=INSTALL_AND_START} (actual=0, expected=1-2)]. To disable topology validation and create the blueprint, add the following to the end of the url: '?validate_topology=false'" }
    

    Result With validation disabled:

    { "Requests" : { "id" : 1, "status" : "Accepted" } }
    

    (Of course cluster creation fails later.)

  2. Tested with a valid blueprint that triggers auto-deployment of some client component. Verified that the client was not added when validate_topology=false was included.

  3. Tested without specifying validate_topology. Verified that validation is performed by default.

@adoroszlai adoroszlai self-assigned this Jun 21, 2018
@asfgit
Copy link

asfgit commented Jun 21, 2018

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

@adoroszlai adoroszlai merged commit 0dd9fee into apache:branch-feature-AMBARI-14714 Jun 22, 2018
@adoroszlai adoroszlai deleted the AMBARI-24158 branch June 22, 2018 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants