You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by Alejandro Fernandez <af...@hortonworks.com> on 2015/01/28 02:15:56 UTC
Re: Review Request 30343: RU - FinalizeUpgradeAction needs to ignore
hosts without a host_version record
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30343/
-----------------------------------------------------------
(Updated Jan. 28, 2015, 1:15 a.m.)
Review request for Ambari, 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 fd1ce9e2d7e7b55e6a48cfc3dc559d94ae59c10f
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 1e489504ae3096f85f73628caff2d3bd0d6d8f84
ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java 56281a2fe8808c3454ad97223a04582aec18e7b2
Diff: https://reviews.apache.org/r/30343/diff/
Testing
-------
In-progress
Thanks,
Alejandro Fernandez
Re: Review Request 30343: RU - FinalizeUpgradeAction needs to ignore
hosts without a host_version record
Posted by Nate Cole <nc...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30343/#review69950
-----------------------------------------------------------
Ship it!
Ship It!
- Nate Cole
On Jan. 27, 2015, 8:15 p.m., Alejandro Fernandez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30343/
> -----------------------------------------------------------
>
> (Updated Jan. 27, 2015, 8:15 p.m.)
>
>
> Review request for Ambari, 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 fd1ce9e2d7e7b55e6a48cfc3dc559d94ae59c10f
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 1e489504ae3096f85f73628caff2d3bd0d6d8f84
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java 56281a2fe8808c3454ad97223a04582aec18e7b2
>
> Diff: https://reviews.apache.org/r/30343/diff/
>
>
> Testing
> -------
>
> In-progress
>
>
> Thanks,
>
> Alejandro Fernandez
>
>
Re: Review Request 30343: RU - FinalizeUpgradeAction needs to ignore
hosts without a host_version record
Posted by Jonathan Hurley <jh...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30343/#review70004
-----------------------------------------------------------
Ship it!
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java
<https://reviews.apache.org/r/30343/#comment114932>
Why not used a named query here so that we can better catch JPQL errors at startup time.
- Jonathan Hurley
On Jan. 27, 2015, 8:15 p.m., Alejandro Fernandez wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/30343/
> -----------------------------------------------------------
>
> (Updated Jan. 27, 2015, 8:15 p.m.)
>
>
> Review request for Ambari, 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 fd1ce9e2d7e7b55e6a48cfc3dc559d94ae59c10f
> ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 1e489504ae3096f85f73628caff2d3bd0d6d8f84
> ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java 56281a2fe8808c3454ad97223a04582aec18e7b2
>
> Diff: https://reviews.apache.org/r/30343/diff/
>
>
> Testing
> -------
>
> In-progress
>
>
> Thanks,
>
> Alejandro Fernandez
>
>
Re: Review Request 30343: RU - FinalizeUpgradeAction needs to ignore
hosts without a host_version record
Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30343/
-----------------------------------------------------------
(Updated Jan. 30, 2015, 11:53 p.m.)
Review request for Ambari, Jonathan Hurley, Nate Cole, and Yurii Shylov.
Changes
-------
all done.
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 (updated)
-------
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
Re: Review Request 30343: RU - FinalizeUpgradeAction needs to ignore
hosts without a host_version record
Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30343/
-----------------------------------------------------------
(Updated Jan. 30, 2015, 11:48 p.m.)
Review request for Ambari, Jonathan Hurley, Nate Cole, and Yurii Shylov.
Changes
-------
Re-tested and unit tests passed.
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 (updated)
-----
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
-------
In-progress
Thanks,
Alejandro Fernandez
Re: Review Request 30343: RU - FinalizeUpgradeAction needs to ignore
hosts without a host_version record
Posted by Alejandro Fernandez <af...@hortonworks.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/30343/
-----------------------------------------------------------
(Updated Jan. 29, 2015, 12:10 a.m.)
Review request for Ambari, Jonathan Hurley, Nate Cole, and Yurii Shylov.
Changes
-------
Fixed more bugs after testing with a cluster that only had AMS on a host.
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 (updated)
-----
ambari-server/src/main/java/org/apache/ambari/server/orm/dao/HostComponentStateDAO.java fd1ce9e2d7e7b55e6a48cfc3dc559d94ae59c10f
ambari-server/src/main/java/org/apache/ambari/server/orm/entities/HostComponentStateEntity.java 1e489504ae3096f85f73628caff2d3bd0d6d8f84
ambari-server/src/main/java/org/apache/ambari/server/serveraction/upgrades/FinalizeUpgradeAction.java 56281a2fe8808c3454ad97223a04582aec18e7b2
ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java 0bfaa191270cc5589fc10bc9a6f8a5843cc77070
ambari-server/src/main/java/org/apache/ambari/server/state/svccomphost/ServiceComponentHostImpl.java dbdef2bfc136404133ad23fb65ba5406003fdeee
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 139dbdb10cf00d39f4c0cca8359741e3da4e73ff
Diff: https://reviews.apache.org/r/30343/diff/
Testing
-------
In-progress
Thanks,
Alejandro Fernandez