e2e: add nvmeof vac test#6276
Conversation
Merge Protections🟢 All 2 merge protections satisfied — ready to merge. Show 2 satisfied protections🟢 ⛓️ Depends-On RequirementsRequirement based on the presence of
🟢 🚦 Auto-queueWhen all merge protections are satisfied, this pull request will be queued automatically. |
ca74032 to
9dab5f7
Compare
There was a problem hiding this comment.
Pull request overview
This PR introduces an NVMe-oF VolumeAttributesClass (VAC) example plus an end-to-end test that provisions an NVMe-oF PVC referencing a VAC (with allowHostNQNs) and then deletes it, aiming to validate VAC support for NVMe-oF.
Changes:
- Add an NVMe-oF VAC example manifest documenting
allowHostNQNsand NVMe-oF QoS parameters. - Add an NVMe-oF e2e test that creates a VAC, provisions a PVC referencing it, and validates backend object lifecycle.
- Add an e2e helper to create NVMe-oF
VolumeAttributesClassresources.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| examples/nvmeof/volumeattributesclass.yaml | New VAC example YAML for NVMe-oF (includes allowHostNQNs and QoS docs). |
| e2e/nvmeof.go | New NVMe-oF e2e test covering PVC lifecycle when using a VAC reference. |
| e2e/nvmeof-deploy.go | New helper to create NVMe-oF VolumeAttributesClass resources in e2e. |
| return wait.PollUntilContextTimeout(context.TODO(), poll, timeout, true, func(ctx context.Context) (bool, error) { | ||
| _, err = c.StorageV1().VolumeAttributesClasses().Create(ctx, &vac, metav1.CreateOptions{}) | ||
| if err != nil { | ||
| framework.Logf("error creating VolumeAttributesClass %q: %v", vac.Name, err) |
There was a problem hiding this comment.
move this line to 279 below already exists error as this is false positive
| pvc.Spec.VolumeAttributesClassName = &vacName | ||
|
|
||
| ginkgo.By("Creating PVC with VolumeAttributesClass reference") | ||
| err = createPVCAndvalidatePV(f.ClientSet, pvc, deployTimeout) |
There was a problem hiding this comment.
dont we need to validate the right allowHostNQNs values are set?
There was a problem hiding this comment.
good point,
I think right now there is no nvmeof toolbox for querying the GW, which can return what hosts are in the list. (As we don't verify in create a PVC and delete it the nvmeof namespace is created ..)
@nixpanic , maybe we should reconsider it?
There was a problem hiding this comment.
A test that allows attaching and mounting would be nice. Testing for expected failing to mount is not appropriate, it will take too much time and causes CI runs to take much more time (Kubernetes will continue to re-try for a while).
Possibly you could run the nvme command directly in the NVMe-oF node-plugin to verify the inaccessibility, but that may be tricky.
There was a problem hiding this comment.
I will check it.
Now I realize I did not use dedicated StorageClass in this test (without subsystemNQN)
I will fix it as well.
There was a problem hiding this comment.
Hi, I added in the nvmeof helper test file nvme connect-all with the given external hostNQN. this command runs on the node plugin (simulated as external client) then check by nvme list-subsys if the host is there in the output.
I also override for this test the StorageClass, because for external clients they need dedicated SC (basically without SubsystemNQN field) .
9dab5f7 to
ccacbc3
Compare
ccacbc3 to
e42de3f
Compare
|
/test ci/centos/mini-e2e/k8s-1.35/nvmeof |
e42de3f to
8b5ab59
Compare
|
/test ci/centos/mini-e2e/k8s-1.35/nvmeof |
|
the first has an issue . |
|
@nixpanic |
|
These steps can be done once #6354 passed all CI jobs:
|
|
@Mergifyio rebase |
🛑 The pull request rule doesn't match anymoreDetailsThis action has been cancelled. |
Add a VolumeAttributesClass example for NVMe-oF volumes demonstrating the mutable parameters supported by the driver: - Host access control via allowHostNQNs parameter (for external hosts) - QoS parameters The example includes a working configuration with host access control enabled, and all optional parameters documented as comments with explanations. Also add an e2e test that validates VAC functionality by: 1. Creating a VAC with allowHostNQNs parameter 2. Creating a PVC that references the VAC 3. Verifying volume creation 4. check the host was added by run nvme connect 5. activate new VAC and recheck the new host 5. Validating cleanup Signed-off-by: gadi-didi <gadi.didi@ibm.com>
f674431 to
daedce7
Compare
|
@Mergifyio rebase |
☑️ Nothing to do, the required conditions are not metDetails
|
|
/test ci/centos/k8s-e2e-external-storage/1.36 |
|
/test ci/centos/k8s-e2e-external-storage/1.35 |
|
/test ci/centos/k8s-e2e-external-storage/1.34 |
|
/test ci/centos/mini-e2e-helm/k8s-1.36 |
|
/test ci/centos/mini-e2e-helm/k8s-1.35 |
|
/test ci/centos/upgrade-tests-cephfs |
|
/test ci/centos/mini-e2e/k8s-1.35 |
|
/test ci/centos/mini-e2e-helm/k8s-1.34 |
|
/test ci/centos/mini-e2e/k8s-1.36 |
|
/test ci/centos/upgrade-tests-rbd |
|
/test ci/centos/mini-e2e/k8s-1.34 |
|
/test ci/centos/mini-e2e/k8s-1.36 |
Unrelated failure with NFS. logs |
|
Deprecation notice: This pull request comes from a fork and was queued with |
Merge Queue Status
This pull request spent 8 seconds in the queue, including 1 second running CI. Required conditions to merge
|
Add VolumeAttributesClass example and e2e test for NVMe-oF
This PR adds example documentation and end-to-end testing for NVMe-oF VolumeAttributesClass support.
Changes:
examples/nvmeof/volumeattributesclass.yaml): Demonstrates usingallowHostNQNsparameter to control host access to volumes, with all QoS parameters documentedcreateNVMeOFVolumeAttributesClass()helper for reusable VAC creation in testsWhat it tests:
allowHostNQNsparameterThis e2e PR is based on that PR: #6251 . Once that will be merged, this PR can be rebased and opened
Depends-on: #6251