You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ambari.apache.org by "Jonathan Hurley (JIRA)" <ji...@apache.org> on 2016/01/14 21:35:39 UTC
[jira] [Updated] (AMBARI-14674) Cannot Finalize Downgrade Due To
Detached ClusterEntity
[ https://issues.apache.org/jira/browse/AMBARI-14674?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jonathan Hurley updated AMBARI-14674:
-------------------------------------
Attachment: AMBARI-14674.patch
> Cannot Finalize Downgrade Due To Detached ClusterEntity
> -------------------------------------------------------
>
> Key: AMBARI-14674
> URL: https://issues.apache.org/jira/browse/AMBARI-14674
> Project: Ambari
> Issue Type: Bug
> Components: ambari-server
> Affects Versions: 2.2.1
> Reporter: Jonathan Hurley
> Assignee: Jonathan Hurley
> Priority: Critical
> Fix For: 2.2.1
>
> Attachments: AMBARI-14674.patch
>
>
> RU HDP 2.2 to 2.4 downgrade results in:
> {code}
> java.lang.IllegalArgumentException: Can not refresh not managed object: org.apache.ambari.server.orm.entities.ClusterEntity@18126.
> at org.eclipse.persistence.internal.jpa.EntityManagerImpl.refresh(EntityManagerImpl.java:1024)
> at org.eclipse.persistence.internal.jpa.EntityManagerImpl.refresh(EntityManagerImpl.java:929)
> at org.apache.ambari.server.orm.dao.ClusterDAO.refresh(ClusterDAO.java:309)
> at org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:68)
> at org.apache.ambari.server.state.cluster.ClusterImpl.removeConfigurations(ClusterImpl.java:3216)
> at org.apache.ambari.server.serveraction.upgrades.FinalizeUpgradeAction.finalizeDowngrade(FinalizeUpgradeAction.java:314)
> at org.apache.ambari.server.serveraction.upgrades.FinalizeUpgradeAction.execute(FinalizeUpgradeAction.java:116)
> at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.execute(ServerActionExecutor.java:537)
> at org.apache.ambari.server.serveraction.ServerActionExecutor$Worker.run(ServerActionExecutor.java:474)
> at java.lang.Thread.run(Thread.java:745)
> {code}
> It seems like what's happening is that the ClusterEntity is being retrieved outside of a JPA session. Although the ClusterDAO creates the session, it also ends it, leaving the Entity detached. We should instead be refreshing this Entity within the bounds of the Transaction.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)