ambari-dev mailing list archives

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

             Summary: 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
             Fix For: 2.4.0


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