> On Nov. 2, 2016, 2:23 p.m., Dmitro Lisnichenko wrote: > > I see the upgrade pack for new upgrade type. Is downgrade possible? Is host > > order reversed during downgrade?
Downgrades are possible, yes. Nothing is going to be "reversed" during a HOST_ORDERED downgrade. Essentially this is an upgrade/downgrade where Ambari is exposing the ability for the client to define its own orchestration. As such, on downgrade, the client will need to provide the ordering of the hosts to downgrade. - Jonathan ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/53373/#review154607 ----------------------------------------------------------- On Nov. 2, 2016, 2:09 p.m., Jonathan Hurley wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/53373/ > ----------------------------------------------------------- > > (Updated Nov. 2, 2016, 2:09 p.m.) > > > Review request for Ambari, Dmitro Lisnichenko and Nate Cole. > > > Bugs: AMBARI-18685 > https://issues.apache.org/jira/browse/AMBARI-18685 > > > Repository: ambari > > > Description > ------- > > Unit tests are in progress, but seeing as though this is a feature branch, I > didn't think I needed to wait to post the review. I mostly wanted feedback on > the approach before I invested time in the tests. > > Augment the API of creating an Upgrade with the following: > > ``` > POST api/v1/clusters/c1/upgrades > { > "Upgrade": { > "repository_version": "2.5.0.0-965", > "upgrade_type": "HOST_ORDERED", <---------- new value other than > ROLLING/NON_ROLLING > "skip_failures": "false", > "skip_prerequisite_checks": "false", > "skip_manual_verification": "false", > "host_order": [ <------ new > { > "hosts": [ "c6401.ambari.apache.org, "c6402.ambari.apache.org", > "c6403.ambari.apache.org" ], > "service_checks": ["ZOOKEEPER"] > }, > { > "hosts": [ "c6404.ambari.apache.org, "c6405.ambari.apache.org"], > "service_checks": ["ZOOKEEPER", "KAFKA"] > } > ] > } > } > ``` > > {{skip_failures}} must be {{false}} when the upgrade_type is HOST_ORDERED > {{skip_manual_verification}} must be omitted or {{false}} when upgrade_type > is HOST_ORDERED > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/UpgradeResourceProvider.java > d83aaa2 > > ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeContext.java > 32f5c42 > > ambari-server/src/main/java/org/apache/ambari/server/state/UpgradeHelper.java > ac0953f > > ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/HostOrderGrouping.java > 9c75344 > > ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/HostOrderItem.java > PRE-CREATION > > ambari-server/src/main/java/org/apache/ambari/server/state/stack/upgrade/StageWrapperBuilder.java > ec7279c > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/UpgradeResourceProviderTest.java > 08507ef > > ambari-server/src/test/java/org/apache/ambari/server/state/UpgradeHelperTest.java > 9a0946b > > ambari-server/src/test/java/org/apache/ambari/server/state/stack/upgrade/StageWrapperBuilderTest.java > a72dd13 > > ambari-server/src/test/resources/stacks/HDP/2.1.1/upgrades/upgrade_test_host_ordered.xml > PRE-CREATION > > Diff: https://reviews.apache.org/r/53373/diff/ > > > Testing > ------- > > PENDING > > > Thanks, > > Jonathan Hurley > >
