I’m going over your changes. I’ll try it out on my VM to see what’s going on.

From: Ajit Kumar 
<[email protected]<mailto:[email protected]>> on behalf of 
Ajit Kumar <[email protected]<mailto:[email protected]>>
Reply-To: Ajit Kumar 
<[email protected]<mailto:[email protected]>>
Date: Monday, February 8, 2016 at 11:06 AM
To: Jayush Luniya <[email protected]<mailto:[email protected]>>, 
Nahappan Somasundaram 
<[email protected]<mailto:[email protected]>>, Sumit 
Mohanty <[email protected]<mailto:[email protected]>>
Cc: Ajit Kumar <[email protected]<mailto:[email protected]>>, 
Ambari <[email protected]<mailto:[email protected]>>
Subject: Re: Review Request 42838: Add upgrade support for Setting feature

This is an automatically generated e-mail. To reply, visit: 
https://reviews.apache.org/r/42838/


I tried to upgrade from 2.2.1 and it is failing while running UpgradeCatalog230.

Exception in thread "main" org.apache.ambari.server.AmbariException: ERROR: 
insert or update on table "permission_roleauthorization" violates foreign key 
constraint "fk_permission_roleauth_aid"
  Detail: Key (authorization_id)=(CLUSTER.MANAGE_CONFIG_GROUPS) is not present 
in table "roleauthorization".
        at 
org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:233)
        at 
org.apache.ambari.server.upgrade.SchemaUpgradeHelper.main(SchemaUpgradeHelper.java:307)
Caused by: org.postgresql.util.PSQLException: ERROR: insert or update on table 
"permission_roleauthorization" violates foreign key constraint 
"fk_permission_roleauth_aid"
  Detail: Key (authorization_id)=(CLUSTER.MANAGE_CONFIG_GROUPS) is not present 
in table "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:403)
        at 
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:331)
        at 
org.apache.ambari.server.orm.DBAccessorImpl.insertRow(DBAccessorImpl.java:635)
        at 
org.apache.ambari.server.upgrade.UpgradeCatalog230.createPermissionRoleAuthorizationMap(UpgradeCatalog230.java:317)
        at 
org.apache.ambari.server.upgrade.UpgradeCatalog230.executeDMLUpdates(UpgradeCatalog230.java:129)
        at 
org.apache.ambari.server.upgrade.AbstractUpgradeCatalog.upgradeData(AbstractUpgradeCatalog.java:659)
        at 
org.apache.ambari.server.upgrade.SchemaUpgradeHelper.executeDMLUpdates(SchemaUpgradeHelper.java:230)
        ... 1 more


- Ajit Kumar


On February 4th, 2016, 12:36 a.m. UTC, Ajit Kumar wrote:

Review request for Ambari, Jayush Luniya, Nahappan Somasundaram, and Sumit 
Mohanty.
By Ajit Kumar.

Updated Feb. 4, 2016, 12:36 a.m.

Bugs: AMBARI-14912<https://issues.apache.org/jira/browse/AMBARI-14912>
Repository: ambari
Description

Update upgrade catalog 240 and add db schema changes for settings table.


Testing

Unit testing. Currently my local trunk build is breaking even w/o my changes. 
I'll run mvn clean install when it is fixed.


Diffs

  *   
ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog240.java
 (3414388b9a738a4fc7cc5d0f484fe553cce840ee)
  *   
ambari-server/src/test/java/org/apache/ambari/server/upgrade/UpgradeCatalog240Test.java
 (d1d68f24871422936321ad0c940499fc1ef4cbec)

View Diff<https://reviews.apache.org/r/42838/diff/>

Reply via email to