> On March 21, 2016, 4:33 p.m., Robert Levas wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java,
> >  lines 1437-1438
> > <https://reviews.apache.org/r/45101/diff/1/?file=1308341#file1308341line1437>
> >
> >     I would have thought that the fix would have been somewhere within the 
> > blueprint processing code rather than here since it attempts to set the 
> > `cluster-env` config multiple times with the same tag.
> >     
> >     If you skip the setting of this, wont you loose data?
> 
> Myroslav Papirkovskyy wrote:
>     Actually no. We skip creating config if config with such type already 
> mapped to cluster and it has exactly same properties and their values.
>     This section of code forces config creation in some edge cases related to 
> service removal.
>     It is ok to skip this for all config types not related to services.
> 
> Robert Levas wrote:
>     My concern is that cluster-env may be updated in one of those calls to 
> set it.  We don't want to loose that change or run into the issue that lead 
> to this fix. 
>     
>     However, maybe we _know_ that there is no change and thus my point is 
> irrelevant.
> 
> Myroslav Papirkovskyy wrote:
>     If config DOES change we will still get exception from this issue because 
> of tag UNIQUE constraint.
>     So if didn't met this before I suppose blueprints always set config with 
> exactly same properties.
> 
> Robert Levas wrote:
>     good point... assuming nothing changed on the BP side too.  But I'll drop 
> this issue as testing would have probably caught this.

If cluster-env is updated than that change will be caught earlier before this 
code and marked to be updated so we won't miss any change to cluster env.

The part I changed is specific to services so should not run for non-service 
config types.


- Sebastian


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


On March 21, 2016, 6:52 p.m., Sebastian Toader wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/45101/
> -----------------------------------------------------------
> 
> (Updated March 21, 2016, 6:52 p.m.)
> 
> 
> Review request for Ambari, Myroslav Papirkovskyy, Robert Levas, and Sandor 
> Magyari.
> 
> 
> Bugs: AMBARI-15489
>     https://issues.apache.org/jira/browse/AMBARI-15489
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> The logic that determines if a new version has to be created for a 
> configuration should skip cluster wide config types when verifying current 
> desired config against service configs as these are not service configs.
> 
> 
> Diffs
> -----
> 
>   
> ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java
>  ac2fb22 
>   ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java 
> 80697f1 
> 
> Diff: https://reviews.apache.org/r/45101/diff/
> 
> 
> Testing
> -------
> 
> Manual testing done.
> 
> Unit tests results:
> Results :
> 
> Tests run: 3534, Failures: 0, Errors: 0, Skipped: 36
> 
> 
> Thanks,
> 
> Sebastian Toader
> 
>

Reply via email to