This is an automated email from the ASF dual-hosted git repository.
heneveld pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/brooklyn-server.git
The following commit(s) were added to refs/heads/master by this push:
new 62364d8b97 add debug logging for when entities are unmanaging
62364d8b97 is described below
commit 62364d8b9772275d538eba1ff9000365b753025e
Author: Alex Heneveld <[email protected]>
AuthorDate: Fri Jun 2 10:15:54 2023 +0100
add debug logging for when entities are unmanaging
find out why VanillaSPTest.testUseSshMonitoringDisabled fails occasionally
at server
---
.../org/apache/brooklyn/core/mgmt/internal/LocalEntityManager.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalEntityManager.java
b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalEntityManager.java
index 2b32edfe74..91e4c1d08c 100644
---
a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalEntityManager.java
+++
b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalEntityManager.java
@@ -525,8 +525,8 @@ public class LocalEntityManager implements
EntityManagerInternal {
private void unmanageDryRun(final Entity e) {
final ManagementTransitionInfo info = new
ManagementTransitionInfo(managementContext,
ManagementTransitionMode.transitioning(BrooklynObjectManagementMode.NONEXISTENT,
BrooklynObjectManagementMode.NONEXISTENT));
+ log.debug("Unmanaging "+e+" (dry run)");
discardPremanaged(e);
-
((EntityInternal)e).getManagementSupport().onManagementStopping(info,
true);
stopTasks(e);
((EntityInternal)e).getManagementSupport().onManagementStopped(info,
true);
@@ -535,6 +535,7 @@ public class LocalEntityManager implements
EntityManagerInternal {
private void unmanage(final Entity e, ManagementTransitionMode mode,
boolean hasBeenReplaced) {
if (shouldSkipUnmanagement(e, hasBeenReplaced)) return;
final ManagementTransitionInfo info = new
ManagementTransitionInfo(managementContext, mode);
+ log.debug("Unmanaging "+e+" (mode "+mode+", replaced
"+hasBeenReplaced+")");
if (hasBeenReplaced) {
// we are unmanaging an old instance after having replaced it
// don't unmanage or even clear its fields, because there might be
references to it