Return-Path: X-Original-To: apmail-ambari-dev-archive@www.apache.org Delivered-To: apmail-ambari-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9D4D918A38 for ; Wed, 2 Mar 2016 16:32:18 +0000 (UTC) Received: (qmail 95911 invoked by uid 500); 2 Mar 2016 16:32:18 -0000 Delivered-To: apmail-ambari-dev-archive@ambari.apache.org Received: (qmail 95840 invoked by uid 500); 2 Mar 2016 16:32:18 -0000 Mailing-List: contact dev-help@ambari.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ambari.apache.org Delivered-To: mailing list dev@ambari.apache.org Received: (qmail 95731 invoked by uid 99); 2 Mar 2016 16:32:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Mar 2016 16:32:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 333972C1F5C for ; Wed, 2 Mar 2016 16:32:18 +0000 (UTC) Date: Wed, 2 Mar 2016 16:32:18 +0000 (UTC) From: "Hudson (JIRA)" To: dev@ambari.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (AMBARI-15253) Ambari upgrade fails if there is incorrect version in upgrade table MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/AMBARI-15253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15175887#comment-15175887 ] Hudson commented on AMBARI-15253: --------------------------------- FAILURE: Integrated in Ambari-trunk-Commit #4425 (See [https://builds.apache.org/job/Ambari-trunk-Commit/4425/]) 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=43d3a27c5541af661108677658040550dae3e1e4]) * 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)