Github user aledsage commented on a diff in the pull request: https://github.com/apache/brooklyn-server/pull/356#discussion_r81239553 --- Diff: core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/BasicEntityRebindSupport.java --- @@ -237,13 +239,21 @@ protected void addLocations(RebindContext rebindContext, EntityMemento memento) } } } - + + @Override protected void instanceRebind(AbstractBrooklynObject instance) { Preconditions.checkState(instance == entity, "Expected %s and %s to match, but different objects", instance, entity); Lifecycle expectedState = ServiceStateLogic.getExpectedState(entity); if (expectedState == Lifecycle.STARTING || expectedState == Lifecycle.STOPPING) { - LOG.warn("Entity "+entity); + LOG.warn("Entity {} goes on-fire because it was in state {} on rebind", + entity, ServiceStateLogic.getExpectedState(entity)); + LOG.warn("not-up-indicators={}", entity.getAttribute(Attributes.SERVICE_NOT_UP_INDICATORS)); ServiceStateLogic.setExpectedState(entity, Lifecycle.ON_FIRE); + + if (!(entity instanceof BasicApplication) && entity.getLocations().isEmpty()) { + LOG.warn("Rebind happened during provisioning for entity {} with parent {}" + --- End diff -- Unfortunately this is too general. There are some entity types that will not necessarily have locations (e.g. that are not software processes, but instead bind to an API etc. For example, the `GistGenerator` docs example in http://docs.cloudsoft.io/blueprints/java/defining-and-deploying.html. Let's take this out, and come back to it in a separate PR.
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---