Skip to content

rbd: use StorageClass image features for temp clones and snapshots#6205

Merged
mergify[bot] merged 2 commits into
ceph:develfrom
iPraveenParihar:rbd/temp-clone-image-features
Apr 1, 2026
Merged

rbd: use StorageClass image features for temp clones and snapshots#6205
mergify[bot] merged 2 commits into
ceph:develfrom
iPraveenParihar:rbd/temp-clone-image-features

Conversation

@iPraveenParihar

Copy link
Copy Markdown
Contributor

Describe what this PR does

Previously, temporary clone images (-temp) and snapshot backing images
had their features hard-coded to only layering and deep-flatten.

Inherit the image features from the parent volume (configured via
StorageClass imageFeatures) while ensuring layering and deep-flatten
are always enabled, as they are required for the flatten operation.

Fixes: #4936

Checklist:

  • Commit Message Formatting: Commit titles and messages follow. guidelines in the developer guide.
  • Reviewed the developer guide on Submitting a Pull Request
  • Pending release notes updated with breaking and/or notable changes for the next major release.
  • Documentation has been updated, if necessary.
  • Unit tests have been added, if necessary.
  • Integration tests have been added, if necessary.

Show available bot commands

These commands are normally not required, but in case of issues, leave any of
the following bot commands in an otherwise empty comment in this PR:

  • /retest ci/centos/<job-name>: retest the <job-name> after unrelated
    failure (please report the failure too!)

@mergify mergify Bot added the component/rbd Issues related to RBD label Mar 26, 2026
@iPraveenParihar iPraveenParihar force-pushed the rbd/temp-clone-image-features branch from 518136f to 95b5c6b Compare March 26, 2026 09:58
@iPraveenParihar iPraveenParihar marked this pull request as ready for review March 26, 2026 10:41
@iPraveenParihar

Copy link
Copy Markdown
Contributor Author

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

Rakshith-R
Rakshith-R previously approved these changes Mar 27, 2026
nixpanic
nixpanic previously approved these changes Mar 27, 2026

@nixpanic nixpanic left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM. Does it make sense to add an e2e test for this?

Would be useful to backport this as a bugfix to previous releases?

@iPraveenParihar

Copy link
Copy Markdown
Contributor Author

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

@mergify mergify Bot dismissed stale reviews from Rakshith-R and nixpanic March 27, 2026 11:14

Pull request has been modified.

@iPraveenParihar

Copy link
Copy Markdown
Contributor Author

LGTM. Does it make sense to add an e2e test for this?

Would be useful to backport this as a bugfix to previous releases?

Added e2e test.
Yes, definitely worth backporting. It's a safe, minimal change.

Comment thread e2e/rbd.go
err = validateImageFeatures(f, tempCloneImageName, defaultRBDPool, expectedFeatures)
if err != nil {
logAndFail("temp clone image %s features validation failed: %v",
tempCloneImageName, err)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

  [FAILED] temp clone image csi-vol-a6dbc189-e6d1-4120-8599-d2db25a8ff8c-temp features validation failed: failed to get rbd info: failed to execute command: command terminated with exit code 2

unfortunately this failed

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Errno 2: ENOENT: No such file or directory

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ahh, it should be

imageData, err := getImageInfoFromPVC(pvcSmartClone.Namespace, pvcSmartClone.Name, f)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

e2e passed now. PTAL
Thanks!

@iPraveenParihar iPraveenParihar force-pushed the rbd/temp-clone-image-features branch from 705735b to 552b36e Compare March 27, 2026 12:47
@iPraveenParihar

Copy link
Copy Markdown
Contributor Author

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

@iPraveenParihar

Copy link
Copy Markdown
Contributor Author

@Rakshith-R @nixpanic PTAL.

@nixpanic nixpanic requested a review from a team March 30, 2026 15:57
@iPraveenParihar

Copy link
Copy Markdown
Contributor Author

@Mergifyio rebase

@mergify

mergify Bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

rebase

✅ Branch has been successfully rebased

@ceph-csi-bot ceph-csi-bot force-pushed the rbd/temp-clone-image-features branch from 552b36e to b3d3c57 Compare March 31, 2026 09:53
@nixpanic

Copy link
Copy Markdown
Member

@Mergifyio rebase

@ceph-csi-bot ceph-csi-bot force-pushed the rbd/temp-clone-image-features branch from b3d3c57 to cfe2178 Compare March 31, 2026 11:09
@nixpanic nixpanic added the ok-to-test Label to trigger E2E tests label Mar 31, 2026
@mergify

mergify Bot commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

rebase

✅ Branch has been successfully rebased

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@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/upgrade-tests-rbd

@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/mini-e2e/k8s-1.35

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@mergify

mergify Bot commented Apr 1, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-04-01 12:01 UTC · Rule: default
  • Checks passed · in-place
  • Merged2026-04-01 15:19 UTC · at 70fd4d1be0ba931137989b90b8a6bcdfef601903

This pull request spent 3 hours 17 minutes 52 seconds in the queue, including 3 hours 17 minutes 21 seconds running CI.

Required conditions to merge

Previously, temporary clone images (-temp) and snapshot backing images
had their features hard-coded to only layering and deep-flatten.

Inherit the image features from the parent volume (configured via
StorageClass imageFeatures) while ensuring layering and deep-flatten
are always enabled, as they are required for the flatten operation.

Signed-off-by: Praveen M <m.praveen@ibm.com>
Add an e2e test that verifies the intermediate RBD images created
during snapshot and clone operations inherit StorageClass image
features. Specifically validates:
- csi-snap-* (snapshot backing image) inherits features from parent
- csi-vol-*-temp (temp clone image) inherits features from parent

Signed-off-by: Praveen M <m.praveen@ibm.com>
@ceph-csi-bot ceph-csi-bot force-pushed the rbd/temp-clone-image-features branch from 79f17ee to 70fd4d1 Compare April 1, 2026 12:02
@mergify mergify Bot added ci/in-progress/e2e This label acts like a guard and prevents Mergify from adding the `ok-to-test` label again. ok-to-test Label to trigger E2E tests queued labels Apr 1, 2026
@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.35

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@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/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-helm/k8s-1.34

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@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/mini-e2e/k8s-1.33

@ceph-csi-bot ceph-csi-bot removed the ok-to-test Label to trigger E2E tests label Apr 1, 2026
@mergify mergify Bot merged commit 0e81334 into ceph:devel Apr 1, 2026
44 checks passed
@mergify mergify Bot removed the queued label Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport-to-release-v3.16 ci/in-progress/e2e This label acts like a guard and prevents Mergify from adding the `ok-to-test` label again. component/rbd Issues related to RBD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enable object-map,exclusive-lock or use the storageClass imageFeatures for "-temp" cloned RBD volumes

4 participants