You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@ambari.apache.org by Sebastian Toader <st...@hortonworks.com> on 2016/03/31 16:28:15 UTC

Review Request 45544: During cluster creation using Blueprints the cluster creation request has incorrect COMPLETED state instead of PENDING.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45544/
-----------------------------------------------------------

Review request for Ambari, Daniel Gergely, Oliver Szabo, and Sandor Magyari.


Bugs: AMBARI-15643
    https://issues.apache.org/jira/browse/AMBARI-15643


Repository: ambari


Description
-------

*Problem*
*After the cluster creation template posted to Ambari (via the REST Api) to provision a cluster using Blueprints is accepted for processing Ambari returns in the response the url of the request through which the status/progress of the cluster creation can be tracked.
When querying the status of the request it erroneously returns "COMPLETED" instead of returning "PENDING" until the first task of the cluster creation is scheduled to be executed on one of the cluster nodes. Once at least one task is scheduled to be executed the status of the request should change to "IN_PROGRESS". The "COMPLETED" state should be reached when all tasks completed succesfully.

*Resolution*
Make distinction between requests initiated from the UI and Blueprints. If the request is a request for Blueprint provisioned clusters and there are no host level tasks available than the request status derivation logic to default to PENDING.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java d00ce58 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java 4a76a1c 

Diff: https://reviews.apache.org/r/45544/diff/


Testing
-------

Manual testing and unit tests:

Results :

Tests run: 3543, Failures: 0, Errors: 0, Skipped: 36


Thanks,

Sebastian Toader


Re: Review Request 45544: During cluster creation using Blueprints the cluster creation request has incorrect COMPLETED state instead of PENDING.

Posted by Oliver Szabo <os...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45544/#review126308
-----------------------------------------------------------


Ship it!




Ship It!

- Oliver Szabo


On March 31, 2016, 2:28 p.m., Sebastian Toader wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45544/
> -----------------------------------------------------------
> 
> (Updated March 31, 2016, 2:28 p.m.)
> 
> 
> Review request for Ambari, Daniel Gergely, Oliver Szabo, and Sandor Magyari.
> 
> 
> Bugs: AMBARI-15643
>     https://issues.apache.org/jira/browse/AMBARI-15643
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> *Problem*
> *After the cluster creation template posted to Ambari (via the REST Api) to provision a cluster using Blueprints is accepted for processing Ambari returns in the response the url of the request through which the status/progress of the cluster creation can be tracked.
> When querying the status of the request it erroneously returns "COMPLETED" instead of returning "PENDING" until the first task of the cluster creation is scheduled to be executed on one of the cluster nodes. Once at least one task is scheduled to be executed the status of the request should change to "IN_PROGRESS". The "COMPLETED" state should be reached when all tasks completed succesfully.
> 
> *Resolution*
> Make distinction between requests initiated from the UI and Blueprints. If the request is a request for Blueprint provisioned clusters and there are no host level tasks available than the request status derivation logic to default to PENDING.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java d00ce58 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java 4a76a1c 
> 
> Diff: https://reviews.apache.org/r/45544/diff/
> 
> 
> Testing
> -------
> 
> Manual testing and unit tests:
> 
> Results :
> 
> Tests run: 3543, Failures: 0, Errors: 0, Skipped: 36
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>


Re: Review Request 45544: During cluster creation using Blueprints the cluster creation request has incorrect COMPLETED state instead of PENDING.

Posted by Sandor Magyari <sm...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45544/#review126306
-----------------------------------------------------------


Ship it!




Ship It!

- Sandor Magyari


On March 31, 2016, 2:28 p.m., Sebastian Toader wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45544/
> -----------------------------------------------------------
> 
> (Updated March 31, 2016, 2:28 p.m.)
> 
> 
> Review request for Ambari, Daniel Gergely, Oliver Szabo, and Sandor Magyari.
> 
> 
> Bugs: AMBARI-15643
>     https://issues.apache.org/jira/browse/AMBARI-15643
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> *Problem*
> *After the cluster creation template posted to Ambari (via the REST Api) to provision a cluster using Blueprints is accepted for processing Ambari returns in the response the url of the request through which the status/progress of the cluster creation can be tracked.
> When querying the status of the request it erroneously returns "COMPLETED" instead of returning "PENDING" until the first task of the cluster creation is scheduled to be executed on one of the cluster nodes. Once at least one task is scheduled to be executed the status of the request should change to "IN_PROGRESS". The "COMPLETED" state should be reached when all tasks completed succesfully.
> 
> *Resolution*
> Make distinction between requests initiated from the UI and Blueprints. If the request is a request for Blueprint provisioned clusters and there are no host level tasks available than the request status derivation logic to default to PENDING.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java d00ce58 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java 4a76a1c 
> 
> Diff: https://reviews.apache.org/r/45544/diff/
> 
> 
> Testing
> -------
> 
> Manual testing and unit tests:
> 
> Results :
> 
> Tests run: 3543, Failures: 0, Errors: 0, Skipped: 36
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>


Re: Review Request 45544: During cluster creation using Blueprints the cluster creation request has incorrect COMPLETED state instead of PENDING.

Posted by Daniel Gergely <dg...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45544/#review126307
-----------------------------------------------------------


Ship it!




Ship It!

- Daniel Gergely


On márc. 31, 2016, 2:28 du, Sebastian Toader wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45544/
> -----------------------------------------------------------
> 
> (Updated márc. 31, 2016, 2:28 du)
> 
> 
> Review request for Ambari, Daniel Gergely, Oliver Szabo, and Sandor Magyari.
> 
> 
> Bugs: AMBARI-15643
>     https://issues.apache.org/jira/browse/AMBARI-15643
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> *Problem*
> *After the cluster creation template posted to Ambari (via the REST Api) to provision a cluster using Blueprints is accepted for processing Ambari returns in the response the url of the request through which the status/progress of the cluster creation can be tracked.
> When querying the status of the request it erroneously returns "COMPLETED" instead of returning "PENDING" until the first task of the cluster creation is scheduled to be executed on one of the cluster nodes. Once at least one task is scheduled to be executed the status of the request should change to "IN_PROGRESS". The "COMPLETED" state should be reached when all tasks completed succesfully.
> 
> *Resolution*
> Make distinction between requests initiated from the UI and Blueprints. If the request is a request for Blueprint provisioned clusters and there are no host level tasks available than the request status derivation logic to default to PENDING.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java d00ce58 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java 4a76a1c 
> 
> Diff: https://reviews.apache.org/r/45544/diff/
> 
> 
> Testing
> -------
> 
> Manual testing and unit tests:
> 
> Results :
> 
> Tests run: 3543, Failures: 0, Errors: 0, Skipped: 36
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>


Re: Review Request 45544: During cluster creation using Blueprints the cluster creation request has incorrect COMPLETED state instead of PENDING.

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45544/#review126458
-----------------------------------------------------------


Ship it!




Ship It!

- Alejandro Fernandez


On March 31, 2016, 2:28 p.m., Sebastian Toader wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45544/
> -----------------------------------------------------------
> 
> (Updated March 31, 2016, 2:28 p.m.)
> 
> 
> Review request for Ambari, Daniel Gergely, Oliver Szabo, and Sandor Magyari.
> 
> 
> Bugs: AMBARI-15643
>     https://issues.apache.org/jira/browse/AMBARI-15643
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> *Problem*
> *After the cluster creation template posted to Ambari (via the REST Api) to provision a cluster using Blueprints is accepted for processing Ambari returns in the response the url of the request through which the status/progress of the cluster creation can be tracked.
> When querying the status of the request it erroneously returns "COMPLETED" instead of returning "PENDING" until the first task of the cluster creation is scheduled to be executed on one of the cluster nodes. Once at least one task is scheduled to be executed the status of the request should change to "IN_PROGRESS". The "COMPLETED" state should be reached when all tasks completed succesfully.
> 
> *Resolution*
> Make distinction between requests initiated from the UI and Blueprints. If the request is a request for Blueprint provisioned clusters and there are no host level tasks available than the request status derivation logic to default to PENDING.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java d00ce58 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java 4a76a1c 
> 
> Diff: https://reviews.apache.org/r/45544/diff/
> 
> 
> Testing
> -------
> 
> Manual testing and unit tests:
> 
> Results :
> 
> Tests run: 3543, Failures: 0, Errors: 0, Skipped: 36
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>


Re: Review Request 45544: During cluster creation using Blueprints the cluster creation request has incorrect COMPLETED state instead of PENDING.

Posted by Jayush Luniya <jl...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45544/#review126459
-----------------------------------------------------------


Ship it!




Ship It!

- Jayush Luniya


On March 31, 2016, 2:28 p.m., Sebastian Toader wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45544/
> -----------------------------------------------------------
> 
> (Updated March 31, 2016, 2:28 p.m.)
> 
> 
> Review request for Ambari, Daniel Gergely, Oliver Szabo, and Sandor Magyari.
> 
> 
> Bugs: AMBARI-15643
>     https://issues.apache.org/jira/browse/AMBARI-15643
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> *Problem*
> *After the cluster creation template posted to Ambari (via the REST Api) to provision a cluster using Blueprints is accepted for processing Ambari returns in the response the url of the request through which the status/progress of the cluster creation can be tracked.
> When querying the status of the request it erroneously returns "COMPLETED" instead of returning "PENDING" until the first task of the cluster creation is scheduled to be executed on one of the cluster nodes. Once at least one task is scheduled to be executed the status of the request should change to "IN_PROGRESS". The "COMPLETED" state should be reached when all tasks completed succesfully.
> 
> *Resolution*
> Make distinction between requests initiated from the UI and Blueprints. If the request is a request for Blueprint provisioned clusters and there are no host level tasks available than the request status derivation logic to default to PENDING.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java d00ce58 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java 4a76a1c 
> 
> Diff: https://reviews.apache.org/r/45544/diff/
> 
> 
> Testing
> -------
> 
> Manual testing and unit tests:
> 
> Results :
> 
> Tests run: 3543, Failures: 0, Errors: 0, Skipped: 36
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>


Re: Review Request 45544: During cluster creation using Blueprints the cluster creation request has incorrect COMPLETED state instead of PENDING.

Posted by Sebastian Toader <st...@hortonworks.com>.

> On March 31, 2016, 7:48 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java, line 512
> > <https://reviews.apache.org/r/45544/diff/1/?file=1320801#file1320801line512>
> >
> >     Does this only affect blueprints?

Yes this impact only cluster provisioning using Blueprints. Logical request is created only for Blueprints. I removed the *logicalRequest.hasCompleted()* as that  doesn't tell us if the request completed or not. What it tells is whether all hosts requested in the cluster creation template are known to Ambari server and these were assigned to hostgroups.


- Sebastian


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45544/#review126368
-----------------------------------------------------------


On March 31, 2016, 4:28 p.m., Sebastian Toader wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45544/
> -----------------------------------------------------------
> 
> (Updated March 31, 2016, 4:28 p.m.)
> 
> 
> Review request for Ambari, Daniel Gergely, Oliver Szabo, and Sandor Magyari.
> 
> 
> Bugs: AMBARI-15643
>     https://issues.apache.org/jira/browse/AMBARI-15643
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> *Problem*
> *After the cluster creation template posted to Ambari (via the REST Api) to provision a cluster using Blueprints is accepted for processing Ambari returns in the response the url of the request through which the status/progress of the cluster creation can be tracked.
> When querying the status of the request it erroneously returns "COMPLETED" instead of returning "PENDING" until the first task of the cluster creation is scheduled to be executed on one of the cluster nodes. Once at least one task is scheduled to be executed the status of the request should change to "IN_PROGRESS". The "COMPLETED" state should be reached when all tasks completed succesfully.
> 
> *Resolution*
> Make distinction between requests initiated from the UI and Blueprints. If the request is a request for Blueprint provisioned clusters and there are no host level tasks available than the request status derivation logic to default to PENDING.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java d00ce58 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java 4a76a1c 
> 
> Diff: https://reviews.apache.org/r/45544/diff/
> 
> 
> Testing
> -------
> 
> Manual testing and unit tests:
> 
> Results :
> 
> Tests run: 3543, Failures: 0, Errors: 0, Skipped: 36
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>


Re: Review Request 45544: During cluster creation using Blueprints the cluster creation request has incorrect COMPLETED state instead of PENDING.

Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/45544/#review126368
-----------------------------------------------------------




ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java (line 512)
<https://reviews.apache.org/r/45544/#comment189362>

    Does this only affect blueprints?


- Alejandro Fernandez


On March 31, 2016, 2:28 p.m., Sebastian Toader wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45544/
> -----------------------------------------------------------
> 
> (Updated March 31, 2016, 2:28 p.m.)
> 
> 
> Review request for Ambari, Daniel Gergely, Oliver Szabo, and Sandor Magyari.
> 
> 
> Bugs: AMBARI-15643
>     https://issues.apache.org/jira/browse/AMBARI-15643
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> *Problem*
> *After the cluster creation template posted to Ambari (via the REST Api) to provision a cluster using Blueprints is accepted for processing Ambari returns in the response the url of the request through which the status/progress of the cluster creation can be tracked.
> When querying the status of the request it erroneously returns "COMPLETED" instead of returning "PENDING" until the first task of the cluster creation is scheduled to be executed on one of the cluster nodes. Once at least one task is scheduled to be executed the status of the request should change to "IN_PROGRESS". The "COMPLETED" state should be reached when all tasks completed succesfully.
> 
> *Resolution*
> Make distinction between requests initiated from the UI and Blueprints. If the request is a request for Blueprint provisioned clusters and there are no host level tasks available than the request status derivation logic to default to PENDING.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/RequestResourceProvider.java d00ce58 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/RequestResourceProviderTest.java 4a76a1c 
> 
> Diff: https://reviews.apache.org/r/45544/diff/
> 
> 
> Testing
> -------
> 
> Manual testing and unit tests:
> 
> Results :
> 
> Tests run: 3543, Failures: 0, Errors: 0, Skipped: 36
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>