ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hudson (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AMBARI-14674) Cannot Finalize Downgrade Due To Detached ClusterEntity
Date Fri, 15 Jan 2016 23:56:39 GMT

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

Hudson commented on AMBARI-14674:
---------------------------------

FAILURE: Integrated in Ambari-branch-2.2 #209 (See [https://builds.apache.org/job/Ambari-branch-2.2/209/])
AMBARI-14674 - Cannot Finalize Downgrade Due To Detached ClusterEntity (jhurley: [http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=cc8d1ebe25acbcd24888b7ecfa52ebc982286d48])
* ambari-server/src/main/java/org/apache/ambari/server/state/cluster/ClusterImpl.java
* ambari-server/src/main/java/org/apache/ambari/server/orm/entities/ClusterConfigEntity.java
* ambari-server/src/test/java/org/apache/ambari/server/state/cluster/ClusterTest.java
* ambari-server/src/main/java/org/apache/ambari/server/upgrade/UpgradeCatalog170.java
* ambari-server/src/test/java/org/apache/ambari/server/orm/dao/ServiceConfigDAOTest.java
* ambari-server/src/main/java/org/apache/ambari/server/orm/dao/ClusterDAO.java


> 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)

Mime
View raw message