From 9ab6ad9400cabee9c9a12a729f6e2d77d67f0e7e Mon Sep 17 00:00:00 2001 From: Jack Del Vecchio Date: Fri, 25 Oct 2024 10:08:01 -0400 Subject: [PATCH] HPCC-32724 Allow storage planes to be defined in bare-metal systems - Checks environment.xml for Software/Globals/Storage and looks for any storage planes defined. Signed-off-by: Jack Del Vecchio --- dali/base/dafdesc.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/dali/base/dafdesc.cpp b/dali/base/dafdesc.cpp index 7a811d589d6..60fd6c2650f 100644 --- a/dali/base/dafdesc.cpp +++ b/dali/base/dafdesc.cpp @@ -3699,12 +3699,20 @@ static void doInitializeStorageGroups(bool createPlanesFromGroups) if (cur.groupType == grp_thor) cur.createStoragePlane(storage, 1); } + } - //Uncomment the following to trace the values that been generated - //printYAML(storage); + // 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)); } -#endif + //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 normalizeHostGroups();