[
https://issues.apache.org/jira/browse/BROOKLYN-278?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15303934#comment-15303934
]
ASF GitHub Bot commented on BROOKLYN-278:
-----------------------------------------
Github user sjcorbett commented on the pull request:
https://github.com/apache/brooklyn-server/pull/154#issuecomment-222119849
@aledsage This seems to break
`EnrichersSlightlySimplerYamlTest.testWithAppEnricher`:
```
testWithAppEnricher(org.apache.brooklyn.qa.camp.EnrichersSlightlySimplerYamlTest)
Time elapsed: 1.235 sec <<< FAILURE!
org.apache.brooklyn.util.exceptions.PropagatedRuntimeException:
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at
com.google.common.util.concurrent.ForwardingFuture.get(ForwardingFuture.java:63)
at org.apache.brooklyn.util.core.task.BasicTask.get(BasicTask.java:361)
at
org.apache.brooklyn.util.core.task.BasicTask.getUnchecked(BasicTask.java:370)
at
org.apache.brooklyn.core.objs.proxy.InternalEntityFactory.initEntityAndDescendants(InternalEntityFactory.java:361)
at
org.apache.brooklyn.core.objs.proxy.InternalEntityFactory.createEntity(InternalEntityFactory.java:188)
at
org.apache.brooklyn.core.mgmt.internal.LocalEntityManager.createEntity(LocalEntityManager.java:145)
at
org.apache.brooklyn.camp.brooklyn.AbstractYamlTest.createAndStartApplication(AbstractYamlTest.java:128)
at
org.apache.brooklyn.camp.brooklyn.AbstractYamlTest.createAndStartApplication(AbstractYamlTest.java:123)
at
org.apache.brooklyn.camp.brooklyn.AbstractYamlTest.createAndStartApplication(AbstractYamlTest.java:119)
at
org.apache.brooklyn.qa.camp.EnrichersSlightlySimplerYamlTest.testWithAppEnricher(EnrichersSlightlySimplerYamlTest.java:57)
Caused by: java.lang.IllegalStateException: Propagator enricher
Propagator{running=true, entity=BasicApplicationImpl{id=B4jktQsQ}, id=FH9VxCyW}
must have 'propagating' and/or 'sensorMapping', or 'propagatingAll' or
'propagatingAllBut' set
at
org.apache.brooklyn.enricher.stock.Propagator.setEntity(Propagator.java:106)
at
org.apache.brooklyn.core.entity.AbstractEntity$BasicEnricherSupport.add(AbstractEntity.java:1746)
at
org.apache.brooklyn.core.objs.proxy.InternalEntityFactory$1.run(InternalEntityFactory.java:344)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at
org.apache.brooklyn.util.core.task.BasicExecutionManager$SubmissionCallable.call(BasicExecutionManager.java:519)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
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)
```
Will fix.
> default Propagator enricher can cause infinite subscription event loop
> ----------------------------------------------------------------------
>
> Key: BROOKLYN-278
> URL: https://issues.apache.org/jira/browse/BROOKLYN-278
> Project: Brooklyn
> Issue Type: Bug
> Affects Versions: 0.9.0
> Reporter: Aled Sage
> Fix For: 0.10.0
>
>
> The default {{Propagator}} can cause an infinite loop: it subscribes to all
> sensor events from that entity, and republishes them!
> For example, the blueprint below demonstrates this:
> {noformat}
> location: localhost
> services:
> - type: org.apache.brooklyn.entity.stock.BasicApplication
> brooklyn.enrichers:
> - type: org.apache.brooklyn.enricher.stock.Propagator
> {noformat}
> This shows repeated log messages like:
> {noformat}
> 2016-05-23 14:09:09,069 DEBUG o.a.b.c.entity.AbstractEntity
> [brooklyn-execmanager-B5OU5RXp-6]: Emitting sensor notification
> entity.location.added value LocalhostMachineProvisioningLocation{id=U27ANQ3v,
> name=localhost} on BasicApplicationImpl{id=C8KeD18W}
> {noformat}
> I'd expect such missing propagator config to cause it to fail. Or if it was
> misconfigured to cause an infinite loop, then that would also cause a failure.
> For example, the blueprint below also produces an infinite loop and should be
> forbidden:
> {noformat}
> location: localhost
> services:
> - type: org.apache.brooklyn.entity.stock.BasicApplication
> id: app
> brooklyn.enrichers:
> - type: org.apache.brooklyn.enricher.stock.Propagator
> brooklyn.config:
> producer: $brooklyn:entity("app")
> propagatingAll: true
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)