DAOS-18899 control: Prevent duplicate rank entries for same engine#18127
DAOS-18899 control: Prevent duplicate rank entries for same engine#18127tanabarr wants to merge 12 commits into
Conversation
|
Test stage Unit Test completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-18127/1/testReport/ |
|
Test stage NLT completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-18127/1/execution/node/680/log |
|
Ticket title is 'Prevent multiple rank entries for the same engine' |
kjacque
left a comment
There was a problem hiding this comment.
Looks pretty straightforward. Nice job.
| } | ||
|
|
||
| if len(missing) != 0 { | ||
| if !memberFieldsMatch(cm, req) { |
There was a problem hiding this comment.
Maybe the helper function could return the missing values as well, to avoid having to check twice?
| // Fixed DAOS-15947: Now refused as duplicate addresses/URIs with different UUID | ||
| // requiring --replace option. |
There was a problem hiding this comment.
minor - I'd pull out the ticket number reference at this point
Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
|
Test stage NLT completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-18127/2/execution/node/639/log |
|
Test stage Unit Test completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-18127/2/testReport/ |
Features: control Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
…treplace-rank-erase Features: control Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
6428f4f to
df1b32e
Compare
Features: control Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
a5ff888 to
3a802ac
Compare
Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
…treplace-rank-erase Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
Features: control Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
3a802ac to
acd0383
Compare
knard38
left a comment
There was a problem hiding this comment.
Nothing blocking from my side, just a minor fix which could be done in a follow-up PR if the author considers it as relevant.
| if matched, _ := memberFieldsMatch(cm, req); !matched { | ||
| continue // Fields don't match, skip | ||
| } | ||
|
|
There was a problem hiding this comment.
If a matching member is in AdminExcluded state, the operator is directed to use --replace, but joinReplace will also fail with ErrJoinAdminExcluded. Would it make sense to branch on the state and return a dedicated fault with the correct two-step resolution?
if cm.State == MemberStateAdminExcluded {
return FaultJoinMemberExistsAdminExcluded(req.UUID, cm.UUID)
}
return FaultJoinMemberExists(req.UUID, cm.UUID)func FaultJoinMemberExistsAdminExcluded(newUUID, dbUUID uuid.UUID) *fault.Fault {
return systemFault(
code.SystemJoinMemberExists,
fmt.Sprintf("... already exists with UUID %s and is admin-excluded", dbUUID),
"clear the exclusion first with 'dmg system exclude --clear <rank>', "+
"then reformat with 'dmg storage format --replace'",
)
}No issue to keep as-is if this scenario is considered out-of-scope.
There was a problem hiding this comment.
good suggestion I've added the change to #18142
|
Test stage Functional Hardware Medium MD on SSD completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-18127/7/testReport/ |
The base branch was changed.
…in-no-dupes Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
…in-no-dupes Features: control Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
Prevent a rank from joining the DAOS system if all management service
database fields or the joining rank match apart from the UUID. This
avoids the situation where we have multiple ranks matching the same
engine specification. If a rank needs to be added back to an engine
that matches entries in the database then it needs to be formatted
with the dmg storage format --replace command.
Features: control
Steps for the author:
After all prior steps are complete: