Uploaded image for project: 'Brooklyn'
  1. Brooklyn
  2. BROOKLYN-278

default Propagator enricher can cause infinite subscription event loop

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.9.0
    • 0.10.0
    • None

    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:

      location: localhost
      services:
      - type: org.apache.brooklyn.entity.stock.BasicApplication
        brooklyn.enrichers:
        - type: org.apache.brooklyn.enricher.stock.Propagator
      

      This shows repeated log messages like:

      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}
      

      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:

      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
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aled.sage Aled Sage
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: