You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Alejandro Fernandez <af...@hortonworks.com> on 2015/09/15 02:18:29 UTC

Review Request 38388: Stop-and-Start Upgrade: HDP 2.1->2.3 needs to stop services using 2.1, and start using 2.3

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

Review request for Ambari.


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


Repository: ambari


Description
-------

For a Stop-and-Start Upgrade from HDP 2.1 -> 2.3, we need to stop all services using the scripts for HDP 2.1, and then start them using HDP 2.3.

Today, during an Upgrade, we currently set the desired stack id when we process Upgrade Pack and insert the upgrade record. That means that all start/stop commands use the scripts from the desired stack.

Instead, we need a Server Side Action to be called right before we run "hdp-select set all" that will change the desired stack id to the new version; this will permit stopping on the old version, and starting on the new version.

When we downgrade, we commence the orchestration again, and we again call the Server Side Action to change the desired stack id, this time to the starting version.


Diffs
-----

  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java 6ac3ed7 
  ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java a7f206a 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java 6133885 
  ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java c73f9d4 
  ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/UpdateDesiredStackAction.java PRE-CREATION 
  ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java d86210a 
  ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Grouping.java ec0fabf 
  ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ServerActionTask.java ea59d65 
  ambari-server/src/main/resources/stacks/HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml c55e1a8 
  ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml 01022b8 
  ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java 6708422 

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


Testing
-------

Verified it worked during a Stop-the-World Upgrade.
Waiting for unit test results.


Thanks,

Alejandro Fernandez


Re: Review Request 38388: Stop-and-Start Upgrade: HDP 2.1->2.3 needs to stop services using 2.1, and start using 2.3

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



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java (line 629)
<https://reviews.apache.org/r/38388/#comment155741>

    During STW, cannot apply configs and stack changes upfront.



ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java (line 663)
<https://reviews.apache.org/r/38388/#comment155742>

    Halfway through creating the stages/actions, need to switch to the newer stack id, which I call the effective stack id.



ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/UpdateDesiredStackAction.java (line 43)
<https://reviews.apache.org/r/38388/#comment155743>

    This class will be called as a server-side command during the orchestration, between stopping services on the older version, and starting on the newer version.



ambari-server/src/main/resources/stacks/HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml (line 176)
<https://reviews.apache.org/r/38388/#comment155744>

    The group name is used to change the effective stack id while creating the stages upfront, and the server side action is to update the DB during the middle of the orchestration.


- Alejandro Fernandez


On Sept. 15, 2015, 12:18 a.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/38388/
> -----------------------------------------------------------
> 
> (Updated Sept. 15, 2015, 12:18 a.m.)
> 
> 
> Review request for Ambari.
> 
> 
> Bugs: AMBARI-13052
>     https://issues.apache.org/jira/browse/AMBARI-13052
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> For a Stop-and-Start Upgrade from HDP 2.1 -> 2.3, we need to stop all services using the scripts for HDP 2.1, and then start them using HDP 2.3.
> 
> Today, during an Upgrade, we currently set the desired stack id when we process Upgrade Pack and insert the upgrade record. That means that all start/stop commands use the scripts from the desired stack.
> 
> Instead, we need a Server Side Action to be called right before we run "hdp-select set all" that will change the desired stack id to the new version; this will permit stopping on the old version, and starting on the new version.
> 
> When we downgrade, we commence the orchestration again, and we again call the Server Side Action to change the desired stack id, this time to the starting version.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariCustomCommandExecutionHelper.java 6ac3ed7 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariManagementControllerImpl.java a7f206a 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/ClusterStackVersionResourceProvider.java 6133885 
>   ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java c73f9d4 
>   ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/UpdateDesiredStackAction.java PRE-CREATION 
>   ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java d86210a 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/Grouping.java ec0fabf 
>   ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/ServerActionTask.java ea59d65 
>   ambari-server/src/main/resources/stacks/HDP/2.1/upgrades/nonrolling-upgrade-2.3.xml c55e1a8 
>   ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/nonrolling-upgrade-2.2.xml 01022b8 
>   ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java 6708422 
> 
> Diff: https://reviews.apache.org/r/38388/diff/
> 
> 
> Testing
> -------
> 
> Verified it worked during a Stop-the-World Upgrade.
> Waiting for unit test results.
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>