Skip to content

Commit

Permalink
HPCC-30525 Also ensure ensureConsistentStorageGroup treats groups as LC
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
jakesmith committed Oct 31, 2023
1 parent 7c8a444 commit 71029f6
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions dali/base/dadfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10580,8 +10580,12 @@ class CInitGroups

void ensureStorageGroup(bool force, const char * name, unsigned numDevices, const char * path, StringBuffer & messages)
{
Owned<IPropertyTree> 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<IPropertyTree> newClusterGroup = createStorageGroup(gname, numDevices, path);
ensureConsistentStorageGroup(force, gname, newClusterGroup, messages);
}

void constructStorageGroups(bool force, StringBuffer &messages)
Expand Down Expand Up @@ -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"))
{
Expand All @@ -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);
}
}
}
Expand Down

0 comments on commit 71029f6

Please sign in to comment.