From 71029f69b57cc5e17f388614eeb4cd61f81cc4e1 Mon Sep 17 00:00:00 2001 From: Jake Smith Date: Tue, 31 Oct 2023 17:27:04 +0000 Subject: [PATCH] HPCC-30525 Also ensure ensureConsistentStorageGroup treats groups as LC ensureConsistentStorageGroup used when creating groups from storage/planes, could potentially create groups with mixed case too. Ensure lower-cased also. Signed-off-by: Jake Smith --- dali/base/dadfs.cpp | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/dali/base/dadfs.cpp b/dali/base/dadfs.cpp index 355b9f2bb4a..10ecce32320 100644 --- a/dali/base/dadfs.cpp +++ b/dali/base/dadfs.cpp @@ -10580,8 +10580,12 @@ class CInitGroups void ensureStorageGroup(bool force, const char * name, unsigned numDevices, const char * path, StringBuffer & messages) { - Owned newClusterGroup = createStorageGroup(name, numDevices, path); - ensureConsistentStorageGroup(force, name, newClusterGroup, messages); + //Lower case the group name - see CNamedGroupStore::dolookup which lower cases before resolving. + StringBuffer gname; + gname.append(name).toLowerCase(); + + Owned newClusterGroup = createStorageGroup(gname, numDevices, path); + ensureConsistentStorageGroup(force, gname, newClusterGroup, messages); } void constructStorageGroups(bool force, StringBuffer &messages) @@ -10620,7 +10624,7 @@ class CInitGroups } else if (plane.hasProp("hostGroup")) { - throw makeStringExceptionV(-1, "Use 'hosts' rather than 'hostGroup' for inline list of hosts for plane %s", name); + throw makeStringExceptionV(-1, "Use 'hosts' rather than 'hostGroup' for inline list of hosts for plane %s", gname.str()); } else if (plane.hasProp("hosts")) { @@ -10635,9 +10639,9 @@ class CInitGroups { //Locally mounted, or url accessed storage plane - no associated hosts, localhost used as a placeholder unsigned numDevices = plane.getPropInt("@numDevices", 1); - newClusterGroup.setown(createStorageGroup(name, numDevices, prefix)); + newClusterGroup.setown(createStorageGroup(gname, numDevices, prefix)); } - ensureConsistentStorageGroup(force, name, newClusterGroup, messages); + ensureConsistentStorageGroup(force, gname, newClusterGroup, messages); } } }