Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes related to flatten operation in PVC restored from snapshot #4960

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

Rakshith-R
Copy link
Contributor

Describe what this PR does

  • rbd: remove checkFlatten() function

CephCSI should not flatten image that can be mounted
for use by the user.
checkFlatten() was called in a recovery code flow
of PVC restored from snapshot and was missed while
refractoring in #2900

refer: #2900

  • rbd: set depthToAvoidFlatten to 3 during PVC-PVC clone

During PVC-PVC clone creation, parent of the datasource
image is flattened after checking for clone depth.
We need to account for data source image as well since
we're calculating depth from the parent image.
depthToAvoidFlatten = 3(datasource image + temp + final clone)

Signed-off-by: Rakshith R rar@redhat.com

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!)

@Rakshith-R
Copy link
Contributor Author

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

@Rakshith-R Rakshith-R marked this pull request as ready for review November 14, 2024 11:33
@Rakshith-R Rakshith-R requested review from nixpanic, Madhu-1 and a team November 14, 2024 11:33
@nixpanic nixpanic requested a review from a team November 14, 2024 13:35
@nixpanic nixpanic added the component/rbd Issues related to RBD label Nov 14, 2024
@nixpanic
Copy link
Member

@Rakshith-R is this fixing known bugs, and should this therefor get backported?

@Rakshith-R
Copy link
Contributor Author

@Rakshith-R is this fixing known bugs, and should this therefor get backported?

No, there's no bugs/ issues raised.
The chances of hitting the first one is very rare while the second does not have a significant consequence.

@nixpanic
Copy link
Member

@Mergifyio queue

Copy link
Contributor

mergify bot commented Nov 19, 2024

queue

✅ The pull request has been merged automatically

The pull request has been merged automatically at d457840

CephCSI should not flatten image that can be mounted
for use by the user.
`checkFlatten()` was called in a recovery code flow
of PVC restored from snapshot and was missed while
refractoring in ceph#2900

refer: ceph#2900

Signed-off-by: Rakshith R <rar@redhat.com>
During PVC-PVC clone creation, parent of the datasource
image is flattened after checking for clone depth.
We need to account for data source image as well since
we're calculating depth from the parent image.
depthToAvoidFlatten = 3(datasource image + temp + final clone)

Signed-off-by: Rakshith R <rar@redhat.com>
@mergify mergify bot added the ok-to-test Label to trigger E2E tests label Nov 19, 2024
@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-cephfs

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-rbd

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot ceph-csi-bot removed the ok-to-test Label to trigger E2E tests label Nov 19, 2024
@mergify mergify bot merged commit d457840 into ceph:devel Nov 19, 2024
38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/rbd Issues related to RBD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants