ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alejandro Fernandez" <>
Subject Re: Review Request 31457: RU - Bug fixes for Host Version transition and Finalize
Date Mon, 02 Mar 2015 18:53:58 GMT

This is an automatically generated e-mail. To reply, visit:


    This function is used in the calculation of when to transition from INSTALLED -> UPGRADING.
    And requires either.
    1. Host has a HostVersion with state CURRENT for version x, and the Host has exactly 1
HostComponentState, whose version is y, meaning an upgrade is in progress (or just finished).
    2. Host's HostComponentState records are advertising two different versions, x and y.
    If a Host has one host version in CURRENT, and another in OUT_OF_SYNC, no changes to hdp-select
have been called.

- Alejandro Fernandez

On Feb. 27, 2015, 11:56 p.m., Alejandro Fernandez wrote:
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> -----------------------------------------------------------
> (Updated Feb. 27, 2015, 11:56 p.m.)
> Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, and Tom Beerbower.
> Bugs: AMBARI-9805
> Repository: ambari
> Description
> -------
> 1. There is a bug in since its constructor should not
be comparing against the string UKNOWN, but rather rely on ComponentInfo to determine which
components need to advertise a version. Also, the function haveAllComponentsFinishedAdvertisingVersion
should instead compare the size of all components that can advertise a version, and the subset
of those that have done so already.
> 2. has a bug in transitionHostVersionState() when setting the state
to UPGRADING if the Host has exactly one Component with a version.
> 3. has redundant code now that AMBARI-9755 is in because the
call to transitionClusterVersion() will also take care of transitioning HostVersions from
INSTALLED->CURRENT for hosts that only have components that do not advertise a version.
> It is of the utmost importance to test these changes in the following scenarios:
> Host added during cluster install
> Host added after cluster install
> Host added after bits are distributed
> A Host may be added with either 0 services, only services that do not advertise a version,
or at least one service that advertises a version.
> Diffs
> -----
>   ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/
>   ambari-server/src/main/java/org/apache/ambari/server/state/ 6b8a917 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/
>   ambari-server/src/test/java/org/apache/ambari/server/controller/
>   ambari-server/src/test/java/org/apache/ambari/server/stack/ c21215a

>   ambari-server/src/test/java/org/apache/ambari/server/state/cluster/
>   ambari-server/src/test/resources/stacks/HDP/2.0.5/services/GANGLIA/metainfo.xml fe5f482

>   ambari-server/src/test/resources/stacks/HDP/2.0.5/services/HDFS/metainfo.xml e0a40b0

>   ambari-server/src/test/resources/stacks/HDP/2.0.5/services/ZOOKEEPER/metainfo.xml 205b445

>   ambari-server/src/test/resources/stacks/HDP/2.2.0/metainfo.xml PRE-CREATION 
>   ambari-server/src/test/resources/stacks/HDP/2.2.0/repos/hdp.json PRE-CREATION 
>   ambari-server/src/test/resources/stacks/HDP/2.2.0/repos/repoinfo.xml PRE-CREATION 
>   ambari-server/src/test/resources/stacks/HDP/2.2.0/role_command_order.json PRE-CREATION

>   ambari-server/src/test/resources/stacks/HDP/2.2.0/services/GANGLIA/metainfo.xml PRE-CREATION

>   ambari-server/src/test/resources/stacks/HDP/2.2.0/services/HDFS/metainfo.xml PRE-CREATION

>   ambari-server/src/test/resources/stacks/HDP/2.2.0/services/ZOOKEEPER/metainfo.xml PRE-CREATION

> Diff:
> Testing
> -------
> Verified on a live cluster.
> 1. Installed HDP version 2450 with HDFS and ZK on 3 hosts (c6404, c6405, c6406)
> 2. All three hosts transitioned the HostVersion from UPGRADING->CURRENT, and the ClusterVersion
> 3. Added a service (MR + YARN), and Host Component States got added with version of UNKNOWN
> They all finally reported a version, but no changes needed in HostVersions or ClusterVersion
> 4. Added new host, c6407 with no services.
> Then, added only HDFS client to it.
> Which picked up HostVersion in CURRENT and the HostComponentState had a valid version
> 5. Added another host (c6408) with no components. Add Ganglia service, which does not
advertise a version. This host did not yet have a HostVersion
> 6. Registered a Repo and distributed bits for All Hosts then had HostVersion
for the new repo with a state of INSTALLED
> 7. Added yet one more host that will only have Ganglia Monitor (c6409). It then had a
HostVersion in OUT_OF_SYNC, and the ClusterVersion was also OUT_OF_SYNC
> 8. Redistributed bits, all hosts then had INSTALLED for the new version, but only 4/6
hosts have a HostVersion for
> 9. Performed an RU. Before Finalize, all but the last 2 hosts were in UPGRADED, but the
last 2 hosts still had a HostVersion in INSTALLED.
> 10. Finalize succeeded
> I added a comprehensive unit test. Waiting for full unit test results.
> Thanks,
> Alejandro Fernandez

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