You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Jonathan Hurley <jh...@hortonworks.com> on 2015/12/17 16:29:03 UTC

Review Request 41516: After Downgrade Cluster Desired Configurations Are Not Set

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

Review request for Ambari, Alejandro Fernandez, Nate Cole, and Sid Wagle.


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


Repository: ambari


Description
-------

STR:

1) Install ZK HDP 2.2
2) Start an EU to HDP 2.3
3) Before finalization, downgrade

After the downgrade is successful, none of the configurations are "selected" to make them desired:

GET api/v1/clusters/c1
{code}
...
"desired_configs": {},
...
{code}

And in the DB:
{code:title=clusterconfigmapping}
2	cluster-env	INITIAL	1449068339296	0	admin
2	cluster-env	TOPOLOGY_RESOLVED	1449068339366	0	admin
2	zoo.cfg	INITIAL	1449068339225	0	admin
2	zookeeper-env	INITIAL	1449068339232	0	admin
2	zookeeper-log4j	INITIAL	1449068339229	0	admin
{code}

This prevents an upgrade from starting again since there are no desired configurations:

{code}
java.lang.NullPointerException
	at org.apache.ambari.server.state.ConfigHelper.getPropertyValuesWithPropertyType(ConfigHelper.java:499)
	at org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper.addCustomCommandAction(AmbariCustomCommandExecutionHelper.java:356)
	at org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper.addExecutionCommandsToStage(AmbariCustomCommandExecutionHelper.java:962)
{code}

The problem is that we were never applying the latest config mappings which were changed.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java 46dbe01 
  ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java b6eb8d0 

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


Testing
-------

mvn clean test


Thanks,

Jonathan Hurley


Re: Review Request 41516: After Downgrade Cluster Desired Configurations Are Not Set

Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/41516/#review110970
-----------------------------------------------------------

Ship it!


Ship It!

- Nate Cole


On Dec. 17, 2015, 10:29 a.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41516/
> -----------------------------------------------------------
> 
> (Updated Dec. 17, 2015, 10:29 a.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Nate Cole, and Sid Wagle.
> 
> 
> Bugs: AMBARI-49993
>     https://issues.apache.org/jira/browse/AMBARI-49993
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> STR:
> 
> 1) Install ZK HDP 2.2
> 2) Start an EU to HDP 2.3
> 3) Before finalization, downgrade
> 
> After the downgrade is successful, none of the configurations are "selected" to make them desired:
> 
> GET api/v1/clusters/c1
> {code}
> ...
> "desired_configs": {},
> ...
> {code}
> 
> And in the DB:
> {code:title=clusterconfigmapping}
> 2	cluster-env	INITIAL	1449068339296	0	admin
> 2	cluster-env	TOPOLOGY_RESOLVED	1449068339366	0	admin
> 2	zoo.cfg	INITIAL	1449068339225	0	admin
> 2	zookeeper-env	INITIAL	1449068339232	0	admin
> 2	zookeeper-log4j	INITIAL	1449068339229	0	admin
> {code}
> 
> This prevents an upgrade from starting again since there are no desired configurations:
> 
> {code}
> java.lang.NullPointerException
> 	at org.apache.ambari.server.state.ConfigHelper.getPropertyValuesWithPropertyType(ConfigHelper.java:499)
> 	at org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper.addCustomCommandAction(AmbariCustomCommandExecutionHelper.java:356)
> 	at org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper.addExecutionCommandsToStage(AmbariCustomCommandExecutionHelper.java:962)
> {code}
> 
> The problem is that we were never applying the latest config mappings which were changed.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java 46dbe01 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java b6eb8d0 
> 
> Diff: https://reviews.apache.org/r/41516/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>


Re: Review Request 41516: After Downgrade Cluster Desired Configurations Are Not Set

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

Ship it!


Ship It!

- Alejandro Fernandez


On Dec. 17, 2015, 3:29 p.m., Jonathan Hurley wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41516/
> -----------------------------------------------------------
> 
> (Updated Dec. 17, 2015, 3:29 p.m.)
> 
> 
> Review request for Ambari, Alejandro Fernandez, Nate Cole, and Sid Wagle.
> 
> 
> Bugs: AMBARI-49993
>     https://issues.apache.org/jira/browse/AMBARI-49993
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> STR:
> 
> 1) Install ZK HDP 2.2
> 2) Start an EU to HDP 2.3
> 3) Before finalization, downgrade
> 
> After the downgrade is successful, none of the configurations are "selected" to make them desired:
> 
> GET api/v1/clusters/c1
> {code}
> ...
> "desired_configs": {},
> ...
> {code}
> 
> And in the DB:
> {code:title=clusterconfigmapping}
> 2	cluster-env	INITIAL	1449068339296	0	admin
> 2	cluster-env	TOPOLOGY_RESOLVED	1449068339366	0	admin
> 2	zoo.cfg	INITIAL	1449068339225	0	admin
> 2	zookeeper-env	INITIAL	1449068339232	0	admin
> 2	zookeeper-log4j	INITIAL	1449068339229	0	admin
> {code}
> 
> This prevents an upgrade from starting again since there are no desired configurations:
> 
> {code}
> java.lang.NullPointerException
> 	at org.apache.ambari.server.state.ConfigHelper.getPropertyValuesWithPropertyType(ConfigHelper.java:499)
> 	at org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper.addCustomCommandAction(AmbariCustomCommandExecutionHelper.java:356)
> 	at org.apache.ambari.server.controller.AmbariCustomCommandExecutionHelper.addExecutionCommandsToStage(AmbariCustomCommandExecutionHelper.java:962)
> {code}
> 
> The problem is that we were never applying the latest config mappings which were changed.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java 46dbe01 
>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java b6eb8d0 
> 
> Diff: https://reviews.apache.org/r/41516/diff/
> 
> 
> Testing
> -------
> 
> mvn clean test
> 
> 
> Thanks,
> 
> Jonathan Hurley
> 
>