Skip to content

DAOS-20066 ftest: automated hotplug coverage - #19629

Draft
tanabarr wants to merge 2 commits into
masterfrom
tanabarr/ftest-nvme-hotplug
Draft

tanabarr wants to merge 2 commits into
masterfrom
tanabarr/ftest-nvme-hotplug

Conversation

@tanabarr

Copy link
Copy Markdown
Contributor

Features: nvme

Steps for the author:

  • Commit message follows the guidelines.
  • Appropriate Features or Test-tag pragmas were used.
  • Appropriate Functional Test Stages were run.
  • At least two positive code reviews including at least one code owner from each category referenced in the PR.
  • Testing is complete. If necessary, forced-landing label added and a reason added in a comment.

After all prior steps are complete:

  • Gatekeeper requested (daos-gatekeeper added as a reviewer).

Features: nvme
Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>
@tanabarr tanabarr self-assigned this Nov 24, 2026
@tanabarr

Copy link
Copy Markdown
Contributor Author

@NiuYawei @Michael-Hennecke any other test cases to cover?

@daltonbohning @phender do the tests look okay?

@daosbuild3

Copy link
Copy Markdown
Collaborator

@daosbuild3

Copy link
Copy Markdown
Collaborator

Test stage Functional Cluster Box Medium MD on SSD completed with status FAILURE. https://jenkins-3.daos.hpc.amslabs.hpecorp.net//job/daos-stack/job/daos/view/change-requests/job/PR-19629/1/execution/node/1693/log

@daosbuild3

Copy link
Copy Markdown
Collaborator

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-19629/1/testReport/

@daosbuild3

Copy link
Copy Markdown
Collaborator

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-19629/1/testReport/

Comment thread src/tests/ftest/nvme/hotplug.yaml Outdated

pool:
size: 90%
svcn: 3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit - I recommend leaving this out if not needed, since that is the default for 3 servers, right?

Comment thread src/tests/ftest/nvme/hotplug.yaml Outdated
Comment on lines +34 to +35
file_oclass: EC_16P2GX
dir_oclass: EC_16P2GX

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recommend leaving the object class out of the container create since it is specified in the ior namespace. That way we don't have to worry about keeping it in sync

Comment thread src/tests/ftest/nvme/hotplug.yaml Outdated
Comment on lines +41 to +42
repetitions: 1
dfs_destroy: false

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Recommend removing these since they are the defaults

Comment thread src/tests/ftest/nvme/hotplug.yaml Outdated
dfs_destroy: false
flags: "-w -F -k -G 1"
api: DFS
dfs_oclass: EC_16P2GX

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

16P2 will not run with 3 servers. The most we can do in CI is to run on HW Large with 7 servers, dual engine. So with 14 engines total you could use 8P2 or 8P3.

Or with 6 engines on HW Medium you could use up to 4P2

Comment thread src/tests/ftest/nvme/hotplug.yaml Outdated
Comment on lines +49 to +53
aggregation:
test_with_aggregation: true

rebuild:
test_with_rebuild: true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like this was copied form somewhere else and is unused in this test?

Comment thread src/tests/ftest/nvme/hotplug.py Outdated

Erases any existing SPDK blobstore/SMD metadata header so the device at pci_addr is
attached by the kernel nvme driver, is treated as blank/new when it is subsequently
rebound to the userspace driver, simulating a real drive replacement without requiring

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong-spelling-in-docstring, Wrong spelling of a word 'userspace' in a docstring:

Probably can just split that into "user space" or add "userspace" to utils/cq/words.dict

Comment thread src/tests/ftest/nvme/hotplug.py Outdated
self.log_step(f"Rebinding device {pci_addr} to the userspace driver on {host}")
self.dmg.hostlist = NodeSet(host)
try:
get_dmg_response(self.dmg.storage_nvme_rebind, pci_address=pci_addr)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't need to do anything with the response, we should just call the method directly

Suggested change
get_dmg_response(self.dmg.storage_nvme_rebind, pci_address=pci_addr)
self.dmg.storage_nvme_rebind(pci_address=pci_addr)

Comment thread src/tests/ftest/nvme/hotplug.py Outdated
Comment on lines +195 to +198
server_manager = self.server_managers[-1]
rank_to_host = server_manager.ranks
rank = sorted(rank_to_host)[0]
host = rank_to_host[rank]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The keys in rank_to_host are the ranks, and this sorts them, so rank here is always 0. I think this could either be simplified to

Suggested change
server_manager = self.server_managers[-1]
rank_to_host = server_manager.ranks
rank = sorted(rank_to_host)[0]
host = rank_to_host[rank]
server_manager = self.server_managers[-1]
rank_to_host = server_manager.ranks
rank = 0
host = rank_to_host[rank]

Or it could use some randomness

Suggested change
server_manager = self.server_managers[-1]
rank_to_host = server_manager.ranks
rank = sorted(rank_to_host)[0]
host = rank_to_host[rank]
server_manager = self.server_managers[-1]
rank_to_host = server_manager.ranks
rank = self.random.choice(list(rank_to_host.keys()))
host = rank_to_host[rank]

Comment thread src/tests/ftest/nvme/hotplug.py Outdated

self.log.info("Test passed")

@fail_on(CommandFailure)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually not necessary because any uncaught exception already becomes a failure

Comment thread src/tests/ftest/nvme/hotplug.py Outdated
10. Reset the LED state of the replaced device.

:avocado: tags=all,full_regression
:avocado: tags=hw,large

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some of these tests are hw medium but some are hw large? but only with 3 servers?

Test-tag: NvmeHotplug
Signed-off-by: Tom Nabarro <thomas.nabarro@hpe.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants