----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/31457/#review74266 -----------------------------------------------------------
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java <https://reviews.apache.org/r/31457/#comment120810> Original code had this as setState(state) because it's already decided it's CURRENT. If we find other conditions where this condition should execute we can just change that "if" instead of 3 of them. ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java <https://reviews.apache.org/r/31457/#comment120811> See "state" comment. - Nate Cole On Feb. 25, 2015, 9:24 p.m., Alejandro Fernandez wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/31457/ > ----------------------------------------------------------- > > (Updated Feb. 25, 2015, 9:24 p.m.) > > > Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, > and Tom Beerbower. > > > Bugs: AMBARI-9805 > https://issues.apache.org/jira/browse/AMBARI-9805 > > > Repository: ambari > > > Description > ------- > > 1. There is a bug in ServiceComponentHostSummary.java 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. ClusterImpl.java has a bug in transitionHostVersionState() when setting > the state to UPGRADING if the Host has exactly one Component with a version. > 3. FinalizeUpgradeAction.java 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/FinalizeUpgradeAction.java > 4dcdc94 > ambari-server/src/main/java/org/apache/ambari/server/state/Cluster.java > 6b8a917 > > ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java > b2ba43b > > ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java > 6d7455e > > ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostSummary.java > ef14f0b > > Diff: https://reviews.apache.org/r/31457/diff/ > > > Testing > ------- > > Verified on a live cluster. > 1. Installed HDP 2.2.2.0 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 was CURRENT > 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 (2.2.2.0-2450) > 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 2.2.2.0-2485. 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 2.2.2.0-2450. > 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 > > > Still need to write unit tests > > > Thanks, > > Alejandro Fernandez > >
