ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Fernandez" <afernan...@hortonworks.com>
Subject Re: Review Request 39619: AMBARI-13556. Stop-and-Start Upgrade: API to show available Upgrade options from Current stack to Desired stack.
Date Mon, 26 Oct 2015 22:05:02 GMT


> On Oct. 26, 2015, 9:56 p.m., Alejandro Fernandez wrote:
> > ambari-server/src/main/java/org/apache/ambari/server/controller/internal/CompatibleRepositoryVersionResourceProvider.java,
line 131
> > <https://reviews.apache.org/r/39619/diff/1/?file=1108379#file1108379line131>
> >
> >     What happens if there are multiple repos for say HDP-2.3, 
> >     E.g.,
> >     2.3.0.0-x
> >     2.3.2.0-y
> >     
> >     If we decide to use a hashmap, then the key needs to include both the stack
id and repo version, e.g.,
> >     Stack Id is "HDP-2.3", and repo version is "2.3.0.0-x"

I don't think this will be an issue, but let's do a quick test.


- Alejandro


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


On Oct. 26, 2015, 9:07 p.m., Swapan Shridhar wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39619/
> -----------------------------------------------------------
> 
> (Updated Oct. 26, 2015, 9:07 p.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: 
> ==============================
> 
> 
> 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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message