-
Notifications
You must be signed in to change notification settings - Fork 304
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HPCC-32724 Allow storage planes to be defined in bare-metal systems #19234
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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']")); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. minor style: For loops with empty bodies it is clearer to code as the following: while (storage->removeProp("planes[@fromGroup='1']")) because it makes it clear that the body is intentionally blank. No need to change for this PR since it matches other examples. Although having said that there should be a function that avoids the need for the loop. @jakesmith Added HPCC-33048. |
||
storage->removeProp("hostGroups"); // generateHosts will recreate host groups for all planes | ||
|
||
GroupInfoArray allGroups; | ||
unsigned numDropZones = 0; | ||
|
||
|
@@ -3705,7 +3716,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(); | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In a future PR it might be interesting to allow some attributes for the implicit storage planes to be set in the configuration - so merge the definitions. For example to be able to set expert options on thor storage planes, even if only for testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree and have opened this JIRA.