Sebastian Toader created AMBARI-21427: -----------------------------------------
Summary: Assigning hosts concurrently to same config group may fail with "org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException: Config group already exist' Key: AMBARI-21427 URL: https://issues.apache.org/jira/browse/AMBARI-21427 Project: Ambari Issue Type: Bug Components: ambari-server Affects Versions: 2.5.0 Reporter: Sebastian Toader Assignee: Sebastian Toader Fix For: 2.5.2 Assigning hosts concurrently to the same config group may fail due to a race condition causing the config group to be created twice: {noformat} 05 Jul 2017 18:50:44,742 INFO [pool-5-thread-2] RegisterWithConfigGroupTask:45 - HostRequest: Executing CONFIGURE task for host: w1.internal 05 Jul 2017 18:50:44,884 ERROR [pool-5-thread-2] AmbariContext:655 - Failed to create new configuration group: org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException: Config group already exists with the same name and tag, clusterName = mycluster, groupName = myblueprint:group1, tag = HDFS 05 Jul 2017 18:50:44,885 ERROR [pool-5-thread-2] AmbariContext:342 - Unable to register config group for host: java.lang.RuntimeException: Failed to create new configuration group: org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException: Config group already exists with the same name and tag, clusterName = mycluster, groupName = myblueprint:group1, tag = HDFS at org.apache.ambari.server.topology.AmbariContext.createConfigGroupsAndRegisterHost(AmbariContext.java:656) at org.apache.ambari.server.topology.AmbariContext.registerHostWithConfigGroup(AmbariContext.java:339) at org.apache.ambari.server.topology.tasks.RegisterWithConfigGroupTask.runTask(RegisterWithConfigGroupTask.java:46) at org.apache.ambari.server.topology.tasks.TopologyHostTask.run(TopologyHostTask.java:51) at org.apache.ambari.server.topology.HostOfferResponse$1.run(HostOfferResponse.java:83) 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:748) Caused by: org.apache.ambari.server.controller.spi.ResourceAlreadyExistsException: Config group already exists with the same name and tag, clusterName = mycluster, groupName = myblueprint:group1, tag = HDFS at org.apache.ambari.server.controller.internal.AbstractResourceProvider.createResources(AbstractResourceProvider.java:282) at org.apache.ambari.server.controller.internal.ConfigGroupResourceProvider.createResources(ConfigGroupResourceProvider.java:276) at org.apache.ambari.server.topology.AmbariContext.createConfigGroupsAndRegisterHost(AmbariContext.java:653) ... 7 more {noformat} -- This message was sent by Atlassian JIRA (v6.4.14#64029)