brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From geom...@apache.org
Subject [1/5] brooklyn-server git commit: Persist management plane ID
Date Thu, 20 Apr 2017 08:48:06 GMT
Repository: brooklyn-server
Updated Branches:
  refs/heads/master 745d6de61 -> eb4992e28


Persist management plane ID


Project: http://git-wip-us.apache.org/repos/asf/brooklyn-server/repo
Commit: http://git-wip-us.apache.org/repos/asf/brooklyn-server/commit/e799ca9e
Tree: http://git-wip-us.apache.org/repos/asf/brooklyn-server/tree/e799ca9e
Diff: http://git-wip-us.apache.org/repos/asf/brooklyn-server/diff/e799ca9e

Branch: refs/heads/master
Commit: e799ca9eef7d87aba6d37e6a093207ac5f0ae855
Parents: a940d49
Author: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Authored: Thu Mar 30 17:19:43 2017 +0300
Committer: Svetoslav Neykov <svetoslav.neykov@cloudsoftcorp.com>
Committed: Tue Apr 11 17:55:12 2017 +0300

----------------------------------------------------------------------
 .../brooklyn/api/mgmt/ManagementContext.java    | 16 ++++++-
 .../api/mgmt/ha/ManagementNodeSyncRecord.java   |  2 -
 .../api/mgmt/ha/ManagementPlaneSyncRecord.java  |  2 +-
 .../rebind/PersistenceExceptionHandler.java     |  3 ++
 .../mgmt/rebind/mementos/BrooklynMemento.java   |  2 +
 .../mementos/BrooklynMementoManifest.java       |  2 +
 .../mementos/BrooklynMementoPersister.java      |  2 +
 .../rebind/mementos/BrooklynMementoRawData.java | 17 +++++++-
 .../mgmt/ha/HighAvailabilityManagerImpl.java    | 20 ++++++---
 ...ntPlaneSyncRecordPersisterToObjectStore.java |  6 +++
 .../ha/dto/ManagementPlaneSyncRecordImpl.java   | 11 +++++
 .../mgmt/internal/LocalManagementContext.java   | 34 +++++++++++++--
 .../NonDeploymentManagementContext.java         |  6 +++
 .../BrooklynMementoPersisterToObjectStore.java  | 38 ++++++++++++++++-
 .../mgmt/persist/BrooklynPersistenceUtils.java  |  1 +
 .../rebind/ActivePartialRebindIteration.java    |  5 +++
 .../rebind/PeriodicDeltaChangeListener.java     | 44 +++++++++++++++++---
 .../rebind/PersistenceExceptionHandlerImpl.java | 10 ++++-
 .../core/mgmt/rebind/PersisterDeltaImpl.java    |  7 ++++
 .../core/mgmt/rebind/RebindIteration.java       | 11 +++++
 .../core/mgmt/rebind/RebindManagerImpl.java     | 19 +++++++--
 .../mgmt/rebind/dto/BrooklynMementoImpl.java    | 13 ++++++
 .../rebind/dto/BrooklynMementoManifestImpl.java | 15 ++++++-
 .../mgmt/rebind/dto/MutableBrooklynMemento.java | 11 +++++
 .../rebind/transformer/CompoundTransformer.java |  1 +
 .../impl/DeleteOrphanedStateTransformer.java    |  1 +
 .../core/server/BrooklynServerPaths.java        |  2 +-
 .../ha/ImmutableManagementPlaneSyncRecord.java  | 23 ++++++++--
 .../ha/MutableManagementPlaneSyncRecord.java    | 12 +++++-
 .../core/mgmt/rebind/RebindTestUtils.java       |  2 +
 .../brooklyn/launcher/common/BasicLauncher.java |  2 +-
 .../AbstractCleanOrphanedStateTest.java         |  1 +
 .../brooklyn/launcher/BrooklynLauncherTest.java |  2 +-
 33 files changed, 308 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/api/src/main/java/org/apache/brooklyn/api/mgmt/ManagementContext.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/brooklyn/api/mgmt/ManagementContext.java b/api/src/main/java/org/apache/brooklyn/api/mgmt/ManagementContext.java
index 9057b95..64e778a 100644
--- a/api/src/main/java/org/apache/brooklyn/api/mgmt/ManagementContext.java
+++ b/api/src/main/java/org/apache/brooklyn/api/mgmt/ManagementContext.java
@@ -39,6 +39,7 @@ import org.apache.brooklyn.config.StringConfigMap;
 import org.apache.brooklyn.util.guava.Maybe;
 
 import com.google.common.annotations.Beta;
+import com.google.common.base.Optional;
 
 /**
  * This is the entry point for accessing and interacting with a realm of applications and their entities in Brooklyn.
@@ -66,9 +67,20 @@ public interface ManagementContext {
      * In other words the value of {@link Application#getManagementContext()#getManagementPlaneId()} 
      * will generally be constant (in contrast to {@link #getManagementNodeId()}).
      * <p>
-     * This value should not be null unless the management context is a non-functional
-     * (non-deployment) instance. */
+     * Throws an {@link NullPointerException} if the value hasn't been initialized yet. The value is set:
+     * <ul>
+     *   <li>no persistence - during launch
+     *   <li>persistence enabled, HA disabled - on rebind (during launch)
+     *   <li>persistence enabled, HA enabled - on the first HA state check (async to launch)
+     * </ul>
+     */
     String getManagementPlaneId();
+
+    /**
+     * Same as {@link #getManagementPlaneId()}, but will return {@link Optional#absent()} if the
+     * {@code managementPlaneId} hasn't been initialized yet.
+     */
+    Optional<String> getOptionalManagementPlaneId();
     
     /** 
      * UID for this {@link ManagementContext} node (as part of a single management plane).

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/api/src/main/java/org/apache/brooklyn/api/mgmt/ha/ManagementNodeSyncRecord.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/brooklyn/api/mgmt/ha/ManagementNodeSyncRecord.java b/api/src/main/java/org/apache/brooklyn/api/mgmt/ha/ManagementNodeSyncRecord.java
index dccbd01..595fbcb 100644
--- a/api/src/main/java/org/apache/brooklyn/api/mgmt/ha/ManagementNodeSyncRecord.java
+++ b/api/src/main/java/org/apache/brooklyn/api/mgmt/ha/ManagementNodeSyncRecord.java
@@ -36,8 +36,6 @@ public interface ManagementNodeSyncRecord {
 
     // TODO Not setting URI currently; ManagementContext doesn't know its URI; only have one if web-console was enabled.
     
-    // TODO Add getPlaneId(); but first need to set it in a sensible way
-    
     String getBrooklynVersion();
     
     String getNodeId();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/api/src/main/java/org/apache/brooklyn/api/mgmt/ha/ManagementPlaneSyncRecord.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/brooklyn/api/mgmt/ha/ManagementPlaneSyncRecord.java b/api/src/main/java/org/apache/brooklyn/api/mgmt/ha/ManagementPlaneSyncRecord.java
index 86bb74e..94acd05 100644
--- a/api/src/main/java/org/apache/brooklyn/api/mgmt/ha/ManagementPlaneSyncRecord.java
+++ b/api/src/main/java/org/apache/brooklyn/api/mgmt/ha/ManagementPlaneSyncRecord.java
@@ -40,7 +40,7 @@ import com.google.common.annotations.Beta;
 @Beta
 public interface ManagementPlaneSyncRecord {
 
-    // TODO Add getPlaneId(); but first need to set it sensibly on each management node
+    String getPlaneId();
     
     String getMasterNodeId();
     

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/PersistenceExceptionHandler.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/PersistenceExceptionHandler.java b/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/PersistenceExceptionHandler.java
index 759bca6..4a64720 100644
--- a/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/PersistenceExceptionHandler.java
+++ b/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/PersistenceExceptionHandler.java
@@ -41,4 +41,7 @@ public interface PersistenceExceptionHandler {
     void onPersistRawMementoFailed(BrooklynObjectType type, String id, Exception e);
 
     void onDeleteMementoFailed(String id, Exception e);
+    
+    void onUpdatePlaneIdFailed(String planeId, Exception e);
+
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMemento.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMemento.java b/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMemento.java
index 1c66c70..8ee23da 100644
--- a/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMemento.java
+++ b/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMemento.java
@@ -37,6 +37,8 @@ import java.util.Map;
  */
 public interface BrooklynMemento extends Serializable {
 
+    public String getPlaneId();
+
     public EntityMemento getEntityMemento(String id);
     public LocationMemento getLocationMemento(String id);
     public PolicyMemento getPolicyMemento(String id);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMementoManifest.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMementoManifest.java b/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMementoManifest.java
index 0b192ae..a96601f 100644
--- a/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMementoManifest.java
+++ b/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMementoManifest.java
@@ -38,6 +38,8 @@ public interface BrooklynMementoManifest extends Serializable {
         public String getCatalogItemId();
     }
 
+    public String getPlaneId();
+
     public Map<String, EntityMementoManifest> getEntityIdToManifest();
 
     public Map<String, String> getLocationIdToType();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMementoPersister.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMementoPersister.java b/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMementoPersister.java
index 03673fd..c2cdae3 100644
--- a/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMementoPersister.java
+++ b/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMementoPersister.java
@@ -110,6 +110,8 @@ public interface BrooklynMementoPersister {
     /** All methods on this interface are unmodifiable by the caller. Sub-interfaces may introduce modifiers. */
     // NB: the type-specific methods aren't actually used anymore; we could remove them to simplify the impl (and use a multiset there)
     public interface Delta {
+        String planeId();
+
         Collection<LocationMemento> locations();
         Collection<EntityMemento> entities();
         Collection<PolicyMemento> policies();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMementoRawData.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMementoRawData.java b/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMementoRawData.java
index f2ec4a9..e0a4c87 100644
--- a/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMementoRawData.java
+++ b/api/src/main/java/org/apache/brooklyn/api/mgmt/rebind/mementos/BrooklynMementoRawData.java
@@ -42,6 +42,7 @@ public class BrooklynMementoRawData {
     }
     
     public static class Builder {
+        protected String planeId;
         protected String brooklynVersion;
         protected final Map<String, String> entities = Maps.newConcurrentMap();
         protected final Map<String, String> locations = Maps.newConcurrentMap();
@@ -49,7 +50,12 @@ public class BrooklynMementoRawData {
         protected final Map<String, String> enrichers = Maps.newConcurrentMap();
         protected final Map<String, String> feeds = Maps.newConcurrentMap();
         protected final Map<String, String> catalogItems = Maps.newConcurrentMap();
-        
+
+        public Builder planeId(String val) {
+            planeId = val; return this;
+        }
+        /** @deprecated since 0.11.0; value not used */
+        @Deprecated
         public Builder brooklynVersion(String val) {
             brooklynVersion = val; return this;
         }
@@ -122,6 +128,7 @@ public class BrooklynMementoRawData {
         }
     }
 
+    private final String planeId;
     private final String brooklynVersion;
     private final Map<String, String> entities;
     private final Map<String, String> locations;
@@ -131,6 +138,7 @@ public class BrooklynMementoRawData {
     private final Map<String, String> catalogItems;
     
     private BrooklynMementoRawData(Builder builder) {
+        planeId = builder.planeId;
         brooklynVersion = builder.brooklynVersion;
         entities = builder.entities;
         locations = builder.locations;
@@ -140,10 +148,17 @@ public class BrooklynMementoRawData {
         catalogItems = builder.catalogItems;
     }
 
+    @Nullable
+    public String getPlaneId() {
+        return planeId;
+    }
+
     /**
      * Setting the brooklyn version explicitly is optional. 
+     * @deprecated since 0.11.0; value unused and not set anywhere
      */
     @Beta
+    @Deprecated
     @Nullable
     public String getBrooklynVersion() {
         return brooklynVersion;

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/HighAvailabilityManagerImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/HighAvailabilityManagerImpl.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/HighAvailabilityManagerImpl.java
index c9f3a58..f968c96 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/HighAvailabilityManagerImpl.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/HighAvailabilityManagerImpl.java
@@ -56,6 +56,7 @@ import org.apache.brooklyn.core.mgmt.ha.dto.ManagementPlaneSyncRecordImpl;
 import org.apache.brooklyn.core.mgmt.ha.dto.ManagementPlaneSyncRecordImpl.Builder;
 import org.apache.brooklyn.core.mgmt.internal.BrooklynObjectManagementMode;
 import org.apache.brooklyn.core.mgmt.internal.LocalEntityManager;
+import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
 import org.apache.brooklyn.core.mgmt.internal.LocationManagerInternal;
 import org.apache.brooklyn.core.mgmt.internal.ManagementContextInternal;
 import org.apache.brooklyn.core.mgmt.internal.ManagementTransitionMode;
@@ -278,10 +279,13 @@ public class HighAvailabilityManagerImpl implements HighAvailabilityManager {
         ownNodeId = managementContext.getManagementNodeId();
         // TODO Small race in that we first check, and then we'll do checkMaster() on first poll,
         // so another node could have already become master or terminated in that window.
-        ManagementNodeSyncRecord existingMaster = hasHealthyMaster();
+        ManagementPlaneSyncRecord planeRec = loadManagementPlaneSyncRecord(false);
+        ManagementNodeSyncRecord existingMaster = hasHealthyMaster(planeRec);
         boolean weAreRecognisedAsMaster = existingMaster!=null && ownNodeId.equals(existingMaster.getNodeId());
         boolean weAreMasterLocally = getInternalNodeState()==ManagementNodeState.MASTER;
         
+        updatePlaneId(planeRec);
+        
         // catch error in some tests where mgmt context has a different HA manager
         if (managementContext.getHighAvailabilityManager()!=this)
             throw new IllegalStateException("Cannot start an HA manager on a management context with a different HA manager!");
@@ -456,6 +460,12 @@ public class HighAvailabilityManagerImpl implements HighAvailabilityManager {
             registerPollTask();
     }
 
+    protected void updatePlaneId(ManagementPlaneSyncRecord existingMaster) {
+        if (existingMaster.getPlaneId() != null) {
+            ((LocalManagementContext)managementContext).setManagementPlaneId(existingMaster.getPlaneId());
+        }
+    }
+
     @Override
     public void setPriority(long priority) {
         this.priority = priority;
@@ -538,7 +548,6 @@ public class HighAvailabilityManagerImpl implements HighAvailabilityManager {
         return lastSyncRecord;
     }
     
-    @SuppressWarnings("unchecked")
     protected void registerPollTask() {
         final Runnable job = new Runnable() {
             private boolean lastFailed;
@@ -687,9 +696,7 @@ public class HighAvailabilityManagerImpl implements HighAvailabilityManager {
         return (timestampMe - timestampMaster) <= getHeartbeatTimeout().toMilliseconds();
     }
     
-    protected ManagementNodeSyncRecord hasHealthyMaster() {
-        ManagementPlaneSyncRecord memento = loadManagementPlaneSyncRecord(false);
-        
+    protected ManagementNodeSyncRecord hasHealthyMaster(ManagementPlaneSyncRecord memento ) {
         String nodeId = memento.getMasterNodeId();
         ManagementNodeSyncRecord masterMemento = (nodeId == null) ? null : memento.getManagementNodes().get(nodeId);
         
@@ -715,6 +722,8 @@ public class HighAvailabilityManagerImpl implements HighAvailabilityManager {
             return;
         }
         
+        updatePlaneId(memento);
+        
         String currMasterNodeId = memento.getMasterNodeId();
         ManagementNodeSyncRecord currMasterNodeRecord = memento.getManagementNodes().get(currMasterNodeId);
         ManagementNodeSyncRecord ownNodeRecord = memento.getManagementNodes().get(ownNodeId);
@@ -971,6 +980,7 @@ public class HighAvailabilityManagerImpl implements HighAvailabilityManager {
         if (disabled) {
             // if HA is disabled, then we are the only node - no persistence; just load a memento to describe this node
             Builder builder = ManagementPlaneSyncRecordImpl.builder()
+                .planeId(managementContext.getOptionalManagementPlaneId().orNull())
                 .node(createManagementNodeSyncRecord(true));
             if (getTransitionTargetNodeState() == ManagementNodeState.MASTER) {
                 builder.masterNodeId(ownNodeId);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/ManagementPlaneSyncRecordPersisterToObjectStore.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/ManagementPlaneSyncRecordPersisterToObjectStore.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/ManagementPlaneSyncRecordPersisterToObjectStore.java
index dae25cf..f32a476 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/ManagementPlaneSyncRecordPersisterToObjectStore.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/ManagementPlaneSyncRecordPersisterToObjectStore.java
@@ -36,6 +36,7 @@ import org.apache.brooklyn.api.mgmt.ha.ManagementPlaneSyncRecord;
 import org.apache.brooklyn.api.mgmt.ha.ManagementPlaneSyncRecordPersister;
 import org.apache.brooklyn.core.mgmt.ha.dto.BasicManagementNodeSyncRecord;
 import org.apache.brooklyn.core.mgmt.ha.dto.ManagementPlaneSyncRecordImpl;
+import org.apache.brooklyn.core.mgmt.persist.BrooklynMementoPersisterToObjectStore;
 import org.apache.brooklyn.core.mgmt.persist.MementoSerializer;
 import org.apache.brooklyn.core.mgmt.persist.PersistenceObjectStore;
 import org.apache.brooklyn.core.mgmt.persist.RetryingMementoSerializer;
@@ -93,6 +94,7 @@ public class ManagementPlaneSyncRecordPersisterToObjectStore implements Manageme
     // TODO Leak if we go through lots of managers; but tiny!
     private final ConcurrentMap<String, StoreObjectAccessorWithLock> nodeWriters = Maps.newConcurrentMap();
 
+    private StoreObjectAccessorWithLock planeIdReader;
     private StoreObjectAccessorWithLock masterWriter;
     private StoreObjectAccessorWithLock changeLogWriter;
 
@@ -143,6 +145,8 @@ public class ManagementPlaneSyncRecordPersisterToObjectStore implements Manageme
                 masterWriter = new StoreObjectAccessorLocking(objectStore.newAccessor("master"));
                 changeLogWriter = new StoreObjectAccessorLocking(objectStore.newAccessor("change.log"));
             }
+            // No need to wrap it in a write lock, doing it just for consistency
+            planeIdReader = new StoreObjectAccessorLocking(objectStore.newAccessor(BrooklynMementoPersisterToObjectStore.PLANE_ID_FILE_NAME));
         }
     }
 
@@ -194,6 +198,8 @@ public class ManagementPlaneSyncRecordPersisterToObjectStore implements Manageme
         } else {
             builder.masterNodeId(masterNodeId);
         }
+        
+        builder.planeId(Strings.emptyToNull(planeIdReader.get()));
 
         // Load node-files
         List<String> nodeFiles = objectStore.listContentsWithSubPath(NODES_SUB_PATH);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/dto/ManagementPlaneSyncRecordImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/dto/ManagementPlaneSyncRecordImpl.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/dto/ManagementPlaneSyncRecordImpl.java
index dd89320..f800f25 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/dto/ManagementPlaneSyncRecordImpl.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/ha/dto/ManagementPlaneSyncRecordImpl.java
@@ -41,9 +41,13 @@ public class ManagementPlaneSyncRecordImpl implements ManagementPlaneSyncRecord,
     }
     
     public static class Builder {
+        protected String planeId;
         protected String masterNodeId;
         protected final Map<String,ManagementNodeSyncRecord> nodes = MutableMap.of();
         
+        public Builder planeId(String val) {
+            planeId = val; return this;
+        }
         public Builder masterNodeId(String val) {
             masterNodeId = val; return this;
         }
@@ -62,10 +66,12 @@ public class ManagementPlaneSyncRecordImpl implements ManagementPlaneSyncRecord,
         }
     }
 
+    private String planeId;
     private String masterNodeId;
     private Map<String, ManagementNodeSyncRecord> managementNodes;
     
     private ManagementPlaneSyncRecordImpl(Builder builder) {
+        planeId = builder.planeId;
         masterNodeId = builder.masterNodeId;
         managementNodes = Maps.newLinkedHashMap();
         for (ManagementNodeSyncRecord node : builder.nodes.values()) {
@@ -75,6 +81,11 @@ public class ManagementPlaneSyncRecordImpl implements ManagementPlaneSyncRecord,
     }
 
     @Override
+    public String getPlaneId() {
+        return planeId;
+    }
+
+    @Override
     public String getMasterNodeId() {
         return masterNodeId;
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalManagementContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalManagementContext.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalManagementContext.java
index 67cd15f..7418666 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalManagementContext.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/LocalManagementContext.java
@@ -68,6 +68,8 @@ import org.slf4j.LoggerFactory;
 
 import com.google.common.annotations.Beta;
 import com.google.common.annotations.VisibleForTesting;
+import com.google.common.base.MoreObjects;
+import com.google.common.base.Optional;
 import com.google.common.base.Throwables;
 import com.google.common.collect.ImmutableSet;
 
@@ -187,8 +189,6 @@ public class LocalManagementContext extends AbstractManagementContext {
         
         checkNotNull(configMap, "brooklynProperties");
         
-        // TODO in a persisted world the planeId may be injected
-        this.managementPlaneId = Strings.makeRandomId(8);
         this.managementNodeId = Strings.makeRandomId(8);
         this.builder = builder;
         this.brooklynAdditionalProperties = brooklynAdditionalProperties;
@@ -212,7 +212,32 @@ public class LocalManagementContext extends AbstractManagementContext {
 
     @Override
     public String getManagementPlaneId() {
-        return managementPlaneId;
+        if (managementPlaneId != null) {
+            return managementPlaneId;
+        } else {
+            throw new NullPointerException("managementPlaneId not initialized yet. " +
+                    "Either it's too early in the process lifecycle or " +
+                    "ManagementContext hasn't been initialized properly");
+        }
+    }
+    
+    @Override
+    public Optional<String> getOptionalManagementPlaneId() {
+        return Optional.fromNullable(managementPlaneId);
+    }
+    
+    public void setManagementPlaneId(String newPlaneId) {
+        if (managementPlaneId != null && !managementPlaneId.equals(newPlaneId)) {
+            log.warn("Management plane ID changed from {} to {}", managementPlaneId, newPlaneId);
+        }
+        this.managementPlaneId = newPlaneId;
+    }
+
+    public void generateManagementPlaneId() {
+        if (this.managementPlaneId != null) {
+            throw new IllegalStateException("Request to generate a management plane ID but one already exists (" + managementPlaneId + ")");
+        }
+        this.managementPlaneId = Strings.makeRandomId(8);
     }
     
     @Override
@@ -391,7 +416,8 @@ public class LocalManagementContext extends AbstractManagementContext {
 
     @Override
     public String toString() {
-        return LocalManagementContext.class.getSimpleName()+"["+getManagementPlaneId()+"-"+getManagementNodeId()+"]";
+        String planeId = MoreObjects.firstNonNull(managementPlaneId, "?");
+        return LocalManagementContext.class.getSimpleName()+"["+planeId+"-"+getManagementNodeId()+"]";
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/NonDeploymentManagementContext.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/NonDeploymentManagementContext.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/NonDeploymentManagementContext.java
index dafb4c4..a839aed 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/NonDeploymentManagementContext.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/internal/NonDeploymentManagementContext.java
@@ -76,6 +76,7 @@ import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import com.google.common.base.Objects;
+import com.google.common.base.Optional;
 import com.google.common.collect.ImmutableList;
 import com.google.common.collect.ImmutableMap;
 
@@ -128,6 +129,11 @@ public class NonDeploymentManagementContext implements ManagementContextInternal
     }
     
     @Override
+    public Optional<String> getOptionalManagementPlaneId() {
+        return (initialManagementContext == null) ? Optional.<String>absent() : initialManagementContext.getOptionalManagementPlaneId();
+    }
+    
+    @Override
     public String getManagementNodeId() {
         return (initialManagementContext == null) ? null : initialManagementContext.getManagementNodeId();
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynMementoPersisterToObjectStore.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynMementoPersisterToObjectStore.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynMementoPersisterToObjectStore.java
index de5fd0a..a89a528 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynMementoPersisterToObjectStore.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynMementoPersisterToObjectStore.java
@@ -88,6 +88,8 @@ public class BrooklynMementoPersisterToObjectStore implements BrooklynMementoPer
     // TODO Should stop() take a timeout, and shutdown the executor gracefully?
     
     private static final Logger LOG = LoggerFactory.getLogger(BrooklynMementoPersisterToObjectStore.class);
+    public static final String PLANE_ID_FILE_NAME = "planeId";
+
 
     public static final ConfigKey<Integer> PERSISTER_MAX_THREAD_POOL_SIZE = ConfigKeys.newIntegerConfigKey(
             "persister.threadpool.maxSize",
@@ -306,6 +308,7 @@ public class BrooklynMementoPersisterToObjectStore implements BrooklynMementoPer
 
         Stopwatch stopwatch = Stopwatch.createStarted();
 
+        builder.planeId(Strings.emptyToNull(read(PLANE_ID_FILE_NAME)));
         visitMemento("loading raw", subPathData, loaderVisitor, exceptionHandler);
         
         BrooklynMementoRawData result = builder.build();
@@ -328,6 +331,8 @@ public class BrooklynMementoPersisterToObjectStore implements BrooklynMementoPer
         
         final BrooklynMementoManifestImpl.Builder builder = BrooklynMementoManifestImpl.builder();
 
+        builder.planeId(mementoData.getPlaneId());
+
         Visitor visitor = new Visitor() {
             @Override
             public void visit(BrooklynObjectType type, String objectId, final String contents) throws Exception {
@@ -395,7 +400,9 @@ public class BrooklynMementoPersisterToObjectStore implements BrooklynMementoPer
         Stopwatch stopwatch = Stopwatch.createStarted();
 
         final BrooklynMementoImpl.Builder builder = BrooklynMementoImpl.builder();
-        
+
+        builder.planeId(mementoData.getPlaneId());
+
         Visitor visitor = new Visitor() {
             @Override
             public void visit(BrooklynObjectType type, String objectId, String contents) throws Exception {
@@ -518,6 +525,7 @@ public class BrooklynMementoPersisterToObjectStore implements BrooklynMementoPer
             Stopwatch stopwatch = Stopwatch.createStarted();
             List<ListenableFuture<?>> futures = Lists.newArrayList();
             
+            futures.add(asyncUpdatePlaneId(newMemento.getPlaneId(), exceptionHandler));
             for (BrooklynObjectType type: BrooklynPersistenceUtils.STANDARD_BROOKLYN_OBJECT_TYPE_PERSISTENCE_ORDER) {
                 for (Map.Entry<String, String> entry : newMemento.getObjectsOfType(type).entrySet()) {
                     futures.add(asyncPersist(type.getSubPathName(), type, entry.getKey(), entry.getValue(), exceptionHandler));
@@ -590,6 +598,9 @@ public class BrooklynMementoPersisterToObjectStore implements BrooklynMementoPer
                 deletedIds.addAll(delta.getRemovedIdsOfType(type));
             }
             
+            if (delta.planeId() != null) {
+                futures.add(asyncUpdatePlaneId(delta.planeId(), exceptionHandler));
+            }
             for (BrooklynObjectType type: BrooklynPersistenceUtils.STANDARD_BROOKLYN_OBJECT_TYPE_PERSISTENCE_ORDER) {
                 for (Memento item : delta.getObjectsOfType(type)) {
                     if (!deletedIds.contains(item.getId())) {
@@ -674,6 +685,23 @@ public class BrooklynMementoPersisterToObjectStore implements BrooklynMementoPer
         }
     }
 
+    private void updatePlaneId(String planeId, PersistenceExceptionHandler exceptionHandler) {
+        try {
+            if (planeId==null) {
+                LOG.warn("Null content for planeId");
+            }
+
+            String persistedPlaneId = read(PLANE_ID_FILE_NAME);
+            if (persistedPlaneId == null) {
+                getWriter(PLANE_ID_FILE_NAME).put(planeId);
+            } else if(!persistedPlaneId.equals(planeId)) {
+                throw new IllegalStateException("Persisted planeId found (" + persistedPlaneId + ") but instance planeId is different (" + planeId + ")");
+            }
+        } catch (Exception e) {
+            exceptionHandler.onUpdatePlaneIdFailed(planeId, e);
+        }
+    }
+
     private ListenableFuture<?> asyncPersist(final String subPath, final Memento memento, final PersistenceExceptionHandler exceptionHandler) {
         return executor.submit(new Runnable() {
             @Override
@@ -698,6 +726,14 @@ public class BrooklynMementoPersisterToObjectStore implements BrooklynMementoPer
             }});
     }
     
+    private ListenableFuture<?> asyncUpdatePlaneId(final String planeId, final PersistenceExceptionHandler exceptionHandler) {
+        return executor.submit(new Runnable() {
+            @Override
+            public void run() {
+                updatePlaneId(planeId, exceptionHandler);
+            }});
+    }
+
     private String getPath(String subPath, String id) {
         return subPath+"/"+Strings.makeValidFilename(id);
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynPersistenceUtils.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynPersistenceUtils.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynPersistenceUtils.java
index ff57645..4cade20 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynPersistenceUtils.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/persist/BrooklynPersistenceUtils.java
@@ -163,6 +163,7 @@ public class BrooklynPersistenceUtils {
         MementoSerializer<Object> rawSerializer = new XmlMementoSerializer<Object>(mgmt.getClass().getClassLoader());
         RetryingMementoSerializer<Object> serializer = new RetryingMementoSerializer<Object>(rawSerializer, 1);
         
+        result.planeId(mgmt.getManagementPlaneId());
         for (Location instance: mgmt.getLocationManager().getLocations())
             result.location(instance.getId(), serializer.toString(newObjectMemento(instance)));
         for (Entity instance: mgmt.getEntityManager().getEntities()) {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/ActivePartialRebindIteration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/ActivePartialRebindIteration.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/ActivePartialRebindIteration.java
index dfd5a42..84e2089 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/ActivePartialRebindIteration.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/ActivePartialRebindIteration.java
@@ -131,6 +131,11 @@ public class ActivePartialRebindIteration extends RebindIteration {
     }
     
     @Override
+    protected void initPlaneId() {
+        // managementPlaneId is already initialized, no need to set it on partial rebind
+    }
+    
+    @Override
     protected void preprocessManifestFiles() throws Exception {
         for (CompoundTransformer transformer: transformers) {
             mementoRawData = transformer.transform(mementoRawData);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PeriodicDeltaChangeListener.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PeriodicDeltaChangeListener.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PeriodicDeltaChangeListener.java
index fdfe362..68e47f7 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PeriodicDeltaChangeListener.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PeriodicDeltaChangeListener.java
@@ -28,8 +28,6 @@ import java.util.concurrent.TimeoutException;
 import java.util.concurrent.atomic.AtomicInteger;
 import java.util.concurrent.atomic.AtomicLong;
 
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
 import org.apache.brooklyn.api.catalog.CatalogItem;
 import org.apache.brooklyn.api.entity.Entity;
 import org.apache.brooklyn.api.location.Location;
@@ -58,9 +56,12 @@ import org.apache.brooklyn.util.exceptions.RuntimeInterruptedException;
 import org.apache.brooklyn.util.repeat.Repeater;
 import org.apache.brooklyn.util.time.CountdownTimer;
 import org.apache.brooklyn.util.time.Duration;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Stopwatch;
+import com.google.common.base.Supplier;
 import com.google.common.collect.Iterables;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
@@ -84,8 +85,11 @@ public class PeriodicDeltaChangeListener implements ChangeListener {
 
     protected final AtomicLong checkpointLogCount = new AtomicLong();
     private static final int INITIAL_LOG_WRITES = 5;
+    private static final Duration PERSIST_PLANE_ID_PERIOD = Duration.ONE_HOUR;
 
     private static class DeltaCollector {
+        private String planeId;
+
         private Set<Location> locations = Sets.newLinkedHashSet();
         private Set<Entity> entities = Sets.newLinkedHashSet();
         private Set<Policy> policies = Sets.newLinkedHashSet();
@@ -101,7 +105,8 @@ public class PeriodicDeltaChangeListener implements ChangeListener {
         private Set<String> removedCatalogItemIds = Sets.newLinkedHashSet();
 
         public boolean isEmpty() {
-            return locations.isEmpty() && entities.isEmpty() && policies.isEmpty() && 
+            return planeId == null &&
+                    locations.isEmpty() && entities.isEmpty() && policies.isEmpty() && 
                     enrichers.isEmpty() && feeds.isEmpty() &&
                     catalogItems.isEmpty() &&
                     removedEntityIds.isEmpty() && removedLocationIds.isEmpty() && removedPolicyIds.isEmpty() && 
@@ -109,6 +114,10 @@ public class PeriodicDeltaChangeListener implements ChangeListener {
                     removedCatalogItemIds.isEmpty();
         }
         
+        public void setPlaneId(String planeId) {
+            this.planeId = planeId;
+        }
+
         public void add(BrooklynObject instance) {
             BrooklynObjectType type = BrooklynObjectType.of(instance);
             getUnsafeCollectionOfType(type).add(instance);
@@ -187,8 +196,18 @@ public class PeriodicDeltaChangeListener implements ChangeListener {
     private final AtomicInteger writeCount = new AtomicInteger(0);
 
     private PersistenceActivityMetrics metrics;
-    
-    public PeriodicDeltaChangeListener(ExecutionContext executionContext, BrooklynMementoPersister persister, PersistenceExceptionHandler exceptionHandler, PersistenceActivityMetrics metrics, Duration period) {
+
+    private CountdownTimer planeIdPersistTimer = CountdownTimer.newInstanceStarted(Duration.ZERO);
+    private Supplier<String> planeIdSupplier;
+
+    public PeriodicDeltaChangeListener(
+            Supplier<String> planeIdSupplier,
+            ExecutionContext executionContext,
+            BrooklynMementoPersister persister,
+            PersistenceExceptionHandler exceptionHandler,
+            PersistenceActivityMetrics metrics,
+            Duration period) {
+        this.planeIdSupplier = planeIdSupplier;
         this.executionContext = executionContext;
         this.persister = persister;
         this.exceptionHandler = exceptionHandler;
@@ -382,6 +401,8 @@ public class PeriodicDeltaChangeListener implements ChangeListener {
             if (!alreadyHasMutex) persistingMutex.acquire();
             if (!isActive() && state != ListenerState.STOPPING) return;
             
+            updatePlaneIdIfTimedOut();
+
             // Atomically switch the delta, so subsequent modifications will be done in the
             // next scheduled persist
             DeltaCollector prevDeltaCollector;
@@ -411,7 +432,10 @@ public class PeriodicDeltaChangeListener implements ChangeListener {
                 if (LOG.isTraceEnabled()) LOG.trace("No changes to persist since last delta");
             } else {
                 PersisterDeltaImpl persisterDelta = new PersisterDeltaImpl();
-                
+
+                if (prevDeltaCollector.planeId != null) {
+                    persisterDelta.planeId = prevDeltaCollector.planeId;
+                }
                 for (BrooklynObjectType type: BrooklynPersistenceUtils.STANDARD_BROOKLYN_OBJECT_TYPE_PERSISTENCE_ORDER) {
                     for (BrooklynObject instance: prevDeltaCollector.getCollectionOfType(type)) {
                         try {
@@ -453,6 +477,14 @@ public class PeriodicDeltaChangeListener implements ChangeListener {
         }
     }
     
+    private void updatePlaneIdIfTimedOut() {
+        if (planeIdPersistTimer.isExpired()) {
+            deltaCollector.setPlaneId(planeIdSupplier.get());
+            planeIdPersistTimer = PERSIST_PLANE_ID_PERIOD.countdownTimer();
+        }
+        
+    }
+
     private static String limitedCountString(Collection<?> items) {
         if (items==null) return null;
         int size = items.size();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PersistenceExceptionHandlerImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PersistenceExceptionHandlerImpl.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PersistenceExceptionHandlerImpl.java
index 063e547..8418c3c 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PersistenceExceptionHandlerImpl.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PersistenceExceptionHandlerImpl.java
@@ -29,6 +29,7 @@ import org.apache.brooklyn.util.exceptions.Exceptions;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import com.google.common.base.MoreObjects;
 import com.google.common.collect.Sets;
 
 public class PersistenceExceptionHandlerImpl implements PersistenceExceptionHandler {
@@ -82,7 +83,14 @@ public class PersistenceExceptionHandlerImpl implements PersistenceExceptionHand
         String errmsg = "delete for memento "+id;
         onErrorImpl(errmsg, e, prevFailedPersisters.add(id));
     }
-    
+
+    @Override
+    public void onUpdatePlaneIdFailed(String planeId, Exception e) {
+        String errmsg = "init planeId " + planeId;
+        String prevFailedId = MoreObjects.firstNonNull(planeId, "null-plane-id");
+        onErrorImpl(errmsg, e, prevFailedPersisters.add(prevFailedId));
+    }
+
     protected void onErrorImpl(String errmsg, Exception e, boolean isNew) {
         // TODO the default behaviour is simply to warn; we should have a "fail_at_end" behaviour,
         // and a way for other subsystems to tune in to such failures

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PersisterDeltaImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PersisterDeltaImpl.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PersisterDeltaImpl.java
index 7ea3a44..30ceaa6 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PersisterDeltaImpl.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/PersisterDeltaImpl.java
@@ -39,6 +39,8 @@ import com.google.common.collect.Sets;
 
 public class PersisterDeltaImpl implements Delta, MutableDelta {
     
+    String planeId;
+
     // use multiset?
     
     Collection<LocationMemento> locations = Sets.newLinkedHashSet();
@@ -54,6 +56,11 @@ public class PersisterDeltaImpl implements Delta, MutableDelta {
     Collection<String> removedEnricherIds = Sets.newLinkedHashSet();
     Collection <String> removedFeedIds = Sets.newLinkedHashSet();
     Collection<String> removedCatalogItemIds = Sets.newLinkedHashSet();
+    
+    @Override
+    public String planeId() {
+        return planeId;
+    }
 
     @Override
     public Collection<LocationMemento> locations() {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindIteration.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindIteration.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindIteration.java
index f62db69..c4b171e 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindIteration.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindIteration.java
@@ -76,6 +76,7 @@ import org.apache.brooklyn.core.mgmt.classloading.JavaBrooklynClassLoadingContex
 import org.apache.brooklyn.core.mgmt.internal.BrooklynObjectManagementMode;
 import org.apache.brooklyn.core.mgmt.internal.BrooklynObjectManagerInternal;
 import org.apache.brooklyn.core.mgmt.internal.EntityManagerInternal;
+import org.apache.brooklyn.core.mgmt.internal.LocalManagementContext;
 import org.apache.brooklyn.core.mgmt.internal.LocationManagerInternal;
 import org.apache.brooklyn.core.mgmt.internal.ManagementContextInternal;
 import org.apache.brooklyn.core.mgmt.internal.ManagementTransitionMode;
@@ -235,6 +236,7 @@ public abstract class RebindIteration {
     
     protected void doRun() throws Exception {
         loadManifestFiles();
+        initPlaneId();
         rebuildCatalog();
         instantiateLocationsAndEntities();
         instantiateMementos();
@@ -467,6 +469,15 @@ public abstract class RebindIteration {
         memento = persistenceStoreAccess.loadMemento(mementoRawData, rebindContext.lookup(), exceptionHandler);
     }
 
+    protected void initPlaneId() {
+        String persistedPlaneId = mementoRawData.getPlaneId();
+        if (persistedPlaneId == null) {
+            ((LocalManagementContext)managementContext).generateManagementPlaneId();
+        } else {
+            ((LocalManagementContext)managementContext).setManagementPlaneId(persistedPlaneId);
+        }
+    }
+
     protected void instantiateAdjuncts(BrooklynObjectInstantiator instantiator) {
         
         checkEnteringPhase(5);

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java
index a3e663c..d3693e2 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/RebindManagerImpl.java
@@ -52,8 +52,8 @@ import org.apache.brooklyn.core.mgmt.ha.HighAvailabilityManagerImpl;
 import org.apache.brooklyn.core.mgmt.internal.ManagementContextInternal;
 import org.apache.brooklyn.core.mgmt.persist.BrooklynMementoPersisterToObjectStore;
 import org.apache.brooklyn.core.mgmt.persist.BrooklynPersistenceUtils;
-import org.apache.brooklyn.core.mgmt.persist.PersistenceActivityMetrics;
 import org.apache.brooklyn.core.mgmt.persist.BrooklynPersistenceUtils.CreateBackupMode;
+import org.apache.brooklyn.core.mgmt.persist.PersistenceActivityMetrics;
 import org.apache.brooklyn.core.mgmt.rebind.transformer.CompoundTransformer;
 import org.apache.brooklyn.core.server.BrooklynServerConfig;
 import org.apache.brooklyn.util.collections.MutableList;
@@ -72,6 +72,7 @@ import org.slf4j.LoggerFactory;
 import com.google.common.annotations.Beta;
 import com.google.common.annotations.VisibleForTesting;
 import com.google.common.base.Function;
+import com.google.common.base.Supplier;
 import com.google.common.collect.Iterators;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Maps;
@@ -169,6 +170,13 @@ public class RebindManagerImpl implements RebindManager {
             rebinding.set(Boolean.TRUE);
         }
     }
+    
+    private class PlaneIdSupplier implements Supplier<String> {
+        @Override
+        public String get() {
+            return managementContext.getOptionalManagementPlaneId().orNull();
+        }
+    }
 
     public RebindManagerImpl(ManagementContextInternal managementContext) {
         this.managementContext = managementContext;
@@ -238,7 +246,13 @@ public class RebindManagerImpl implements RebindManager {
         
         this.persistenceStoreAccess = checkNotNull(val, "persister");
         
-        this.persistenceRealChangeListener = new PeriodicDeltaChangeListener(managementContext.getServerExecutionContext(), persistenceStoreAccess, exceptionHandler, persistMetrics, periodicPersistPeriod);
+        this.persistenceRealChangeListener = new PeriodicDeltaChangeListener(
+                new PlaneIdSupplier(),
+                managementContext.getServerExecutionContext(),
+                persistenceStoreAccess,
+                exceptionHandler,
+                persistMetrics,
+                periodicPersistPeriod);
         this.persistencePublicChangeListener = new SafeChangeListener(persistenceRealChangeListener);
         
         if (persistenceRunning) {
@@ -278,7 +292,6 @@ public class RebindManagerImpl implements RebindManager {
         LOG.debug("Stopped rebind (persistence), mgmt "+managementContext.getManagementNodeId());
     }
     
-    @SuppressWarnings("unchecked")
     @Override
     public void startReadOnly(final ManagementNodeState mode) {
         if (!ManagementNodeState.isHotProxy(mode)) {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/BrooklynMementoImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/BrooklynMementoImpl.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/BrooklynMementoImpl.java
index 57276d5..d6dd359 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/BrooklynMementoImpl.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/BrooklynMementoImpl.java
@@ -47,6 +47,7 @@ public class BrooklynMementoImpl implements BrooklynMemento, Serializable {
     }
     
     public static class Builder {
+        protected String planeId;
         protected String brooklynVersion = BrooklynVersion.get();
         protected final List<String> applicationIds = Collections.synchronizedList(Lists.<String>newArrayList());
         protected final List<String> topLevelLocationIds = Collections.synchronizedList(Lists.<String>newArrayList());
@@ -58,6 +59,11 @@ public class BrooklynMementoImpl implements BrooklynMemento, Serializable {
         protected final Map<String, CatalogItemMemento> catalogItems = Maps.newConcurrentMap();
 
         
+        public Builder planeId(String val) {
+            planeId = val; return this;
+        }
+        /** @deprecated since 0.11.0; value unused */
+        @Deprecated
         public Builder brooklynVersion(String val) {
             brooklynVersion = val; return this;
         }
@@ -132,6 +138,7 @@ public class BrooklynMementoImpl implements BrooklynMemento, Serializable {
         }
     }
 
+    private String planeId;
     @SuppressWarnings("unused")
     private String brooklynVersion;
     private List<String> applicationIds;
@@ -144,6 +151,7 @@ public class BrooklynMementoImpl implements BrooklynMemento, Serializable {
     private Map<String, CatalogItemMemento> catalogItems;
     
     private BrooklynMementoImpl(Builder builder) {
+        planeId = builder.planeId;
         brooklynVersion = builder.brooklynVersion;
         applicationIds = builder.applicationIds;
         topLevelLocationIds = builder.topLevelLocationIds;
@@ -156,6 +164,11 @@ public class BrooklynMementoImpl implements BrooklynMemento, Serializable {
     }
 
     @Override
+    public String getPlaneId() {
+        return planeId;
+    }
+
+    @Override
     public EntityMemento getEntityMemento(String id) {
         return entities.get(id);
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/BrooklynMementoManifestImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/BrooklynMementoManifestImpl.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/BrooklynMementoManifestImpl.java
index 62ee2c6..664ddfe 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/BrooklynMementoManifestImpl.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/BrooklynMementoManifestImpl.java
@@ -38,6 +38,7 @@ public class BrooklynMementoManifestImpl implements BrooklynMementoManifest, Ser
     }
     
     public static class Builder {
+        protected String planeId;
         protected String brooklynVersion;
         protected final Map<String, EntityMementoManifest> entityIdToManifest = Maps.newConcurrentMap();
         protected final Map<String, String> locationIdToType = Maps.newConcurrentMap();
@@ -45,7 +46,12 @@ public class BrooklynMementoManifestImpl implements BrooklynMementoManifest, Ser
         protected final Map<String, String> enricherIdToType = Maps.newConcurrentMap();
         protected final Map<String, String> feedIdToType = Maps.newConcurrentMap();
         protected final Map<String, CatalogItemMemento> catalogItems = Maps.newConcurrentMap();
-        
+
+        public Builder planeId(String planeId) {
+            this.planeId = planeId; return this;
+        }
+        /** @deprecated since 0.11.0; value is not used */
+        @Deprecated
         public Builder brooklynVersion(String val) {
             brooklynVersion = val; return this;
         }
@@ -103,6 +109,7 @@ public class BrooklynMementoManifestImpl implements BrooklynMementoManifest, Ser
         }
     }
 
+    private final String planeId;
     private final Map<String, EntityMementoManifest> entityIdToManifest;
     private final Map<String, String> locationIdToType;
     private final Map<String, String> policyIdToType;
@@ -111,6 +118,7 @@ public class BrooklynMementoManifestImpl implements BrooklynMementoManifest, Ser
     private Map<String, CatalogItemMemento> catalogItems;
     
     private BrooklynMementoManifestImpl(Builder builder) {
+        planeId = builder.planeId;
         entityIdToManifest = builder.entityIdToManifest;
         locationIdToType = builder.locationIdToType;
         policyIdToType = builder.policyIdToType;
@@ -120,6 +128,11 @@ public class BrooklynMementoManifestImpl implements BrooklynMementoManifest, Ser
     }
 
     @Override
+    public String getPlaneId() {
+        return planeId;
+    }
+
+    @Override
     public Map<String, EntityMementoManifest> getEntityIdToManifest() {
         return Collections.unmodifiableMap(entityIdToManifest);
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MutableBrooklynMemento.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MutableBrooklynMemento.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MutableBrooklynMemento.java
index 898fa91..7dce070 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MutableBrooklynMemento.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/dto/MutableBrooklynMemento.java
@@ -51,6 +51,7 @@ public class MutableBrooklynMemento implements BrooklynMemento {
 
     private static final long serialVersionUID = -442895028005849060L;
     
+    private String planeId;
     private final Collection<String> applicationIds = Sets.newLinkedHashSet();
     private final Collection<String> topLevelLocationIds = Sets.newLinkedHashSet();
     private final Map<String, EntityMemento> entities = Maps.newLinkedHashMap();
@@ -68,6 +69,7 @@ public class MutableBrooklynMemento implements BrooklynMemento {
     }
     
     public void reset(BrooklynMemento memento) {
+        planeId = memento.getPlaneId();
         applicationIds.addAll(memento.getApplicationIds());
         topLevelLocationIds.addAll(memento.getTopLevelLocationIds());
         for (String entityId : memento.getEntityIds()) {
@@ -78,6 +80,10 @@ public class MutableBrooklynMemento implements BrooklynMemento {
         }
     }
 
+    public void setPlaneId(String planeId) {
+        this.planeId = planeId;
+    }
+
     public void updateEntityMemento(EntityMemento memento) {
         updateEntityMementos(ImmutableSet.of(memento));
     }
@@ -189,6 +195,11 @@ public class MutableBrooklynMemento implements BrooklynMemento {
     public void removeCatalogItems(Collection<String> ids) {
         catalogItems.keySet().removeAll(ids);
     }
+    
+    @Override
+    public String getPlaneId() {
+        return planeId;
+    }
 
     @Override
     public EntityMemento getEntityMemento(String id) {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/transformer/CompoundTransformer.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/transformer/CompoundTransformer.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/transformer/CompoundTransformer.java
index ef8531c..74b8bb0 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/transformer/CompoundTransformer.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/transformer/CompoundTransformer.java
@@ -353,6 +353,7 @@ public class CompoundTransformer {
         }
         
         return BrooklynMementoRawData.builder()
+                .planeId(rawData.getPlaneId())
                 .entities(entities)
                 .locations(locations)
                 .policies(policies)

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/transformer/impl/DeleteOrphanedStateTransformer.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/transformer/impl/DeleteOrphanedStateTransformer.java b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/transformer/impl/DeleteOrphanedStateTransformer.java
index 04fdef5..de0f065 100644
--- a/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/transformer/impl/DeleteOrphanedStateTransformer.java
+++ b/core/src/main/java/org/apache/brooklyn/core/mgmt/rebind/transformer/impl/DeleteOrphanedStateTransformer.java
@@ -97,6 +97,7 @@ public class DeleteOrphanedStateTransformer extends CompoundTransformer {
         LOG.info("Deleting {} orphaned feed{} (of {}): {}", new Object[] {feedsToDelete.size(), Strings.s(feedsToDelete.size()), input.getFeeds().size(), feedsToDelete});
         
         return BrooklynMementoRawData.builder()
+                .planeId(input.getPlaneId())
                 .brooklynVersion(input.getBrooklynVersion())
                 .catalogItems(input.getCatalogItems())
                 .entities(input.getEntities())

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/main/java/org/apache/brooklyn/core/server/BrooklynServerPaths.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/server/BrooklynServerPaths.java b/core/src/main/java/org/apache/brooklyn/core/server/BrooklynServerPaths.java
index 16d7c5a..4ac5e2c 100644
--- a/core/src/main/java/org/apache/brooklyn/core/server/BrooklynServerPaths.java
+++ b/core/src/main/java/org/apache/brooklyn/core/server/BrooklynServerPaths.java
@@ -224,7 +224,7 @@ public class BrooklynServerPaths {
     
     public static File getBrooklynWebTmpDir(ManagementContext mgmt) {
         String brooklynMgmtBaseDir = getMgmtBaseDir(mgmt);
-        File webappTempDir = new File(Os.mergePaths(brooklynMgmtBaseDir, "planes", mgmt.getManagementPlaneId(), mgmt.getManagementNodeId(), "jetty"));
+        File webappTempDir = new File(Os.mergePaths(brooklynMgmtBaseDir, "planes", mgmt.getManagementNodeId(), "jetty"));
         try {
             FileUtils.forceMkdir(webappTempDir);
             Os.deleteOnExitRecursivelyAndEmptyParentsUpTo(webappTempDir, new File(brooklynMgmtBaseDir)); 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/test/java/org/apache/brooklyn/core/mgmt/ha/ImmutableManagementPlaneSyncRecord.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/mgmt/ha/ImmutableManagementPlaneSyncRecord.java b/core/src/test/java/org/apache/brooklyn/core/mgmt/ha/ImmutableManagementPlaneSyncRecord.java
index 4496037..6599640 100644
--- a/core/src/test/java/org/apache/brooklyn/core/mgmt/ha/ImmutableManagementPlaneSyncRecord.java
+++ b/core/src/test/java/org/apache/brooklyn/core/mgmt/ha/ImmutableManagementPlaneSyncRecord.java
@@ -23,19 +23,26 @@ import java.util.Map;
 import org.apache.brooklyn.api.mgmt.ha.ManagementNodeSyncRecord;
 import org.apache.brooklyn.api.mgmt.ha.ManagementPlaneSyncRecord;
 
-import com.google.common.base.Objects;
+import com.google.common.base.MoreObjects;
 import com.google.common.collect.ImmutableMap;
 
 public class ImmutableManagementPlaneSyncRecord implements ManagementPlaneSyncRecord {
+    private final String planeId;
     private final String masterNodeId;
     private final Map<String, ManagementNodeSyncRecord> managementNodes;
 
-    ImmutableManagementPlaneSyncRecord(String masterNodeId, Map<String, ManagementNodeSyncRecord> nodes) {
+    ImmutableManagementPlaneSyncRecord(String planeId, String masterNodeId, Map<String, ManagementNodeSyncRecord> nodes) {
+        this.planeId = planeId;
         this.masterNodeId = masterNodeId;
         this.managementNodes = ImmutableMap.copyOf(nodes);
     }
     
     @Override
+    public String getPlaneId() {
+        return planeId;
+    }
+    
+    @Override
     public String getMasterNodeId() {
         return masterNodeId;
     }
@@ -47,11 +54,19 @@ public class ImmutableManagementPlaneSyncRecord implements ManagementPlaneSyncRe
 
     @Override
     public String toString() {
-        return Objects.toStringHelper(this).add("master", masterNodeId).add("nodes", managementNodes.keySet()).toString();
+        return MoreObjects.toStringHelper(this)
+                .add("planeId", planeId)
+                .add("master", masterNodeId)
+                .add("nodes", managementNodes.keySet())
+                .toString();
     }
     
     @Override
     public String toVerboseString() {
-        return Objects.toStringHelper(this).add("master", masterNodeId).add("nodes", managementNodes).toString();
+        return MoreObjects.toStringHelper(this)
+                .add("planeId", planeId)
+                .add("master", masterNodeId)
+                .add("nodes", managementNodes)
+                .toString();
     }
 }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/test/java/org/apache/brooklyn/core/mgmt/ha/MutableManagementPlaneSyncRecord.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/mgmt/ha/MutableManagementPlaneSyncRecord.java b/core/src/test/java/org/apache/brooklyn/core/mgmt/ha/MutableManagementPlaneSyncRecord.java
index 09964c5..ca256c5 100644
--- a/core/src/test/java/org/apache/brooklyn/core/mgmt/ha/MutableManagementPlaneSyncRecord.java
+++ b/core/src/test/java/org/apache/brooklyn/core/mgmt/ha/MutableManagementPlaneSyncRecord.java
@@ -26,8 +26,14 @@ import org.apache.brooklyn.api.mgmt.ha.ManagementPlaneSyncRecord;
 import com.google.common.collect.Maps;
 
 public class MutableManagementPlaneSyncRecord implements ManagementPlaneSyncRecord {
+    private String planeId;
     private String masterNodeId;
     private Map<String, ManagementNodeSyncRecord> managementNodes = Maps.newConcurrentMap();
+    
+    @Override
+    public String getPlaneId() {
+        return planeId;
+    }
 
     @Override
     public String getMasterNodeId() {
@@ -45,7 +51,11 @@ public class MutableManagementPlaneSyncRecord implements ManagementPlaneSyncReco
     }
 
     public ImmutableManagementPlaneSyncRecord snapshot() {
-        return new ImmutableManagementPlaneSyncRecord(masterNodeId, managementNodes);
+        return new ImmutableManagementPlaneSyncRecord(planeId, masterNodeId, managementNodes);
+    }
+    
+    public void setPlaneId(String planeId) {
+        this.planeId = planeId;
     }
     
     public void setMasterNodeId(String masterNodeId) {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindTestUtils.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindTestUtils.java b/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindTestUtils.java
index fa59b5a..3f8e330 100644
--- a/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindTestUtils.java
+++ b/core/src/test/java/org/apache/brooklyn/core/mgmt/rebind/RebindTestUtils.java
@@ -55,6 +55,7 @@ import org.apache.brooklyn.core.test.entity.LocalManagementContextForTests;
 import org.apache.brooklyn.util.io.FileUtil;
 import org.apache.brooklyn.util.javalang.Serializers;
 import org.apache.brooklyn.util.javalang.Serializers.ObjectReplacer;
+import org.apache.brooklyn.util.text.Identifiers;
 import org.apache.brooklyn.util.time.Duration;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -226,6 +227,7 @@ public class RebindTestUtils {
             }
             if (forLive) {
                 unstarted = new LocalManagementContext(properties);
+                unstarted.generateManagementPlaneId();
             } else {
                 unstarted = LocalManagementContextForTests.builder(true).useProperties(properties).disableOsgi(!enableOsgi).build();
             }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/launcher-common/src/main/java/org/apache/brooklyn/launcher/common/BasicLauncher.java
----------------------------------------------------------------------
diff --git a/launcher-common/src/main/java/org/apache/brooklyn/launcher/common/BasicLauncher.java b/launcher-common/src/main/java/org/apache/brooklyn/launcher/common/BasicLauncher.java
index 5b157a3..afad4c9 100644
--- a/launcher-common/src/main/java/org/apache/brooklyn/launcher/common/BasicLauncher.java
+++ b/launcher-common/src/main/java/org/apache/brooklyn/launcher/common/BasicLauncher.java
@@ -571,7 +571,7 @@ public class BasicLauncher<T extends BasicLauncher<T>> {
         if (persistMode == PersistMode.DISABLED) {
             LOG.info("Persistence disabled");
             objectStore = null;
-            
+            ((LocalManagementContext)managementContext).generateManagementPlaneId();
         } else {
             try {
                 if (persistenceLocation == null) {

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/launcher/src/test/java/org/apache/brooklyn/launcher/AbstractCleanOrphanedStateTest.java
----------------------------------------------------------------------
diff --git a/launcher/src/test/java/org/apache/brooklyn/launcher/AbstractCleanOrphanedStateTest.java b/launcher/src/test/java/org/apache/brooklyn/launcher/AbstractCleanOrphanedStateTest.java
index 8c5608e..b64f291 100644
--- a/launcher/src/test/java/org/apache/brooklyn/launcher/AbstractCleanOrphanedStateTest.java
+++ b/launcher/src/test/java/org/apache/brooklyn/launcher/AbstractCleanOrphanedStateTest.java
@@ -52,6 +52,7 @@ public abstract class AbstractCleanOrphanedStateTest extends RebindTestFixtureWi
         @Override
         public BrooklynMementoRawData apply(BrooklynMementoRawData input) {
             return BrooklynMementoRawData.builder()
+                    .planeId(input.getPlaneId())
                     .brooklynVersion(input.getBrooklynVersion())
                     .catalogItems(input.getCatalogItems())
                     .entities(MutableMap.<String, String>builder().putAll(input.getEntities()).removeAll(deletions.entities).build())

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/e799ca9e/launcher/src/test/java/org/apache/brooklyn/launcher/BrooklynLauncherTest.java
----------------------------------------------------------------------
diff --git a/launcher/src/test/java/org/apache/brooklyn/launcher/BrooklynLauncherTest.java b/launcher/src/test/java/org/apache/brooklyn/launcher/BrooklynLauncherTest.java
index 72f389e..8e89352 100644
--- a/launcher/src/test/java/org/apache/brooklyn/launcher/BrooklynLauncherTest.java
+++ b/launcher/src/test/java/org/apache/brooklyn/launcher/BrooklynLauncherTest.java
@@ -101,7 +101,7 @@ public class BrooklynLauncherTest {
                 .start();
         
         ManagementContext managementContext = launcher.getServerDetails().getManagementContext();
-        String expectedTempDir = Os.mergePaths(Os.home(), dataDirName, "planes", managementContext.getManagementPlaneId(), managementContext.getManagementNodeId(), "jetty");
+        String expectedTempDir = Os.mergePaths(Os.home(), dataDirName, "planes", managementContext.getManagementNodeId(), "jetty");
         
         File webappTempDir = launcher.getServerDetails().getWebServer().getWebappTempDir();
         assertEquals(webappTempDir.getAbsolutePath(), expectedTempDir);


Mime
View raw message