-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39619/
-----------------------------------------------------------
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:
==============================
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"
}
}
],
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" : [
"NON_ROLLING",
"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"
]
}
}
],
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" : [
"NON_ROLLING",
"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",
"id" : 2,
"repository_version" : "2.3.0.0",
"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"
}
}
]
}
Thanks,
Swapan Shridhar