ambari-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-19984) ambari-server upgrade is not idempotent
Date Wed, 15 Feb 2017 13:46:41 GMT

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

Hudson commented on AMBARI-19984:
---------------------------------

FAILURE: Integrated in Jenkins build Ambari-trunk-Commit #6747 (See [https://builds.apache.org/job/Ambari-trunk-Commit/6747/])
AMBARI-19984. ambari-server upgrade is not idempotent (magyari_sandor) (smagyari: [http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=513b527564cef89dff2154504ef4108d6eea5123])
* (edit) ambari-server/src/main/java/org/apache/ambari/server/orm/entities/PermissionEntity.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/security/authorization/internal/InternalAuthenticationToken.java
* (edit) ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog242Test.java
* (edit) ambari-server/src/test/java/org/apache/ambari/server/security/TestAuthenticationFactory.java
* (edit) ambari-server/src/test/java/org/apache/ambari/server/security/authorization/AuthorizationHelperTest.java
* (edit) ambari-server/src/main/java/org/apache/ambari/server/upgrade/AbstractUpgradeCatalog.java
* (edit) ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog250Test.java


> ambari-server upgrade is not idempotent
> ---------------------------------------
>
>                 Key: AMBARI-19984
>                 URL: https://issues.apache.org/jira/browse/AMBARI-19984
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>            Reporter: Attila Magyar
>            Assignee: Attila Magyar
>         Attachments: AMBARI-19984_branch-2.5.patch, AMBARI-19984_trunk.patch
>
>
> # Upgraded Ambari from 2.4.0 to 2.5.0
> # Set the version in metainfo back to 2.4.0
> # update metainfo set metainfo_value = '2.4.0' where metainfo_key = 'version';
> # Executed ambari-server upgrade again.
> Result:
> {code}
> ERROR: Exception in thread "main" org.apache.ambari.server.AmbariException: Exception
[EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: org.postgresql.util.PSQLException: ERROR: duplicate key value violates
unique constraint "pk_permsn_roleauthorization"
> Error Code: 0
> Call: INSERT INTO permission_roleauthorization (authorization_id, permission_id) VALUES
(?, ?)
> 	bind => [2 parameters bound]
> 	at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:240)
> 	at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:430)
> Caused by: javax.persistence.RollbackException: Exception [EclipseLink-4002] (Eclipse
Persistence Services - 2.6.2.v20151217-774c696): org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: org.postgresql.util.PSQLException: ERROR: duplicate key value violates
unique constraint "pk_permsn_roleauthorization"
> Error Code: 0
> Call: INSERT INTO permission_roleauthorization (authorization_id, permission_id) VALUES
(?, ?)
> 	bind => [2 parameters bound]
> 	at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:159)
> 	at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:153)
> 	at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.addAuthorizationToRole(AbstractUpgradeCatalog.java:887)
> 	at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.addRoleAuthorization(AbstractUpgradeCatalog.java:847)
> 	at org.apache.ambari.server.upgrade.UpgradeCatalog250.addManageServiceAutoStartPermissions(UpgradeCatalog250.java:907)
> 	at org.apache.ambari.server.upgrade.UpgradeCatalog250.executeDMLUpdates(UpgradeCatalog250.java:172)
> 	at org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:952)
> 	at org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:237)
> 	... 1 more
> Caused by: Exception [EclipseLink-4002] (Eclipse Persistence Services - 2.6.2.v20151217-774c696):
org.eclipse.persistence.exceptions.DatabaseException
> Internal Exception: org.postgresql.util.PSQLException: ERROR: duplicate key value violates
unique constraint "pk_permsn_roleauthorization"
> Error Code: 0
> Call: INSERT INTO permission_roleauthorization (authorization_id, permission_id) VALUES
(?, ?)
> 	bind => [2 parameters bound]
> 	at org.eclipse.persistence.exceptions.DatabaseException.sqlException(DatabaseException.java:340)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.processExceptionForCommError(DatabaseAccessor.java:1620)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:900)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeNoSelect(DatabaseAccessor.java:964)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:633)
> 	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:1845)
> 	at org.eclipse.persistence.internal.sessions.AbstractSession.writesCompleted(AbstractSession.java:4300)
> 	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.writesCompleted(UnitOfWorkImpl.java:5592)
> 	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.acquireWriteLocks(UnitOfWorkImpl.java:1646)
> 	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitTransactionAfterWriteChanges(UnitOfWorkImpl.java:1614)
> 	at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitRootUnitOfWork(RepeatableWriteUnitOfWork.java:285)
> 	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitAndResume(UnitOfWorkImpl.java:1169)
> 	at org.eclipse.persistence.internal.jpa.transaction.EntityTransactionImpl.commit(EntityTransactionImpl.java:134)
> 	... 8 more
> Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique
constraint "pk_permsn_roleauthorization"
> 	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:417)
> 	at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:363)
> 	at org.eclipse.persistence.internal.databaseaccess.DatabaseAccessor.executeDirectNoSelect(DatabaseAccessor.java:892)
> 	... 20 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message