Skip to content

restoreSize field not being set for the snapshots created for VolumeGroupSnapshot #1271

@yati1998

Description

@yati1998

The VolumeSnapshot and VolumeSnapshotContent that get created for VolumeGroupSnapshot do not have the "restoreSize" field in the status section

Note: manual-pvc-snapshot created manually.
snapshot-f2439c5900140e7bf4f5eda7d652a589cf6ae3f8893d057355dca060fc59fe37 created as a result of a VolumeGroupSnapshot


$ oc get volumesnapshot
NAME                                                                        READYTOUSE   SOURCEPVC    SOURCESNAPSHOTCONTENT   RESTORESIZE   SNAPSHOTCLASS                               SNAPSHOTCONTENT                                                                CREATIONTIME   AGE
manual-pvc-snapshot                                                         true         cephfs-pvc                           2Gi           ocs-storagecluster-cephfsplugin-snapclass   snapcontent-fe7bb6bb-745b-46c8-b9eb-fcba113b4e93                               20s            20s
snapshot-f2439c5900140e7bf4f5eda7d652a589cf6ae3f8893d057355dca060fc59fe37   true         cephfs-pvc                                                                                     snapcontent-f2439c5900140e7bf4f5eda7d652a589cf6ae3f8893d057355dca060fc59fe37   2m43s          2m48s


$ oc get volumesnapshot -o yaml
apiVersion: v1
items:
- apiVersion: snapshot.storage.k8s.io/v1
  kind: VolumeSnapshot
  metadata:
    annotations:
      snapshot.storage.kubernetes.io/pvc-access-modes: ReadWriteOnce
      snapshot.storage.kubernetes.io/pvc-storage-class: ocs-storagecluster-cephfs
      snapshot.storage.kubernetes.io/pvc-volume-mode: Filesystem
    creationTimestamp: "2025-02-10T11:53:02Z"
    finalizers:
    - snapshot.storage.kubernetes.io/volumesnapshot-as-source-protection
    - snapshot.storage.kubernetes.io/volumesnapshot-bound-protection
    generation: 1
    name: manual-pvc-snapshot
    namespace: test-cephfs
    resourceVersion: "175058"
    uid: fe7bb6bb-745b-46c8-b9eb-fcba113b4e93
  spec:
    source:
      persistentVolumeClaimName: cephfs-pvc
    volumeSnapshotClassName: ocs-storagecluster-cephfsplugin-snapclass
  status:
    boundVolumeSnapshotContentName: snapcontent-fe7bb6bb-745b-46c8-b9eb-fcba113b4e93
    creationTime: "2025-02-10T11:53:02Z"
    readyToUse: true
    restoreSize: 2Gi
- apiVersion: snapshot.storage.k8s.io/v1
  kind: VolumeSnapshot
  metadata:
    creationTimestamp: "2025-02-10T11:50:34Z"
    finalizers:
    - snapshot.storage.kubernetes.io/volumesnapshot-in-group-protection
    - snapshot.storage.kubernetes.io/volumesnapshot-as-source-protection
    generation: 1
    name: snapshot-f2439c5900140e7bf4f5eda7d652a589cf6ae3f8893d057355dca060fc59fe37
    namespace: test-cephfs
    ownerReferences:
    - apiVersion: groupsnapshot.storage.k8s.io/v1beta1
      kind: VolumeGroupSnapshot
      name: cephfs-groupsnapshot-1
      uid: c313dfa1-fb05-49dc-9e2c-83e2706b70bd
    resourceVersion: "173879"
    uid: bf409078-08bb-4aae-a135-e3381349ac76
  spec:
    source:
      persistentVolumeClaimName: cephfs-pvc
  status:
    boundVolumeSnapshotContentName: snapcontent-f2439c5900140e7bf4f5eda7d652a589cf6ae3f8893d057355dca060fc59fe37
    creationTime: "2025-02-10T11:50:39Z"
    readyToUse: true
    volumeGroupSnapshotName: cephfs-groupsnapshot-1
kind: List
metadata:
  resourceVersion: ""
$ oc get volumesnapshotcontent
NAME                                                                           READYTOUSE   RESTORESIZE   DELETIONPOLICY   DRIVER                                  VOLUMESNAPSHOTCLASS                         VOLUMESNAPSHOT                                                              VOLUMESNAPSHOTNAMESPACE   AGE
snapcontent-f2439c5900140e7bf4f5eda7d652a589cf6ae3f8893d057355dca060fc59fe37   true                       Delete           openshift-storage.cephfs.csi.ceph.com                                               snapshot-f2439c5900140e7bf4f5eda7d652a589cf6ae3f8893d057355dca060fc59fe37   test-cephfs               6m34s
snapcontent-fe7bb6bb-745b-46c8-b9eb-fcba113b4e93                               true         2147483648    Delete           openshift-storage.cephfs.csi.ceph.com   ocs-storagecluster-cephfsplugin-snapclass   manual-pvc-snapshot                                                         test-cephfs               4m6s

Steps to Reproduce:

  1. Create a PVC

  2. Create VolumeGroupSnapshot for the above PVC/s

  3. Check the VolumeSnapshot and VolumeSnapshotContent resources

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions