ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tom Beerbower" <tbeerbo...@hortonworks.com>
Subject Re: Review Request 35519: Cannot reinstall components that are in INSTALL_FAILED state via API
Date Tue, 16 Jun 2015 16:11:05 GMT

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

Ship it!


Ship It!

- Tom Beerbower


On June 16, 2015, 3:01 p.m., Nate Cole wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35519/
> -----------------------------------------------------------
> 
> (Updated June 16, 2015, 3:01 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley and Tom Beerbower.
> 
> 
> Bugs: AMBARI-11950
>     https://issues.apache.org/jira/browse/AMBARI-11950
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The following call fails with java.lang.IllegalArgumentException: Invalid arguments,
invalid desired state, desiredState=INSTALL_FAILED
> 
> PUT /api/v1/clusters/c1/host_components?HostRoles=state/INSTALL_FAILED
> {
>   "HostRoles": {
>     "state": "INSTALLED"
>   }
> }
> 
> Updating host components' state happens in two steps.  The first step is to query the
list of host components to select, then with that list, apply the state change.  The issue
is that the resolution of request properties made the call act as though it was SETTING state=INSTALL_FAILED
(which is invalid).
> 
> The fix was to resolve the request properties as a regular query (GET) operation, THEN
set the desired state for update on the results (no change to that logic).
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/HostComponentResourceProvider.java
40e3d5f 
> 
> Diff: https://reviews.apache.org/r/35519/diff/
> 
> 
> Testing
> -------
> 
> Existing unit tests cover functionality (that is, they all still functioned correctly).
> 
> Manual testing forced a failure in, say, 2 DN on install, then invoke the call above.
> 
> Tests run: 2961, Failures: 0, Errors: 0, Skipped: 21
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 34:52 min
> [INFO] Finished at: 2015-06-16T10:54:46-04:00
> [INFO] Final Memory: 33M/1315M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Nate Cole
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message