----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/39619/#review104193 -----------------------------------------------------------
Ship it! Ship It! - Alejandro Fernandez On Oct. 27, 2015, 10:07 a.m., Swapan Shridhar wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/39619/ > ----------------------------------------------------------- > > (Updated Oct. 27, 2015, 10:07 a.m.) > > > Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, and Nate > Cole. > > > Bugs: AMBARI-13556 > https://issues.apache.org/jira/browse/AMBARI-13556 > > > Repository: ambari > > > Description > ------- > > AMBARI-13556. Stop-and-Start Upgrade: API to show available Upgrade options > from Current stack to Desired stack. > > Description: > =========== > For most cases, UI will allow both RU and EU. > However, for HDP 2.1->2.3, only EU is supported, this means we cannot show > the button for RU. Hence, the UI has to either remove/disable the RU option. > > With this change, UI will be able to remove/disable the upgdrade option(s) > based on the "upgrade type" supported. > > > Diffs > ----- > > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersion.java > PRE-CREATION > > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProvider.java > 2a1092b > > ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProviderTest.java > ab06a5c > > Diff: https://reviews.apache.org/r/39619/diff/ > > > Testing > ------- > > * Unit Testing : > =============== > > Updated and ran > ambari/ambari-server/src/test/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProviderTest.java > : PASSED > > > * Installed AMBARI SREVER. O/Ps: > ============================== > > > - Screenshot of Admin -> Stacks and Versions -> Versions showing 1 version > for 2.2 and 2 versions for 2.3 > > - Current version : 2.2 and installed 2 repos for HDP 2.3. > > BEFORE change: > ============= > > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2", > "Versions" : { > "active" : true, > "min_upgrade_version" : null, > "parent_stack_version" : "2.1", > "stack-errors" : [ ], > "stack_name" : "HDP", > "stack_version" : "2.2", > "upgrade_packs" : [ > "non_rolling_2.3", > "non_rolling_2.2", > "upgrade-2.3", > "upgrade-2.2" > ], > "valid" : true, > "config_types" : { > "cluster-env" : { > "supports" : { } > } > } > }, > > "compatible_repository_versions" : [ > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/1", > "CompatibleRepositoryVersions" : { > "id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2" > } > }, > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/2", > "CompatibleRepositoryVersions" : { > "id" : 2, > "stack_name" : "HDP", > "stack_version" : "2.3" > } > } > ], > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/2", > "CompatibleRepositoryVersions" : { > "id" : 3, > "stack_name" : "HDP", > "stack_version" : "2.3" > } > } > > > > AFTER change: (Check for "upgrade_types"). > ============ > > > "compatible_repository_versions" : [ > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/1", > "CompatibleRepositoryVersions" : { > "id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2", > "upgrade_types" : [ > "ROLLING", > "NON_ROLLING" > ] > } > }, > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/2", > "CompatibleRepositoryVersions" : { > "id" : 2, > "stack_name" : "HDP", > "stack_version" : "2.3", > "upgrade_types" : [ > "ROLLING", > "NON_ROLLING" > ] > } > }, > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/3", > "CompatibleRepositoryVersions" : { > "id" : 3, > "stack_name" : "HDP", > "stack_version" : "2.3", > "upgrade_types" : [ > "ROLLING", > "NON_ROLLING" > ] > } > } > ], > > > > > URL : > http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/1 > O/P : > ================================================================================================================== > > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/1", > "CompatibleRepositoryVersions" : { > "display_name" : "HDP-2.2.9.0-3310", > "id" : 1, > "repository_version" : "2.2.9.0-3310", > "stack_name" : "HDP", > "stack_version" : "2.2", > "upgrade_types" : [ > "ROLLING", > "NON_ROLLING" > ] > }, > "operating_systems" : [ > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/1/operating_systems/redhat6", > "OperatingSystems" : { > "os_type" : "redhat6", > "repository_version_id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2" > } > }, > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/1/operating_systems/suse11", > "OperatingSystems" : { > "os_type" : "suse11", > "repository_version_id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2" > } > }, > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/1/operating_systems/ubuntu12", > "OperatingSystems" : { > "os_type" : "ubuntu12", > "repository_version_id" : 1, > "stack_name" : "HDP", > "stack_version" : "2.2" > } > } > ] > } > > > URL : > http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/2 > =========================================================================================== > > > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/2", > "CompatibleRepositoryVersions" : { > "display_name" : "HDP-2.3.0.0-2557", > "id" : 2, > "repository_version" : "2.3.0.0-2557", > "stack_name" : "HDP", > "stack_version" : "2.3", > "upgrade_types" : [ > "ROLLING", > "NON_ROLLING" > ] > }, > "operating_systems" : [ > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/2/operating_systems/redhat6", > "OperatingSystems" : { > "os_type" : "redhat6", > "repository_version_id" : 2, > "stack_name" : "HDP", > "stack_version" : "2.3" > } > } > ] > } > > > URL : > http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/3 > =========================================================================================== > > > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/3", > "CompatibleRepositoryVersions" : { > "display_name" : "HDP-2.3.3.0-3008", > "id" : 3, > "repository_version" : "2.3.3.0-3008", > "stack_name" : "HDP", > "stack_version" : "2.3", > "upgrade_types" : [ > "ROLLING", > "NON_ROLLING" > ] > }, > "operating_systems" : [ > { > "href" : > "http://c6401.ambari.apache.org:8080/api/v1/stacks/HDP/versions/2.2/compatible_repository_versions/3/operating_systems/redhat6", > "OperatingSystems" : { > "os_type" : "redhat6", > "repository_version_id" : 3, > "stack_name" : "HDP", > "stack_version" : "2.3" > } > } > ] > } > > > File Attachments > ---------------- > > 3 repo versions (1 for 2.2 and 2 for 2.3) > > https://reviews.apache.org/media/uploaded/files/2015/10/27/43d053af-71c3-4714-b849-33be2aca8beb__Screen_Shot_2015-10-26_at_5.05.43_PM.png > 3 repos - 2 for 2.3 and 1 for 2.2 > > https://reviews.apache.org/media/uploaded/files/2015/10/27/ee570465-7e9f-4c34-a2cb-f766ea642af2__Screen_Shot_2015-10-26_at_5.05.43_PM.png > > > Thanks, > > Swapan Shridhar > >
