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

Hudson commented on AMBARI-11867:
---------------------------------

SUCCESS: Integrated in Ambari-branch-2.1 #11 (See 
[https://builds.apache.org/job/Ambari-branch-2.1/11/])
AMBARI-11867.  Fix adding of host to config group during blueprint provisioning 
(jspeidel: 
http://git-wip-us.apache.org/repos/asf?p=ambari.git&a=commit&h=0bf83a6d3e9efdf90bbe3462af309b10f9af88f9)
* 
ambari-server/src/test/java/org/apache/ambari/server/topology/AmbariContextTest.java
* 
ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroup.java
* 
ambari-server/src/main/java/org/apache/ambari/server/topology/AmbariContext.java
* 
ambari-server/src/main/java/org/apache/ambari/server/state/configgroup/ConfigGroupImpl.java


> JPA persistence failure when adding hosts to an existing config group
> ---------------------------------------------------------------------
>
>                 Key: AMBARI-11867
>                 URL: https://issues.apache.org/jira/browse/AMBARI-11867
>             Project: Ambari
>          Issue Type: Bug
>          Components: ambari-server
>    Affects Versions: 2.1.0
>            Reporter: John Speidel
>            Assignee: John Speidel
>            Priority: Critical
>             Fix For: 2.1.0
>
>
> Adding a host to an existing config group results in a JPA exception. 
> This breaks blueprint provisioning/scaling where a host with host group 
> configuration is added to a cluster.
> The BP processor is adding a host to a ConfigGroup instance and persisting it:
> group.addHost(host)
> group.persist();
> To reproduce, provision a cluster with a master and a slave. For the slave, 
> add a host group scoped configuration (one property is sufficient). After the 
> cluster is provisioned, add a new slave to the cluster. This will result in 
> the below exception.
> This may also occur when provisioning a large cluster where not all slaves 
> have joined the cluster when the config group is created and with very large 
> clusters it may occur even of all hosts have already registered with the 
> cluster prior to provisioning.
> avax.persistence.PersistenceException: 
> java.util.ConcurrentModificationException
> at 
> org.eclipse.persistence.internal.jpa.QueryImpl.executeUpdate(QueryImpl.java:308)
> at org.apache.ambari.server.orm.dao.DaoUtils.executeUpdate(DaoUtils.java:88)
> at 
> org.apache.ambari.server.orm.dao.ConfigGroupConfigMappingDAO.removeAllByGroup(ConfigGroupConfigMappingDAO.java:101)
> at 
> org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:60)
> at 
> org.apache.ambari.server.state.configgroup.ConfigGroupImpl.persistConfigMapping(ConfigGroupImpl.java:403)
> at 
> org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:60)
> at 
> org.apache.ambari.server.state.configgroup.ConfigGroupImpl.saveIfPersisted(ConfigGroupImpl.java:460)
> at 
> org.apache.ambari.server.orm.AmbariJpaLocalTxnInterceptor.invoke(AmbariJpaLocalTxnInterceptor.java:68)
> at 
> org.apache.ambari.server.state.configgroup.ConfigGroupImpl.persist(ConfigGroupImpl.java:330)
> at 
> org.apache.ambari.server.topology.AmbariContext.addHostToExistingConfigGroups(AmbariContext.java:409)
> at 
> org.apache.ambari.server.topology.AmbariContext.registerHostWithConfigGroup(AmbariContext.java:285)
> at 
> org.apache.ambari.server.topology.HostRequest$RegisterWithConfigGroupTask.run(HostRequest.java:450)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.util.ConcurrentModificationException
> at 
> java.util.IdentityHashMap$IdentityHashMapIterator.nextIndex(IdentityHashMap.java:734)
> at java.util.IdentityHashMap$KeyIterator.next(IdentityHashMap.java:825)
> at 
> org.eclipse.persistence.internal.sessions.CollectionChangeRecord.mergeRecord(CollectionChangeRecord.java:260)
> at 
> org.eclipse.persistence.internal.sessions.ObjectChangeSet.mergeObjectChanges(ObjectChangeSet.java:740)
> at 
> org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet.mergeObjectChanges(UnitOfWorkChangeSet.java:492)
> at 
> org.eclipse.persistence.internal.sessions.UnitOfWorkChangeSet.mergeUnitOfWorkChangeSet(UnitOfWorkChangeSet.java:509)
> at 
> org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:466)
> at 
> org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:863)
> at 
> org.eclipse.persistence.internal.jpa.QueryImpl.performPreQueryFlush(QueryImpl.java:963)
> at 
> org.eclipse.persistence.internal.jpa.QueryImpl.executeUpdate(QueryImpl.java:296)
> ... 14 more
> Exception in thread "pool-3-thread-1" java.lang.RuntimeException: Unable to 
> register config group for host: c6404.ambari.apache.org
> at 
> org.apache.ambari.server.topology.AmbariContext.registerHostWithConfigGroup(AmbariContext.java:290)
> at 
> org.apache.ambari.server.topology.HostRequest$RegisterWithConfigGroupTask.run(HostRequest.java:450)
> at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to