[
https://issues.apache.org/jira/browse/AMBARI-15253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15175899#comment-15175899
]
Hudson commented on AMBARI-15253:
---------------------------------
SUCCESS: Integrated in Ambari-branch-2.2 #450 (See
[https://builds.apache.org/job/Ambari-branch-2.2/450/])
AMBARI-15253 - Ambari upgrade fails if there is incorrect version in (jhurley:
[http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=2d65e6aaebcec9227bd15f853de22445b09d6632])
*
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog220.java
*
ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
> Ambari upgrade fails if there is incorrect version in upgrade table
> --------------------------------------------------------------------
>
> Key: AMBARI-15253
> URL: https://issues.apache.org/jira/browse/AMBARI-15253
> Project: Ambari
> Issue Type: Bug
> Components: ambari-upgrade
> Affects Versions: 2.2.2
> Reporter: Jonathan Hurley
> Assignee: Jonathan Hurley
> Priority: Critical
> Fix For: 2.4.0
>
> Attachments: AMBARI-15253.patch
>
>
> Upgrade Ambari from 2.1.2.1 to 2.2 fails:
> {code}
> Fixing database objects owner
> Ambari Server configured for Embedded Postgres. Confirm you have made a
> backup of the Ambari Server database [y/n] (y)?
> Upgrading database schema
> Error output from schema upgrade command:
> java.lang.NullPointerException
> at
> org.apache.ambari.server.upgrade.UpgradeCatalog213.calculateUpgradePackage(UpgradeCatalog213.java:630)
>
> at
> org.apache.ambari.server.upgrade.UpgradeCatalog213.populateUpgradeTable(UpgradeCatalog213.java:563)
>
> {code}
> {code}
> 5 Feb 2016 21:19:55,871 INFO [main] UpgradeCatalog213:532 - Populating rows
> for the upgrade table record with upgrade_id: 3, cluster_id: 2, from_version:
> 2.2.0.0-2041, to_version: 2.2.4.2, direction: UPGRADE
> 15 Feb 2016 21:19:55,871 INFO [main] UpgradeCatalog213:538 - Updating the
> record's upgrade_type to ROLLING
> 15 Feb 2016 21:19:55,871 INFO [main] DBAccessorImpl:718 - Executing query:
> UPDATE upgrade SET upgrade_type = 'ROLLING' WHERE upgrade_id = 3
> 15 Feb 2016 21:19:55,874 ERROR [main] UpgradeCatalog213:580 - Unable to
> populate the upgrade_type and upgrade_package columns of the upgrade table.
> java.lang.NullPointerException
> 15 Feb 2016 21:19:55,875 ERROR [main] SchemaUpgradeHelper:214 - Upgrade
> failed.
> org.apache.ambari.server.AmbariException: Errors found while populating the
> upgrade table with values for columns upgrade_type and upgrade_package.
> at
> org.apache.ambari.server.upgrade.UpgradeCatalog213.executeStackUpgradeDDLUpdates(UpgradeCatalog213.java:443)
> at
> org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:68)
> {code}
> {code}
> select * from upgrade;
> upgrade_id | cluster_id | request_id | from_version | to_version |
> direction
> ------------+------------+------------+--------------+--------------+-----------
> 1 | 2 | 1295 | 2.2.0.0-2041 | 2.2.4.2-2 | UPGRADE
> 2 | 2 | 1296 | 2.2.0.0-2041 | 2.2.0.0-2041 |
> DOWNGRADE
> 3 | 2 | 1299 | 2.2.0.0-2041 | 2.2.4.2 | UPGRADE
> 4 | 2 | 1300 | 2.2.0.0-2041 | 2.2.0.0-2041 |
> DOWNGRADE
> 5 | 2 | 1331 | 2.2.0.0-2041 | 2.2.4.2-2 | UPGRADE
> 6 | 2 | 1332 | 2.2.0.0-2041 | 2.2.0.0-2041 |
> DOWNGRADE
> 7 | 2 | 1333 | 2.2.0.0-2041 | 2.2.4.2-2 | UPGRADE
> 8 | 2 | 1334 | 2.2.0.0-2041 | 2.2.0.0-2041 |
> DOWNGRADE
> 9 | 2 | 1335 | 2.2.0.0-2041 | 2.2.4.2-2 | UPGRADE
> 10 | 2 | 1336 | 2.2.0.0-2041 | 2.2.0.0-2041 |
> DOWNGRADE
> 11 | 2 | 1347 | 2.2.0.0-2041 | 2.2.4.2-2 | UPGRADE
> (11 rows)
> {code}
> The upgrade failed because of missing -2 which could not match the correct
> {{repo_version}}.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)