Here's a PR with the suggested fix [1]. Svet.
[1] https://github.com/apache/brooklyn-server/pull/148/files <https://github.com/apache/brooklyn-server/pull/148/files> > On 23.05.2016 г., at 13:35, Svetoslav Neykov > <[email protected]> wrote: > > The behaviour Brooklyn follows about locations is that the owner of the > location (the one who created it) is responsible for unmanaging it. This > falls short when the location is created as part of a CAMP blueprint or an > EntitySpec because there's no clear owner in this case. I've created a PR [1] > that illustrates the problem. What happens is that any location created in a > blueprint gets to stay around after the application is unmanaged. > > The fix I suggest (and currently working on) is to tag the locations that are > created by the runtime as part of EntitySpec instantiation. When unmanaging > entities that have tagged locations to destroy the locations as well. The > downside is that tagged locations should not be shared between entities > except through the parent-child relation. If there's actual need for sharing > a location between entities the user would have custom java code anyway and > will be able to manage the location himself. > > Svet. > > [1] https://github.com/apache/brooklyn-server/pull/148
