Bug 2120730 - [IBM Z] Restoring snapshot fails with size constraint when the parent pvc is expanded
Summary: [IBM Z] Restoring snapshot fails with size constraint when the parent pvc is ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat OpenShift Data Foundation
Classification: Red Hat Storage
Component: csi-driver
Version: 4.11
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ODF 4.12.0
Assignee: Madhu Rajanna
QA Contact: Yuli Persky
URL:
Whiteboard:
Depends On:
Blocks: 2094357 2120927
TreeView+ depends on / blocked
 
Reported: 2022-08-23 16:03 UTC by Sravika
Modified: 2023-08-09 16:37 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
Clone Of:
: 2120927 (view as bug list)
Environment:
Last Closed: 2023-02-08 14:06:28 UTC
Embargoed:


Attachments (Terms of Use)
Testlog (8.43 KB, text/plain)
2022-08-23 16:03 UTC, Sravika
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph-csi pull 3183 0 None Merged cephfs: remove extra check for restore size 2022-08-24 03:40:47 UTC

Description Sravika 2022-08-23 16:03:35 UTC
Created attachment 1907161 [details]
Testlog

Description of problem (please be detailed as possible and provide log
snippests):
Restoring snapshot fails with size constraint when the parent pvc is expanded.
The restore operation succeeds when the restore pvc is of the same size as the expanded parent pvc.

This test case is executed as part of ocs-ci tier2 test
tests/manage/pv_services/test_expansion_snapshot_clone.py::TestExpansionSnapshotClone::test_expansion_snapshot_clone[thin-thin] 

Version of all relevant components (if applicable):
ODF :  4.11.0-137

Does this issue impact your ability to continue to work with the product
(please explain in detail what is the user impact)?


Is there any workaround available to the best of your knowledge?


Rate from 1 - 5 the complexity of the scenario you performed that caused this
bug (1 - very simple, 5 - very complex)?


Can this issue reproducible?
Yes

Can this issue reproduce from the UI?


If this is a regression, please provide more details to justify this:


Steps to Reproduce:
1. Create a pvc of 2Gi, expand it to 4Gi
2. Create a volume snapshot of the 4Gi pvc
3. Verify that the snapshot "READY TO USE" state is "true"
4. Expand parent pvc to 6GiB
5. Restore snapshot to a pvc of 4Gi 


Actual results:
Restore of snapshot fails with the following error

Warning  ProvisioningFailed    2s (x7 over 34s)  openshift-storage.cephfs.csi.ceph.com_csi-cephfsplugin-provisioner-7
67f4b7584-zvxpr_62f81ad9-e73f-4fd3-b364-65ae3e858533  failed to provision volume with StorageClass "ocs-storagecluster-
cephfs": rpc error: code = InvalidArgument desc = cannot restore from snapshot 0001-0011-openshift-storage-000000000000
0001-2e74dff5-22f0-11ed-ab35-0a580a800214: volume size 6442450944 is smaller than source volume size 4294967296

Expected results:
Restore of snapshot should be successful

Additional info:

Must-gather-
https://drive.google.com/file/d/1YPQnacblJKwtY1jtE43b2Kf1qGxK7a0R/view?usp=sharing

Comment 3 Mudit Agarwal 2022-08-24 03:29:20 UTC
This is a regression caused by an upstream fix https://github.com/ceph/ceph-csi/pull/2788

I think we should not hold the release for this as it is not a general use case.
We can fix it in the next z-stream release.

Comment 8 Yuli Persky 2022-12-06 22:40:49 UTC
I've tested the scenario described in the BZ on a cluster with ODF : 4.12.0-0.nightly-2022-11-25-185455

The exact steps were: 

Steps to Reproduce:
1. Create a pvc of 2Gi, expand it to 4Gi
2. Create a volume snapshot of the 4Gi pvc
3. Verify that the snapshot "READY TO USE" state is "true"
4. Expand parent pvc to 6GiB
5. Restore snapshot to a pvc of 4Gi 

And it looks that all the steps were completed successfully. 

The above event refers to the restore action of PVC of size 4GB. 

Generated from openshift-storage.rbd.csi.ceph.com_csi-rbdplugin-provisioner-6f5c888c64-nj7kc_037e6ead-1cd9-41f6-84fa-70496a2ca623
Successfully provisioned volume pvc-7aaf4c00-1378-48c0-b715-27bcdc9884b3 

Is it possible that something else cause Restore action failure?

Comment 9 Yuli Persky 2022-12-16 22:52:34 UTC
Verified in ODF : 4.12.0-0.nightly-2022-11-25-185455 ( see comment#8) .


Note You need to log in before you can comment on or make changes to this bug.