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

Open
wants to merge 2 commits into
base: devel
Choose a base branch
from

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 [email protected]

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

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 <[email protected]>
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 <[email protected]>
@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.

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.

2 participants