Skip to content

e2e: add snapshot test in nvmeof csi - #6438

Merged
mergify[bot] merged 2 commits into
ceph:develfrom
gadididi:e2e/nvmeof_add_snapshot_test
Aug 26, 2026
Merged

mergify[bot] merged 2 commits into
ceph:develfrom
gadididi:e2e/nvmeof_add_snapshot_test

Conversation

@gadididi

@gadididi gadididi commented Jul 30, 2026 •

Copy link
Copy Markdown
Contributor

Add snapshot test in nvmeof csi e2e test.

the test flow:

  1. Create a source PVC
  2. Create a snapshot of the source PVC
  3. Create a new PVC restored from the snapshot
  4. Delete the restored PVC
  5. Delete the snapshot
  6. Delete the source PVC

Closes: #6435

@mergify mergify Bot added component/nvme-of Issues and PRs related to NVMe-oF. component/testing Additional test cases or CI work labels Jul 30, 2026
@gadididi gadididi self-assigned this Jul 30, 2026
Comment thread e2e/nvmeof.go Outdated
@gadididi
gadididi force-pushed the e2e/nvmeof_add_snapshot_test branch from 98f27fe to 6520e42 Compare August 2, 2026 07:59
@gadididi
gadididi requested a review from nixpanic August 2, 2026 08:00
nixpanic
nixpanic previously approved these changes Aug 4, 2026
@nixpanic

nixpanic commented Aug 4, 2026

Copy link
Copy Markdown
Member

/test ci/centos/mini-e2e/k8s-1.37/nvmeof

@nixpanic
nixpanic requested a review from a team August 4, 2026 09:27
@gadididi

gadididi commented Aug 4, 2026

Copy link
Copy Markdown
Contributor Author

@nixpanic I see it failed on this test, I will take a look

@nixpanic

nixpanic commented Aug 5, 2026

Copy link
Copy Markdown
Member

@nixpanic I see it failed on this test, I will take a look

I do not see any CreateSnapshot requests in the logs. Maybe the csi-snapshotter sidecar is not part of the controller-plugin Pod?

Copilot AI lite review requested due to automatic review settings August 9, 2026 13:49
@gadididi
gadididi requested a review from a team as a code owner August 9, 2026 13:49
@gadididi

gadididi commented Aug 9, 2026

Copy link
Copy Markdown
Contributor Author

/test ci/centos/mini-e2e/k8s-1.37/nvmeof

@mergify
mergify Bot dismissed nixpanic’s stale review August 9, 2026 13:50

Pull request has been modified.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds NVMe-oF CSI end-to-end coverage for VolumeSnapshot create/restore workflows, and updates the NVMe-oF provisioner deployment to include the snapshotter sidecar required for snapshot operations.

Changes:

  • Add NVMe-oF VolumeSnapshotClass create/delete helpers for e2e.
  • Add a new NVMe-oF e2e test that creates a source PVC, snapshots it, restores a PVC from the snapshot, and validates backend cleanup.
  • Update the NVMe-oF provisioner Deployment to run csi-snapshotter.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

File Description
e2e/snapshot.go Adds NVMe-oF VolumeSnapshotClass creation/deletion helpers for e2e runs.
e2e/nvmeof.go Adds an NVMe-oF snapshot + restore-from-snapshot e2e test with backend validation.
deploy/nvmeof/kubernetes/csi-nvmeofplugin-provisioner.yaml Adds the csi-snapshotter sidecar to the NVMe-oF provisioner Deployment.
Suppressed comments (2)

e2e/nvmeof.go:546

  • If snapshot creation succeeds but a later step fails, the VolumeSnapshot can remain and impact later ordered specs. Consider adding a best-effort deferred cleanup immediately after successful snapshot creation.
			err = createSnapshot(&snap, deployTimeout)
			Expect(err).ShouldNot(HaveOccurred())

e2e/nvmeof.go:562

  • If the restored PVC is created successfully but a later step fails, it can leak into subsequent ordered specs. Add a best-effort deferred cleanup right after successful creation to keep the suite self-cleaning on failures.
			err = createPVCAndvalidatePV(f.ClientSet, restorePVC, deployTimeout)
			Expect(err).ShouldNot(HaveOccurred())

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread e2e/snapshot.go
Comment thread e2e/nvmeof.go
@gadididi
gadididi force-pushed the e2e/nvmeof_add_snapshot_test branch from 5683de4 to acf0a75 Compare August 11, 2026 07:16
@gadididi
gadididi requested a review from nixpanic August 11, 2026 07:16
@gadididi

Copy link
Copy Markdown
Contributor Author

@nixpanic , the last forced push because I rebased onto devel

Comment thread e2e/snapshot.go
@nixpanic
nixpanic requested a review from a team August 13, 2026 09:25
Madhu-1
Madhu-1 previously approved these changes Aug 13, 2026
@nixpanic

Copy link
Copy Markdown
Member

/queue

@nixpanic

Copy link
Copy Markdown
Member

Oh no, a merge conflict 😞

@mergify

mergify Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

This pull request now has conflicts with the target branch. Could you please resolve conflicts and force push the corrected changes? 🙏

@nixpanic
nixpanic force-pushed the e2e/nvmeof_add_snapshot_test branch from acf0a75 to 4ceb2cc Compare August 14, 2026 07:36
@ceph-csi-bot
ceph-csi-bot force-pushed the e2e/nvmeof_add_snapshot_test branch from cfa5bc7 to d535bfe Compare August 26, 2026 08:50
@nixpanic

Copy link
Copy Markdown
Member

/test ci/centos/mini-e2e/k8s-1.37/nvmeof

@nixpanic

Copy link
Copy Markdown
Member

The new test was run and passed:

nvmeof Test NVMe CSI Create snapshot and restore from snapshot
/go/src/github.com/ceph/ceph-csi/e2e/nvmeof.go:502
  STEP: Creating a kubernetes client @ 08/26/26 09:12:36.197
  I0826 09:12:36.197106   84092 util.go:414] >>> kubeConfig: /root/.kube/config
  STEP: Building a namespace api object, basename nvmeof @ 08/26/26 09:12:36.198
  STEP: Waiting for a default service account to be provisioned in namespace @ 08/26/26 09:12:36.206
  STEP: Waiting for kube-root-ca.crt to be provisioned in namespace @ 08/26/26 09:12:36.209
  STEP: Creating VolumeSnapshotClass @ 08/26/26 09:12:36.211
...

Once the other PRs are #6479 and #6478 are merged, this can be scheduled for automatic rebasing and testing by leaving the /queue comment.

@nixpanic

Copy link
Copy Markdown
Member

/queue

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

@Mergifyio rebase

@mergify

mergify Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

rebase

🛑 The pull request rule doesn't match anymore

Details

This action has been cancelled.

Test flow:
1. Create a source PVC
2. Create a snapshot of the source PVC
3. Create a new PVC restored from the snapshot
4. Delete the restored PVC
5. Delete the snapshot
6. Delete the source PVC

Signed-off-by: gadi-didi <[email protected]>
adding this for snapshot e2e test. the nvmeof csi
supports snapshot capability (it redirect the request
to his backend server - rbd csi)

Signed-off-by: gadi-didi <[email protected]>
@ceph-csi-bot
ceph-csi-bot force-pushed the e2e/nvmeof_add_snapshot_test branch from d535bfe to e94f7f6 Compare August 26, 2026 12:19
@ceph-csi-bot ceph-csi-bot added ok-to-test Label to trigger E2E tests and removed queued/rebase labels Aug 26, 2026
@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.34

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.34

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/upgrade-tests-cephfs

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.36

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/mini-e2e/k8s-1.34

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.35

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.36

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/upgrade-tests-rbd

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.35

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/mini-e2e/k8s-1.36

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/mini-e2e/k8s-1.35

@ceph-csi-bot ceph-csi-bot added ci/in-progress/e2e This label acts like a guard and prevents Mergify from adding the `ok-to-test` label again. and removed ok-to-test Label to trigger E2E tests labels Aug 26, 2026
@mergify mergify Bot removed the ci/in-progress/e2e This label acts like a guard and prevents Mergify from adding the `ok-to-test` label again. label Aug 26, 2026
@mergify

mergify Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Deprecation notice: This pull request comes from a fork and was queued with update_method=rebase and update_bot_account impersonation. This capability will be removed on July 1, 2026. After this date, the merge queue will no longer be able to rebase fork pull requests with this configuration. To avoid disruption, switch to update_method=merge in your queue rule.

@mergify

mergify Bot commented Aug 26, 2026 •

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • ✅ Entered queue — 2026-08-26 16:03 UTC · Rule: default · triggered by merge protections
  • ✅ Checks skipped · PR is already up-to-date
  • ✅ Merged — 2026-08-26 16:04 UTC · at e94f7f615c664453a59a84ed16b370311a27197e · rebase

This pull request spent 10 seconds in the queue, including 1 second running CI.

Required conditions to merge

@mergify
mergify Bot merged commit 415b565 into ceph:devel Aug 26, 2026
44 checks passed
@gadididi
gadididi deleted the e2e/nvmeof_add_snapshot_test branch August 26, 2026 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/nvme-of Issues and PRs related to NVMe-oF. component/testing Additional test cases or CI work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nvmeof: add e2e test for snapshot

5 participants