ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jonathan Hurley <jhur...@hortonworks.com>
Subject Re: Review Request 43429: CLUSTER.MANAGE_CONFIG_GROUPS not present in table 'roleauthorization' error during upgrade from 2.2.1 to 2.4.0
Date Thu, 11 Feb 2016 13:43:26 GMT

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


Ship it!




Ship It!

- Jonathan Hurley


On Feb. 10, 2016, 2:37 p.m., Robert Levas wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43429/
> -----------------------------------------------------------
> 
> (Updated Feb. 10, 2016, 2:37 p.m.)
> 
> 
> Review request for Ambari, Jonathan Hurley, Nate Cole, and Robert Nettleton.
> 
> 
> Bugs: AMBARI-14994
>     https://issues.apache.org/jira/browse/AMBARI-14994
> 
> 
> Repository: ambari
> 
> 
> Description
> -------
> 
> While attempting to upgrade from Ambari 2.2.x to Ambari 2.4.0, the following error is
encountered:
> 
> ```
> Upgrading database schema
> Error output from schema upgrade command:
> 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
> ```
> 
> # Solution
> Add the missing record during the upgrade process (which should have be added, but apparently
accidentally left out)
> 
> 
> Diffs
> -----
> 
>   ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog230.java
2d6fe03 
> 
> Diff: https://reviews.apache.org/r/43429/diff/
> 
> 
> Testing
> -------
> 
> Manually tested upgrade
> 
> 
> Thanks,
> 
> Robert Levas
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message