Repository navigation
DAOS-17935 control: Remove spdk lockfiles before and after local scan - #16769
Conversation
|
Ticket title is 'SPDK lockfiles need to be removed in storage format and scan' |
|
Test stage Functional on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-16769/1/testReport/ |
| if err := cs.cleanSpdkResources(); err != nil { | ||
| return nil, errors.Wrap(err, "clean spdk resources") | ||
| } | ||
|
|
There was a problem hiding this comment.
@NiuYawei, do you know if this is safe? I think for StorageFormat it's okay, but my knowledge is insufficient in the StorageScan case.
There was a problem hiding this comment.
In response to the question:
Does the clean up call promise to keep data intact?
On format, lockfiles for engine should be removed before and after because the engine in question has not been started yet. On scan, lockfiles should be removed before and after if the relevant engine(s) have not started (this requires a change to the current PR, thanks for prompting). If during scan the engine has already started then lockfiles should not be touched as the scan goes through dRPC to the engine. The orphan-hugepage part of cleanup doesn't affect hugepages owned by an existing process. So if the above is considered the call should promise to keep data intact.
There was a problem hiding this comment.
Thanks, sounds fine to me then.
| if err := cs.cleanSpdkResources(); err != nil { | ||
| return nil, errors.Wrap(err, "clean spdk resources") | ||
| } | ||
|
|
There was a problem hiding this comment.
Thanks, sounds fine to me then.
|
Test stage Functional on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-16769/2/execution/node/477/log |
e78b4b2 to
b84dfe1
Compare
|
Test stage Unit Test with memcheck on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-16769/5/display/redirect |
|
Test stage Unit Test bdev with memcheck on EL 8.8 completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos/job/PR-16769/6/display/redirect |
|
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-16769/6/testReport/ |
|
Test stage Functional on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-16769/7/testReport/ |
Features: control Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
Features: control Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
906a63d to
2f1716a
Compare
Features: control Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
2f1716a to
74719e7
Compare
kjacque
left a comment
There was a problem hiding this comment.
Looks reasonable to me. We have some unit tests related to cleaning up lockfiles, don't we? It would be good to verify this logic works as expected.
The clean methods are already unit tested. Adding these calls shouldn't necessitate new unit tests IMO but if you insist I will add them. |
kjacque
left a comment
There was a problem hiding this comment.
The main area that could benefit from a new test case is the conditional in spdkBackend.Scan. If you've verified this manually, though, I can approve it as-is. IMO any change in logic that produces some kind of verifiable behavior change is interesting to unit test, whenever that's possible anyway.
…dk-clean-on-scanfmt Features: control Allow-unstable-test: true Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
|
@kjacque the unit tests weren't trivial, there is some problem in passing call stats from the MockNvmeImpl up to the scan call level that I have to figure out, I would like to land this and then figure that out as a subsequent change. The strange thing is that it works for the MockEnvImpl! |
|
Test stage NLT on EL 8.8 completed with status UNSTABLE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net/job/daos-stack/job/daos//view/change-requests/job/PR-16769/12/testReport/ |
|
Test stage Functional Hardware Large 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-16769/13/testReport/ |
|
Test stage Functional Hardware Large 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-16769/15/testReport/ |
|
Can I ask gatekeepers to consider force landing #16769 despite the config generate failures? I'm working on resolving those separately and I don't think they are introduced by PR-16769 and are a separate issue. PR-16769 will hopefully help with SRE-3150 and I think it's required for PR-16761 to work properly. I've restarted the hardware large stage but I think I'm still going to get the config generate failures. @daos-stack/daos-gatekeeper I hit rerun from stage hardware but please use results from run 15 when considering landing it. |
…#16769) Remove SPDK device lockfiles before and after ControlService performs a scan on engine-assigned bdevs when an engine is not running. This removes SPDK lockfiles for a device only when the engine has not claimed that device. Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
…#16769) Remove SPDK device lockfiles before and after ControlService performs a scan on engine-assigned bdevs when an engine is not running. This removes SPDK lockfiles for a device only when the engine has not claimed that device. Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
* DAOS-18065 ci: empty /sys/class/nvme/ on leap15 when no NVMe device attached (#16956) (#17013) On leap15 the /sys/class/nvme/ folder exists but it is empty when no NVMe device attached. Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com> * SRE-3562 ci: update MLNX_VER_NUM to 3.2.1 (#17463) (#17592) Required for EL9.7 Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com> * DAOS-17341 control: Remove spdk lockfiles on engine exit (#16181) (#16765) PR-15799 introduced a change which means SIGKILL is used to terminate engine processes during dmg system stop. One result of this is that SPDK processes don't cleanup NVMe SSD lockfiles that are intended to prevent multiple processes from accessing the same NVMe device. This change enables the control plane to: - Cleanup SPDK lockfiles and orphan hugepages on engine storage-ready, termination and server start-up. - Cleanup SPDK lockfiles and orphan hugepages on daos_server nvme prepare|reset. - Improve handling of disable_hugepages server config file parameter. - Clean all SPDK lockfiles when daos_server nvme prepare|reset is called without specifying any allow or block lists either via cli or config file. Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com> * DAOS-17935 control: Remove spdk lockfiles before and after local scan (#16769) (#17160) Remove SPDK device lockfiles before and after ControlService performs a scan on engine-assigned bdevs when an engine is not running. This removes SPDK lockfiles for a device only when the engine has not claimed that device. Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com> --------- Signed-off-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com> Signed-off-by: Jan Michalski <jan-marian.michalski@hpe.com> Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com> Co-authored-by: Tomasz Gromadzki <tomasz.gromadzki@hpe.com> Co-authored-by: Phil Henderson <phillip.henderson@hpe.com> Co-authored-by: Tom Nabarro <tom.nabarro@intel.com>
Remove SPDK device lockfiles before and after ControlService performs
a scan on engine-assigned bdevs when an engine is not running. This
removes SPDK lockfiles for a device only when the engine has not
claimed that device.
Features: control
Steps for the author:
After all prior steps are complete: