ceph-csi/internal/cephfs
Madhu Rajanna 27d0d3c0c5 cephfs: skip expand for BackingSnapshot volume
We should not call ExpandVolume for the BackingSnapshot
subvolume as there wont be any real subvolume created for
it and even if we call it the ExpandVolume will fail
fail as there is no real subvolume exists.

This commits fixes by adjusting the `if` check to ensure
that ExpandVolume will only be called either the
VolumeRequest is to create from a snapshot or volume
and BackingSnapshot is not true.

sample code here https://go.dev/play/p/PI2tNii5tTg

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit f7796081d3)
2022-12-21 14:15:17 +00:00
..
core cephfs: use errors.As instead of errors.Is 2022-10-17 11:41:18 +00:00
errors cleanup: move core functions to core pkg 2021-09-23 06:39:37 +00:00
mounter cephfs: added support for snapshot-backed volumes 2022-06-16 09:44:27 +00:00
store cephfs: snapshots honor --setmetadata option 2022-08-01 07:15:29 +00:00
util cephfs: fix staticcheck comment 2022-08-10 17:51:26 +00:00
controllerserver.go cephfs: skip expand for BackingSnapshot volume 2022-12-21 14:15:17 +00:00
driver.go cephfs: subvolumes honor --setmetadata option 2022-08-01 07:15:29 +00:00
fuserecovery.go cleanup: create k8s.io/mount-utils Mounter only once 2022-07-21 07:14:43 +00:00
identityserver.go ci: fix all linter errors found in golangci-lint 2022-06-03 12:55:54 +00:00
nodeserver.go cephfs: subvolumes honor --setmetadata option 2022-08-01 07:15:29 +00:00
validator.go cephfs: correct comment for validateExpandVolumeRequest 2021-09-07 14:33:02 +00:00