diff --git a/dali/base/dafdesc.cpp b/dali/base/dafdesc.cpp index 60fd6c2650f..7a4600c62ec 100644 --- a/dali/base/dafdesc.cpp +++ b/dali/base/dafdesc.cpp @@ -3498,6 +3498,11 @@ bool GroupInformation::checkIsSubset(const GroupInformation & other) void GroupInformation::createStoragePlane(IPropertyTree * storage, unsigned copy) const { + // Check that storage plane does not already have a definition + VStringBuffer xpath("planes[@name='%s']", name.str()); + if (storage->hasProp(xpath)); + return; + IPropertyTree * plane = storage->addPropTree("planes"); StringBuffer mirrorname; const char * planeName = name; @@ -3539,6 +3544,8 @@ void GroupInformation::createStoragePlane(IPropertyTree * storage, unsigned copy const char * category = (dropZoneIndex != 0) ? "lz" : "data"; plane->setProp("@category", category); + plane->setPropBool("@fromGroup", true); + //MORE: If container is identical to this except for the name we could generate an information tag @alias } @@ -3652,8 +3659,12 @@ static void doInitializeStorageGroups(bool createPlanesFromGroups) storage.set(globalConfig->addPropTree("storage")); #ifndef _CONTAINERIZED - if (createPlanesFromGroups && !storage->hasProp("planes")) + if (createPlanesFromGroups) { + // Remove old planes created from groups + while (storage->removeProp("planes[@fromGroup=\"1\"]")); + storage->removeProp("hostGroups"); // generateHosts will recreate host groups for all planes + GroupInfoArray allGroups; unsigned numDropZones = 0; @@ -3699,19 +3710,10 @@ static void doInitializeStorageGroups(bool createPlanesFromGroups) if (cur.groupType == grp_thor) cur.createStoragePlane(storage, 1); } - } - // Add storage planes defined in environment.xml - Owned env = getHPCCEnvironment(); - Owned storagePlanes = env->getElements("Software/Globals/Storage/StoragePlane"); - ForEach(*storagePlanes) - { - IPropertyTree & storagePlane = storagePlanes->query(); - storage->addPropTree("planes", LINK(&storagePlane)); + //Uncomment the following to trace the values that been generated + //printYAML(storage); } - - //Uncomment the following to trace the values that been generated - //printYAML(storage); #endif //Ensure that host groups that are defined in terms of other host groups are expanded out so they have an explicit list of hosts diff --git a/initfiles/componentfiles/configxml/RoxieTopology.xsl b/initfiles/componentfiles/configxml/RoxieTopology.xsl index 96e584b6b0e..2b896e0a078 100644 --- a/initfiles/componentfiles/configxml/RoxieTopology.xsl +++ b/initfiles/componentfiles/configxml/RoxieTopology.xsl @@ -137,6 +137,7 @@ + diff --git a/initfiles/componentfiles/configxml/agentexec.xsl b/initfiles/componentfiles/configxml/agentexec.xsl index 182e503e021..7a6166387a1 100644 --- a/initfiles/componentfiles/configxml/agentexec.xsl +++ b/initfiles/componentfiles/configxml/agentexec.xsl @@ -137,6 +137,7 @@ + diff --git a/initfiles/componentfiles/configxml/dali.xsl b/initfiles/componentfiles/configxml/dali.xsl index b751bf3c863..85f316fbf6e 100644 --- a/initfiles/componentfiles/configxml/dali.xsl +++ b/initfiles/componentfiles/configxml/dali.xsl @@ -120,6 +120,7 @@ + diff --git a/initfiles/componentfiles/configxml/dfuserver.xsl b/initfiles/componentfiles/configxml/dfuserver.xsl index fb5c607731a..c4db09ddc88 100644 --- a/initfiles/componentfiles/configxml/dfuserver.xsl +++ b/initfiles/componentfiles/configxml/dfuserver.xsl @@ -100,6 +100,7 @@ + diff --git a/initfiles/componentfiles/configxml/esp.xsl b/initfiles/componentfiles/configxml/esp.xsl index 8fca1a45b39..8287a3e6bb4 100644 --- a/initfiles/componentfiles/configxml/esp.xsl +++ b/initfiles/componentfiles/configxml/esp.xsl @@ -76,6 +76,7 @@ + diff --git a/initfiles/componentfiles/configxml/thor.xsl b/initfiles/componentfiles/configxml/thor.xsl index 4e2a3527889..1107c25802e 100644 --- a/initfiles/componentfiles/configxml/thor.xsl +++ b/initfiles/componentfiles/configxml/thor.xsl @@ -205,7 +205,8 @@ --> - + +