brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From neykov <>
Subject [GitHub] brooklyn-server pull request #617: Persist management plane ID
Date Wed, 19 Apr 2017 12:16:40 GMT
Github user neykov commented on a diff in the pull request:
    --- Diff: core/src/main/java/org/apache/brooklyn/core/mgmt/internal/
    @@ -224,6 +224,7 @@ public String getManagementPlaneId() {
         public void setManagementPlaneId(String newPlaneId) {
             if (managementPlaneId != null && !managementPlaneId.equals(newPlaneId))
                 log.warn("Management plane ID changed from {} to {}", managementPlaneId,
    +            log.debug("Management plane ID changed from {} to {}", new Object[] {managementPlaneId,
newPlaneId}, new RuntimeException("Stack trace for setManagementPlaneId"));
    --- End diff --
    Good spot @geomacy. The fix might surprise you though (it surely did surprise me):
    log.debug("Management plane ID changed from {} to {}", new Object[] {managementPlaneId,
newPlaneId, new RuntimeException("Stack trace for setManagementPlaneId")});
    Turns out slf4j will [do the right thing](
in this case and log the last argument as an exception. Verified the debug log contains:
    2017-04-19 15:11:34,011 DEBUG o.a.b.c.m.i.LocalManagementContext [brooklyn-execmanager-KWNkyI3R-3]:
Management plane ID changed from X7dpWzuF to wJl3j3K1
    java.lang.RuntimeException: Stack trace for setManagementPlaneId
            at org.apache.brooklyn.core.mgmt.internal.LocalManagementContext.setManagementPlaneId(
            at org.apache.brooklyn.core.mgmt.ha.HighAvailabilityManagerImpl.updateLocalPlaneId(
            at org.apache.brooklyn.core.mgmt.ha.HighAvailabilityManagerImpl.checkMaster(
            at org.apache.brooklyn.core.mgmt.ha.HighAvailabilityManagerImpl.publishAndCheck(
            at org.apache.brooklyn.core.mgmt.ha.HighAvailabilityManagerImpl$
            at java.util.concurrent.Executors$ [na:1.7.0_80]
            at org.apache.brooklyn.util.core.task.BasicExecutionManager$ScheduledTaskCallable$
            at org.apache.brooklyn.util.core.task.BasicExecutionManager$
            at [na:1.7.0_80]
            at java.util.concurrent.ThreadPoolExecutor.runWorker(
            at java.util.concurrent.ThreadPoolExecutor$
            at [na:1.7.0_80]

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 or file a JIRA ticket
with INFRA.

View raw message