brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aled Sage (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BROOKLYN-278) default Propagator enricher can cause infinite subscription event loop
Date Mon, 23 May 2016 13:20:12 GMT

     [ https://issues.apache.org/jira/browse/BROOKLYN-278?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Aled Sage updated BROOKLYN-278:
-------------------------------
    Description: 
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}


  was:
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:

{nofromat}
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}



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

Mime
View raw message