ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-15162) UpgradeCatalog230 is not idempotent
Date Wed, 24 Feb 2016 20:46:18 GMT

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

Hudson commented on AMBARI-15162:
---------------------------------

FAILURE: Integrated in Ambari-trunk-Commit #4383 (See [https://builds.apache.org/job/Ambari-trunk-Commit/4383/])
AMBARI-15162. UpgradeCatalog230 is not idempotent (rlevas) (rlevas: [http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=3f33edf50aeecca3396a62ef395b44c29b1d3065])
* ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog230.java
* ambari-server/src/main/java/org/apache/ambari/server/orm/dao/RoleAuthorizationDAO.java
* ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessorImpl.java
* ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
* ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog230Test.java
* ambari-server/src/main/java/org/apache/ambari/server/orm/DBAccessor.java


> UpgradeCatalog230 is not idempotent
> -----------------------------------
>
>                 Key: AMBARI-15162
>                 URL: https://issues.apache.org/jira/browse/AMBARI-15162
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.3.0
>            Reporter: Robert Levas
>            Assignee: Robert Levas
>            Priority: Critical
>              Labels: upgrade
>             Fix For: 2.4.0
>
>         Attachments: AMBARI-15162_trunk_01.patch
>
>
> If ambari-server upgrade is run again, the following error is encountered. One easy way
to test it is to set the version in the DB to an older version and then call ambari-server
upgrade.
> e.g. {{update metainfo set metainfo_value = '2.2.0' where neatinfo_key = 'version';}}
>  
> {code}
> Error output from schema upgrade command:
> Exception in thread "main" org.apache.ambari.server.AmbariException: Exception [EclipseLink-4002]
(Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: org.postgresql.util.PSQLException: ERROR: duplicate key value violates
unique constraint "adminpermission_pkey"
> Error Code: 0
> Call: INSERT INTO adminpermission (permission_id, permission_label, permission_name,
sort_order, resource_type_id) VALUES (?, ?, ?, ?, ?)
> 	bind => [5 parameters bound]
> 	at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:233)
> 	at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:307)
> Caused by: javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse
Persistence Services - 2.5.2.v20140319-9ad6abd): org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: org.postgresql.util.PSQLException: ERROR: duplicate key value violates
unique constraint "adminpermission_pkey"
> Error Code: 0
> Call: INSERT INTO adminpermission (permission_id, permission_label, permission_name,
sort_order, resource_type_id) VALUES (?, ?, ?, ?, ?)
> 	bind => [5 parameters bound]
> 	at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:157)
> 	at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:91)
> 	at org.apache.ambari.server.upgrade.UpgradeCatalog230.addNewPermissions(UpgradeCatalog230.java:144)
> 	at org.apache.ambari.server.upgrade.UpgradeCatalog230.executeDMLUpdates(UpgradeCatalog230.java:127)
> 	at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:659)
> 	at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:230)
> 	... 1 more
> Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.5.2.v20140319-9ad6abd):
org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: org.postgresql.util.PSQLException: ERROR: duplicate key value violates
unique constraint "adminpermission_pkey"
> Error Code: 0
> Call: INSERT INTO adminpermission (permission_id, permission_label, permission_name,
sort_order, resource_type_id) VALUES (?, ?, ?, ?, ?)
> 	bind => [5 parameters bound]
> 	at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processExceptionForCommError(DatabaseAccessor.java:1611)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:898)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:962)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:631)
> 	at org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatch(ParameterizedSQLBatchWritingMechanism.java:149)
> 	at org.eclipse.persistence.internal.databaseaccess.ParameterizedSQLBatchWritingMechanism.executeBatchedStatements(ParameterizedSQLBatchWritingMechanism.java:134)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.writesCompleted(DatabaseAccessor.java:1836)
> 	at org.eclipse.persistence.internal.sessions.AbstractSession.writesCompleted(AbstractSession.java:4244)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message