You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ambari.apache.org by "Hudson (JIRA)" <ji...@apache.org> on 2017/09/06 17:55:00 UTC

[jira] [Commented] (AMBARI-21883) Upgrade to Ambari 2.6.0 fails with DB constraint violation on fk_sc_history_upgrade_id

    [ https://issues.apache.org/jira/browse/AMBARI-21883?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16155792#comment-16155792 ] 

Hudson commented on AMBARI-21883:
---------------------------------

FAILURE: Integrated in Jenkins build Ambari-branch-2.6 #147 (See [https://builds.apache.org/job/Ambari-branch-2.6/147/])
AMBARI-21883. Upgrade to Ambari 2.6.0 fails with DB constraint violation (dlysnichenko: [http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=8187ecddaedeaf0621f14f2fcca0c492d9372380])
* (edit) ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog260.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/checks/DatabaseConsistencyCheckHelper.java


> Upgrade to Ambari 2.6.0 fails with DB constraint violation on fk_sc_history_upgrade_id
> --------------------------------------------------------------------------------------
>
>                 Key: AMBARI-21883
>                 URL: https://issues.apache.org/jira/browse/AMBARI-21883
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.6.0
>            Reporter: Dmitry Lysnichenko
>            Assignee: Dmitry Lysnichenko
>            Priority: Blocker
>             Fix For: 2.6.0
>
>         Attachments: AMBARI-21883.patch
>
>
> When performing an Ambari upgrade to Ambari 2.6.0 using {{ambari-server upgrade}}, the process fails with the following error:
> {noformat}
> 01 Sep 2017 14:36:24,340 ERROR [main] DBAccessorImpl:882 - Error executing query: DELETE FROM upgrade
> org.postgresql.util.PSQLException: ERROR: update or delete on table "upgrade" violates foreign key constraint "fk_sc_history_upgrade_id" on table "servicecomponent_history"
> Detail: Key (upgrade_id)=(1) is still referenced from table "servicecomponent_history".
> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2161)
> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1890)
> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:559)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:403)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:395)
> at org.apache.ambari.server.orm.DBAccessorImpl.executeQuery(DBAccessorImpl.java:879)
> at org.apache.ambari.server.orm.DBAccessorImpl.executeQuery(DBAccessorImpl.java:871)
> at org.apache.ambari.server.orm.DBAccessorImpl.clearTable(DBAccessorImpl.java:1502)
> at org.apache.ambari.server.upgrade.UpgradeCatalog260.updateUpgradeTable(UpgradeCatalog260.java:225)
> at org.apache.ambari.server.upgrade.UpgradeCatalog260.executeDDLUpdates(UpgradeCatalog260.java:153)
> at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeSchema(AbstractUpgradeCatalog.java:923)
> at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeUpgrade(SchemaUpgradeHelper.java:197)
> at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:415)
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)