ambari-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Speidel (JIRA)" <j...@apache.org>
Subject [jira] [Created] (AMBARI-11867) JPA persistence failure when adding hosts to an existing config group
Date Thu, 11 Jun 2015 21:14:00 GMT
John Speidel created AMBARI-11867:
-------------------------------------

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

Mime
View raw message