ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nate Cole" <nc...@hortonworks.com>
Subject Re: Review Request 30343: RU - FinalizeUpgradeAction needs to ignore hosts without a host_version record
Date Sat, 31 Jan 2015 00:16:55 GMT

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

Ship it!


Ship It!

- Nate Cole


On Jan. 30, 2015, 6:54 p.m., Alejandro Fernandez wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30343/
> -----------------------------------------------------------
> 
> (Updated Jan. 30, 2015, 6:54 p.m.)
> 
> 
> Review request for Ambari, Dmitro Lisnichenko, Jonathan Hurley, Nate Cole, and Yurii
Shylov.
> 
> 
> Bugs: AMBARI-9365
>     https://issues.apache.org/jira/browse/AMBARI-9365
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> Install a cluster such that one host only has AMS component, so that it does not create
a host_version record for that host.
> The Finalize Upgrade Action will fail because the host was never added to the set of
hosts with a correct version state.
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java
fd1ce9e 
>   ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java
1e48950 
>   ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java
56281a2 
>   ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
2328bed 
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java
55a6ce7 
>   ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostSummary.java
PRE-CREATION 
>   ambari-server/src/main/resources/stacks/HDP/2.2/upgrades/upgrade-2.2.xml 139dbdb 
> 
> Diff: https://reviews.apache.org/r/30343/diff/
> 
> 
> Testing
> -------
> 
> Tested end-to-end as follows.
> Created 3 node cluster such that AMS was the only service on host3. Then verified that
host3 had a host_version of CURRENT.
> Next, added ZK server to host 3, so it picked up a host_version record.
> Next, added host 4 without any roles, so it only had AMS on it, and therefore no host_version
record, as expected.
> Next, installed more services to complete this list: HDFS, MR, YARN, Tez, Pig, Hive,
Oozie, HBASE, ZK, SQOOP, AMS, and then enabled Namenode HA.
> When performing the rolling upgrade, just before clicking on Finalize, the DB showed
the following, and saving the cluster state was successful!
> 
> ```
> ambari=> select component_name, version, current_state, upgrade_state, host_name from
hostcomponentstate WHERE version <> '2.2.1.0-2270' ORDER BY host_name, component_name;
select hv.host_name, hv.state, rv.version from host_version AS hv JOIN repo_version AS rv
ON hv.repo_version_id = rv.repo_version_id ORDER BY rv.repo_version_id, hv.host_name; select
* from cluster_version;
>   component_name  | version | current_state | upgrade_state |        host_name
> ------------------+---------+---------------+---------------+-------------------------
>  METRIC_MONITOR   | UNKNOWN | STARTED       | NONE          | c6406.ambari.apache.org
>  ZKFC             | UNKNOWN | STARTED       | NONE          | c6406.ambari.apache.org
>  METRIC_MONITOR   | UNKNOWN | STARTED       | NONE          | c6407.ambari.apache.org
>  MYSQL_SERVER     | UNKNOWN | STARTED       | NONE          | c6407.ambari.apache.org
>  ZKFC             | UNKNOWN | STARTED       | NONE          | c6407.ambari.apache.org
>  METRIC_COLLECTOR | UNKNOWN | STARTED       | NONE          | c6408.ambari.apache.org
>  METRIC_MONITOR   | UNKNOWN | STARTED       | NONE          | c6408.ambari.apache.org
>  METRIC_MONITOR   | UNKNOWN | STARTED       | NONE          | c6409.ambari.apache.org
> (8 rows)
> 
>         host_name        |   state   |   version
> -------------------------+-----------+--------------
>  c6406.ambari.apache.org | CURRENT   | 2.2.0.0-2041
>  c6407.ambari.apache.org | CURRENT   | 2.2.0.0-2041
>  c6408.ambari.apache.org | CURRENT   | 2.2.0.0-2041
>  c6406.ambari.apache.org | UPGRADED  | 2.2.1.0-2270
>  c6407.ambari.apache.org | UPGRADED  | 2.2.1.0-2270
>  c6408.ambari.apache.org | UPGRADED  | 2.2.1.0-2270
>  c6409.ambari.apache.org | INSTALLED | 2.2.1.0-2270
> (7 rows)
> 
>  id | repo_version_id | cluster_id |   state   |  start_time   |   end_time    | user_name
> ----+-----------------+------------+-----------+---------------+---------------+------------
>   1 |               1 |          2 | CURRENT   | 1422646409684 | 1422646526325 | _anonymous
>   2 |               2 |          2 | UPGRADING | 1422657723830 | 1422659548958 | admin
> (2 rows)
> ```
> 
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 33:21.602s
> [INFO] Finished at: Fri Jan 30 15:47:56 PST 2015
> [INFO] Final Memory: 50M/545M
> [INFO] ------------------------------------------------------------------------
> 
> 
> Thanks,
> 
> Alejandro Fernandez
> 
>


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