Skip to content

Commit

Permalink
Merge pull request #19234 from jackdelv/issue32724
Browse files Browse the repository at this point in the history
HPCC-32724 Allow storage planes to be defined in bare-metal systems

Reviewed-by: Jake Smith <jake.smith@lexisnexisrisk.com>
Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>
Merged-by: Gavin Halliday <ghalliday@hpccsystems.com>
  • Loading branch information
ghalliday authored Dec 4, 2024
2 parents 5cca2b5 + a70dfcb commit a8b1971
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 3 deletions.
14 changes: 12 additions & 2 deletions dali/base/dafdesc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3570,6 +3570,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;
Expand Down Expand Up @@ -3611,6 +3616,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
}

Expand Down Expand Up @@ -3724,8 +3731,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;

Expand Down Expand Up @@ -3777,7 +3788,6 @@ static void doInitializeStorageGroups(bool createPlanesFromGroups)
}
#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
normalizeHostGroups();

Expand Down
1 change: 1 addition & 0 deletions initfiles/componentfiles/configxml/RoxieTopology.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
<global>
<storage>
<xsl:copy-of select="/Environment/Software/RemoteStorage/*"/>
<xsl:copy-of select="/Environment/Software/Globals/storage/*"/>
</storage>
<expert>
<xsl:copy-of select="/Environment/Software/Globals/@* | /Environment/Software/Globals/*"/>
Expand Down
1 change: 1 addition & 0 deletions initfiles/componentfiles/configxml/agentexec.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@
<global>
<storage>
<xsl:copy-of select="/Environment/Software/RemoteStorage/*"/>
<xsl:copy-of select="/Environment/Software/Globals/storage/*"/>
</storage>
<expert>
<xsl:copy-of select="/Environment/Software/Globals/@* | /Environment/Software/Globals/*"/>
Expand Down
1 change: 1 addition & 0 deletions initfiles/componentfiles/configxml/dali.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
<xsl:copy-of select="/Environment/Software/Globals/@* | /Environment/Software/Globals/*"/>
</expert>
<xsl:copy-of select="/Environment/Hardware/cost"/>
<xsl:copy-of select="/Environment/Software/Globals/storage"/>
</global>
<xsl:if test="@authMethod='secmgrPlugin'">
<SecurityManagers>
Expand Down
1 change: 1 addition & 0 deletions initfiles/componentfiles/configxml/dfuserver.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
<global>
<storage>
<xsl:copy-of select="/Environment/Software/RemoteStorage/*"/>
<xsl:copy-of select="/Environment/Software/Globals/storage/*"/>
</storage>
<expert>
<xsl:copy-of select="/Environment/Software/Globals/@* | /Environment/Software/Globals/*"/>
Expand Down
1 change: 1 addition & 0 deletions initfiles/componentfiles/configxml/esp.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@
</expert>
<storage>
<xsl:copy-of select="/Environment/Software/RemoteStorage/*"/>
<xsl:copy-of select="/Environment/Software/Globals/storage/*"/>
</storage>
<xsl:copy-of select="/Environment/Hardware/cost"/>
<xsl:copy-of select="/Environment/Software/tracing"/>
Expand Down
3 changes: 2 additions & 1 deletion initfiles/componentfiles/configxml/thor.xsl
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@
-->
<global>
<storage>
<xsl:copy-of select="/Environment/Software/RemoteStorage/*"/>
<xsl:copy-of select="/Environment/Software/RemoteStorage/*"/>
<xsl:copy-of select="/Environment/Software/Globals/storage/*"/>
</storage>
<expert>
<xsl:copy-of select="/Environment/Software/Globals/@* | /Environment/Software/Globals/*"/>
Expand Down

0 comments on commit a8b1971

Please sign in to comment.