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

[WIP][Testing]Flatten group snapshot #4973

Draft
wants to merge 4 commits into
base: devel
Choose a base branch
from

Conversation

Rakshith-R
Copy link
Contributor

Describe what this PR does

Provide some context for the reviewer

Is there anything that requires special attention

Do you have any questions?

Is the change backward compatible?

Are there concerns around backward compatibility?

Provide any external context for the change, if any.

For example:

  • Kubernetes links that explain why the change is required
  • CSI spec related changes/catch-up that necessitates this patch
  • golang related practices that necessitates this change

Related issues

Mention any github issues relevant to this PR. Adding below line
will help to auto close the issue once the PR is merged.

Fixes: #issue_number

Future concerns

List items that are not part of the PR and do not impact it's
functionality, but are work items that can be taken up subsequently.

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

Signed-off-by: Rakshith R <[email protected]>
@Rakshith-R
Copy link
Contributor Author

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

@Rakshith-R Rakshith-R added WIP This PR still in work-in-progress ci/skip/multi-arch-build skip building on multiple architectures labels Nov 22, 2024
@Rakshith-R
Copy link
Contributor Author

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

@Rakshith-R
Copy link
Contributor Author

@Rakshith-R Rakshith-R force-pushed the flatten-group-snapshot branch 5 times, most recently from d22ce45 to 234ae0c Compare November 22, 2024 12:18
@Rakshith-R
Copy link
Contributor Author

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

@Rakshith-R
Copy link
Contributor Author

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

@Rakshith-R
Copy link
Contributor Author

E2E changes in this pr adds creation & deletion of additional volumegroupsnapshots.
helm e2e has low min[max]snapshotlimit 2 & 3.
This causes creation of even 5 additional volumegroupsnapshot since
snapshot name of such a snapshot is not the same as the cloned image.
Therefore, flatten logic fails to find such a cloned image to flatten.

I1122 15:23:40.732723 1 controllerserver.go:607] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad snapshots count 3 on image: replicapool/csi-vol-47f3b530-f56a-4448-83f5-21fa288d2191 reached configured soft limit 2
I1122 15:23:40.798206 1 rbd_util.go:864] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad rbd: adding task to flatten image "replicapool/.group.4_20e0c6470c9d_20e0d35cb849"
E1122 15:23:40.805758 1 rbd_util.go:880] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad failed to add task flatten for replicapool/.group.4_20e0c6470c9d_20e0d35cb849 : rados: ret=-2, No such file or directory: "[errno 2] RBD image not found (Image replicapool/.group.4_20e0c6470c9d_20e0d35cb849 does not exist)"

  I1122 15:23:40.399649       1 utils.go:266] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad GRPC call: /csi.v1.GroupController/CreateVolumeGroupSnapshot
  I1122 15:23:40.399730       1 utils.go:267] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad GRPC request: {"name":"groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad","parameters":{"clusterID":"28e82505-e50e-4f6a-985a-3cbebff30175","csi.storage.k8s.io/volumegroupsnapshot/name":"rbd-440-vgs-2","csi.storage.k8s.io/volumegroupsnapshot/namespace":"rbd-440","csi.storage.k8s.io/volumegroupsnapshotcontent/name":"groupsnapcontent-0161be0f-4e22-415b-86b1-2cc461097dad","pool":"replicapool"},"secrets":"***stripped***","source_volume_ids":["0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-d6750f44-22b1-48fc-95b7-844826ac7786","0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-034070d9-5d3c-40ac-ad88-f05f4cf1533c","0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-47f3b530-f56a-4448-83f5-21fa288d2191"]}
  I1122 15:23:40.416664       1 omap.go:89] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad got omap values: (pool="replicapool", namespace="", name="csi.volume.d6750f44-22b1-48fc-95b7-844826ac7786"): map[csi.imageid:20e05f3dce9c csi.imagename:csi-vol-d6750f44-22b1-48fc-95b7-844826ac7786 csi.volname:pvc-dcfe2c65-7ec8-4521-ac22-fa7b51edcc86 csi.volume.owner:rbd-440]
  I1122 15:23:40.431087       1 omap.go:89] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad got omap values: (pool="replicapool", namespace="", name="csi.volume.034070d9-5d3c-40ac-ad88-f05f4cf1533c"): map[csi.imageid:20e0d6bd720f csi.imagename:csi-vol-034070d9-5d3c-40ac-ad88-f05f4cf1533c csi.volname:pvc-0de4c55a-d93a-43bd-ac7f-0efd811d8ba1 csi.volume.owner:rbd-440]
  I1122 15:23:40.449701       1 omap.go:89] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad got omap values: (pool="replicapool", namespace="", name="csi.volume.47f3b530-f56a-4448-83f5-21fa288d2191"): map[csi.imageid:20e0f8e48bee csi.imagename:csi-vol-47f3b530-f56a-4448-83f5-21fa288d2191 csi.volname:pvc-3d33aaf6-9b85-4fa9-a662-a46910567eb9 csi.volume.owner:rbd-440]
  I1122 15:23:40.466265       1 group_controllerserver.go:113] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad all 3 Volumes for VolumeGroup "groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad" have been found
  I1122 15:23:40.467251       1 omap.go:89] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad got omap values: (pool="replicapool", namespace="", name="csi.groups.default"): map[]
  I1122 15:23:40.467268       1 manager.go:145] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad the journal does not contain a reservation for group "groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad" yet
  I1122 15:23:40.473385       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.groups.default"): map[csi.volume.group.groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad:3d319d05-5296-435d-b0df-6912a5ac76f6])
  I1122 15:23:40.476352       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.volume.group.3d319d05-5296-435d-b0df-6912a5ac76f6"): map[csi.creationtime:2024-11-22T15:23:40.47340155Z csi.groupname:csi-vol-group-3d319d05-5296-435d-b0df-6912a5ac76f6 csi.volname:groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad])
  I1122 15:23:40.476375       1 manager.go:153] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad got UUID "3d319d05-5296-435d-b0df-6912a5ac76f6" for group "groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad"
  I1122 15:23:40.476522       1 util.go:102] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad object for volume group "0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-3d319d05-5296-435d-b0df-6912a5ac76f6" has been initialized
  I1122 15:23:40.477167       1 omap.go:221] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad got omap values: (pool="replicapool", namespace="", name="csi.volume.group.3d319d05-5296-435d-b0df-6912a5ac76f6"): map[csi.creationtime:2024-11-22T15:23:40.47340155Z csi.groupname:csi-vol-group-3d319d05-5296-435d-b0df-6912a5ac76f6 csi.volname:groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad]
  I1122 15:23:40.477195       1 group_snapshot.go:108] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad GetVolumeGroupSnapshot(0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-3d319d05-5296-435d-b0df-6912a5ac76f6) returns {commonVolumeGroup:{id:0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-3d319d05-5296-435d-b0df-6912a5ac76f6 requestName:groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad name:csi-vol-group-3d319d05-5296-435d-b0df-6912a5ac76f6 creationTime:0xc000a62198 clusterID:28e82505-e50e-4f6a-985a-3cbebff30175 objectUUID:3d319d05-5296-435d-b0df-6912a5ac76f6 credentials:0xc000692a40 conn:<nil> ioctx:<nil> monitors:rook-ceph-mon-a.rook-ceph.svc.cluster.local:6789 pool:replicapool namespace: csiDriver:default journal:0xc000a54520} snapshots:[] snapshotsToFree:[]}
  I1122 15:23:40.477215       1 group_controllerserver.go:129] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad need to create new volume group snapshot, failed to get existing one with name "groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad": volume group snapshot "replicapool/csi-vol-group-3d319d05-5296-435d-b0df-6912a5ac76f6" is incomplete, it has no snapshots
  I1122 15:23:40.492155       1 controllerserver.go:607] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad snapshots count 3 on image: replicapool/csi-vol-d6750f44-22b1-48fc-95b7-844826ac7786 reached configured soft limit 2
  I1122 15:23:40.563050       1 rbd_util.go:864] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad rbd: adding task to flatten image "replicapool/.group.4_20e0c6470c9d_20e0d35cb849"
  E1122 15:23:40.571082       1 rbd_util.go:880] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad failed to add task flatten for replicapool/.group.4_20e0c6470c9d_20e0d35cb849 : rados: ret=-2, No such file or directory: "[errno 2] RBD image not found (Image replicapool/.group.4_20e0c6470c9d_20e0d35cb849 does not exist)"
  E1122 15:23:40.571112       1 rbd_util.go:828] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad failed to flatten replicapool/.group.4_20e0c6470c9d_20e0d35cb849; err rados: ret=-2, No such file or directory: "[errno 2] RBD image not found (Image replicapool/.group.4_20e0c6470c9d_20e0d35cb849 does not exist)"
  I1122 15:23:40.571120       1 rbd_util.go:864] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad rbd: adding task to flatten image "replicapool/.group.4_20e0f011195a_20e0aac19c38"
  E1122 15:23:40.579420       1 rbd_util.go:880] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad failed to add task flatten for replicapool/.group.4_20e0f011195a_20e0aac19c38 : rados: ret=-2, No such file or directory: "[errno 2] RBD image not found (Image replicapool/.group.4_20e0f011195a_20e0aac19c38 does not exist)"
  E1122 15:23:40.579441       1 rbd_util.go:828] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad failed to flatten replicapool/.group.4_20e0f011195a_20e0aac19c38; err rados: ret=-2, No such file or directory: "[errno 2] RBD image not found (Image replicapool/.group.4_20e0f011195a_20e0aac19c38 does not exist)"
  I1122 15:23:40.614821       1 controllerserver.go:607] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad snapshots count 3 on image: replicapool/csi-vol-034070d9-5d3c-40ac-ad88-f05f4cf1533c reached configured soft limit 2
  I1122 15:23:40.684930       1 rbd_util.go:864] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad rbd: adding task to flatten image "replicapool/.group.4_20e0c6470c9d_20e0d35cb849"
  E1122 15:23:40.692883       1 rbd_util.go:880] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad failed to add task flatten for replicapool/.group.4_20e0c6470c9d_20e0d35cb849 : rados: ret=-2, No such file or directory: "[errno 2] RBD image not found (Image replicapool/.group.4_20e0c6470c9d_20e0d35cb849 does not exist)"
  E1122 15:23:40.692911       1 rbd_util.go:828] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad failed to flatten replicapool/.group.4_20e0c6470c9d_20e0d35cb849; err rados: ret=-2, No such file or directory: "[errno 2] RBD image not found (Image replicapool/.group.4_20e0c6470c9d_20e0d35cb849 does not exist)"
  I1122 15:23:40.692931       1 rbd_util.go:864] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad rbd: adding task to flatten image "replicapool/.group.4_20e0f011195a_20e0aac19c38"
  E1122 15:23:40.700086       1 rbd_util.go:880] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad failed to add task flatten for replicapool/.group.4_20e0f011195a_20e0aac19c38 : rados: ret=-2, No such file or directory: "[errno 2] RBD image not found (Image replicapool/.group.4_20e0f011195a_20e0aac19c38 does not exist)"
  E1122 15:23:40.700120       1 rbd_util.go:828] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad failed to flatten replicapool/.group.4_20e0f011195a_20e0aac19c38; err rados: ret=-2, No such file or directory: "[errno 2] RBD image not found (Image replicapool/.group.4_20e0f011195a_20e0aac19c38 does not exist)"
  I1122 15:23:40.732723       1 controllerserver.go:607] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad snapshots count 3 on image: replicapool/csi-vol-47f3b530-f56a-4448-83f5-21fa288d2191 reached configured soft limit 2
  I1122 15:23:40.798206       1 rbd_util.go:864] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad rbd: adding task to flatten image "replicapool/.group.4_20e0c6470c9d_20e0d35cb849"
  E1122 15:23:40.805758       1 rbd_util.go:880] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad failed to add task flatten for replicapool/.group.4_20e0c6470c9d_20e0d35cb849 : rados: ret=-2, No such file or directory: "[errno 2] RBD image not found (Image replicapool/.group.4_20e0c6470c9d_20e0d35cb849 does not exist)"
  E1122 15:23:40.805806       1 rbd_util.go:828] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad failed to flatten replicapool/.group.4_20e0c6470c9d_20e0d35cb849; err rados: ret=-2, No such file or directory: "[errno 2] RBD image not found (Image replicapool/.group.4_20e0c6470c9d_20e0d35cb849 does not exist)"
  I1122 15:23:40.805815       1 rbd_util.go:864] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad rbd: adding task to flatten image "replicapool/.group.4_20e0f011195a_20e0aac19c38"
  E1122 15:23:40.815129       1 rbd_util.go:880] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad failed to add task flatten for replicapool/.group.4_20e0f011195a_20e0aac19c38 : rados: ret=-2, No such file or directory: "[errno 2] RBD image not found (Image replicapool/.group.4_20e0f011195a_20e0aac19c38 does not exist)"
  E1122 15:23:40.815158       1 rbd_util.go:828] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad failed to flatten replicapool/.group.4_20e0f011195a_20e0aac19c38; err rados: ret=-2, No such file or directory: "[errno 2] RBD image not found (Image replicapool/.group.4_20e0f011195a_20e0aac19c38 does not exist)"
  I1122 15:23:40.833364       1 omap.go:89] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad got omap values: (pool="replicapool", namespace="", name="csi.groups.default"): map[]
  I1122 15:23:40.833389       1 manager.go:273] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad the journal does not contain a reservation for a volume group with name "groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad-vg" yet
  I1122 15:23:40.840848       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.groups.default"): map[csi.volume.group.groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad-vg:48126353-ded5-4290-a9dd-05b49c176d94])
  I1122 15:23:40.843649       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.volume.group.48126353-ded5-4290-a9dd-05b49c176d94"): map[csi.creationtime:2024-11-22T15:23:40.840868746Z csi.groupname:csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94 csi.volname:groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad-vg])
  I1122 15:23:40.843814       1 util.go:102] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad object for volume group "0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-48126353-ded5-4290-a9dd-05b49c176d94" has been initialized
  I1122 15:23:40.845069       1 omap.go:221] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad got omap values: (pool="replicapool", namespace="", name="csi.volume.group.48126353-ded5-4290-a9dd-05b49c176d94"): map[csi.creationtime:2024-11-22T15:23:40.840868746Z csi.groupname:csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94 csi.volname:groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad-vg]
  I1122 15:23:40.845102       1 volume_group.go:110] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad GetVolumeGroup(0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-48126353-ded5-4290-a9dd-05b49c176d94) returns {commonVolumeGroup:{id:0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-48126353-ded5-4290-a9dd-05b49c176d94 requestName:groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad-vg name:csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94 creationTime:0xc000c04498 clusterID:28e82505-e50e-4f6a-985a-3cbebff30175 objectUUID:48126353-ded5-4290-a9dd-05b49c176d94 credentials:0xc000692a40 conn:<nil> ioctx:<nil> monitors:rook-ceph-mon-a.rook-ceph.svc.cluster.local:6789 pool:replicapool namespace: csiDriver:default journal:0xc000afee60} volumes:[] volumesToFree:[]}
  I1122 15:23:40.845162       1 util.go:225] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad connection established for volume group "0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-48126353-ded5-4290-a9dd-05b49c176d94"
  I1122 15:23:40.845172       1 util.go:276] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad iocontext created for volume group "0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-48126353-ded5-4290-a9dd-05b49c176d94" in pool "replicapool"
  I1122 15:23:40.851776       1 volume_group.go:178] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad volume group "replicapool/csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94" has been created
  I1122 15:23:40.851795       1 group_controllerserver.go:155] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad VolumeGroup "groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad-vg" has been created: replicapool/csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94
  I1122 15:23:40.879789       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.volume.group.48126353-ded5-4290-a9dd-05b49c176d94"): map[0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-d6750f44-22b1-48fc-95b7-844826ac7786:])
  I1122 15:23:40.909155       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.volume.group.48126353-ded5-4290-a9dd-05b49c176d94"): map[0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-034070d9-5d3c-40ac-ad88-f05f4cf1533c:])
  I1122 15:23:40.945462       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.volume.group.48126353-ded5-4290-a9dd-05b49c176d94"): map[0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-47f3b530-f56a-4448-83f5-21fa288d2191:])
  I1122 15:23:40.946814       1 omap.go:89] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad got omap values: (pool="replicapool", namespace="", name="csi.groups.default"): map[csi.volume.group.groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad:3d319d05-5296-435d-b0df-6912a5ac76f6]
  I1122 15:23:40.947674       1 omap.go:221] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad got omap values: (pool="replicapool", namespace="", name="csi.volume.group.3d319d05-5296-435d-b0df-6912a5ac76f6"): map[csi.creationtime:2024-11-22T15:23:40.47340155Z csi.groupname:csi-vol-group-3d319d05-5296-435d-b0df-6912a5ac76f6 csi.volname:groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad]
  I1122 15:23:40.947699       1 manager.go:153] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad got UUID "3d319d05-5296-435d-b0df-6912a5ac76f6" for group "groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad"
  I1122 15:23:40.947854       1 util.go:102] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad object for volume group "0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-3d319d05-5296-435d-b0df-6912a5ac76f6" has been initialized
  I1122 15:23:40.949175       1 omap.go:221] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad got omap values: (pool="replicapool", namespace="", name="csi.volume.group.3d319d05-5296-435d-b0df-6912a5ac76f6"): map[csi.creationtime:2024-11-22T15:23:40.47340155Z csi.groupname:csi-vol-group-3d319d05-5296-435d-b0df-6912a5ac76f6 csi.volname:groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad]
  I1122 15:23:40.949201       1 group_snapshot.go:108] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad GetVolumeGroupSnapshot(0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-3d319d05-5296-435d-b0df-6912a5ac76f6) returns {commonVolumeGroup:{id:0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-3d319d05-5296-435d-b0df-6912a5ac76f6 requestName:groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad name:csi-vol-group-3d319d05-5296-435d-b0df-6912a5ac76f6 creationTime:0xc000c04648 clusterID:28e82505-e50e-4f6a-985a-3cbebff30175 objectUUID:3d319d05-5296-435d-b0df-6912a5ac76f6 credentials:0xc000692a40 conn:<nil> ioctx:<nil> monitors:rook-ceph-mon-a.rook-ceph.svc.cluster.local:6789 pool:replicapool namespace: csiDriver:default journal:0xc000aff710} snapshots:[] snapshotsToFree:[]}
  I1122 15:23:40.949211       1 manager.go:450] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad found existing volume group snapshot "replicapool/csi-vol-group-3d319d05-5296-435d-b0df-6912a5ac76f6" for id "0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-3d319d05-5296-435d-b0df-6912a5ac76f6"
  I1122 15:23:41.686404       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.snaps.default"): map[csi.snap.csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94-snap-0:04bb9240-d641-47a1-af82-311f0530c8e0])
  I1122 15:23:41.689649       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.snap.04bb9240-d641-47a1-af82-311f0530c8e0"): map[csi.imagename:csi-snap-04bb9240-d641-47a1-af82-311f0530c8e0 csi.snapname:csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94-snap-0 csi.source:csi-vol-d6750f44-22b1-48fc-95b7-844826ac7786 csi.volume.owner:rbd-440])
  I1122 15:23:41.689679       1 rbd_journal.go:441] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad generated Volume ID (0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-04bb9240-d641-47a1-af82-311f0530c8e0) and image name (csi-snap-04bb9240-d641-47a1-af82-311f0530c8e0) for request name (csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94-snap-0)
  I1122 15:23:41.689695       1 rbd_util.go:1641] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad setting image options on replicapool/csi-vol-d6750f44-22b1-48fc-95b7-844826ac7786
  I1122 15:23:41.689708       1 snapshot.go:258] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad going to clone snapshot image "replicapool/csi-snap-04bb9240-d641-47a1-af82-311f0530c8e0@csi-snap-04bb9240-d641-47a1-af82-311f0530c8e0" from image "replicapool/csi-vol-d6750f44-22b1-48fc-95b7-844826ac7786" with snapshot ID 127
  I1122 15:23:42.708388       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.snap.04bb9240-d641-47a1-af82-311f0530c8e0"): map[csi.imageid:20e067e511e3])
  I1122 15:23:42.721130       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.snaps.default"): map[csi.snap.csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94-snap-1:b400bd18-094e-49e7-bc57-c8e0fc329163])
  I1122 15:23:42.723634       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.snap.b400bd18-094e-49e7-bc57-c8e0fc329163"): map[csi.imagename:csi-snap-b400bd18-094e-49e7-bc57-c8e0fc329163 csi.snapname:csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94-snap-1 csi.source:csi-vol-034070d9-5d3c-40ac-ad88-f05f4cf1533c csi.volume.owner:rbd-440])
  I1122 15:23:42.723657       1 rbd_journal.go:441] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad generated Volume ID (0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-b400bd18-094e-49e7-bc57-c8e0fc329163) and image name (csi-snap-b400bd18-094e-49e7-bc57-c8e0fc329163) for request name (csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94-snap-1)
  I1122 15:23:42.723692       1 rbd_util.go:1641] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad setting image options on replicapool/csi-vol-034070d9-5d3c-40ac-ad88-f05f4cf1533c
  I1122 15:23:42.723705       1 snapshot.go:258] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad going to clone snapshot image "replicapool/csi-snap-b400bd18-094e-49e7-bc57-c8e0fc329163@csi-snap-b400bd18-094e-49e7-bc57-c8e0fc329163" from image "replicapool/csi-vol-034070d9-5d3c-40ac-ad88-f05f4cf1533c" with snapshot ID 128
  I1122 15:23:43.715960       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.snap.b400bd18-094e-49e7-bc57-c8e0fc329163"): map[csi.imageid:20e0ff79fb0b])
  I1122 15:23:43.727045       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.snaps.default"): map[csi.snap.csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94-snap-2:9d261f5b-3a30-4194-a120-71d8a6c622cd])
  I1122 15:23:43.730552       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.snap.9d261f5b-3a30-4194-a120-71d8a6c622cd"): map[csi.imagename:csi-snap-9d261f5b-3a30-4194-a120-71d8a6c622cd csi.snapname:csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94-snap-2 csi.source:csi-vol-47f3b530-f56a-4448-83f5-21fa288d2191 csi.volume.owner:rbd-440])
  I1122 15:23:43.730576       1 rbd_journal.go:441] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad generated Volume ID (0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-9d261f5b-3a30-4194-a120-71d8a6c622cd) and image name (csi-snap-9d261f5b-3a30-4194-a120-71d8a6c622cd) for request name (csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94-snap-2)
  I1122 15:23:43.730605       1 rbd_util.go:1641] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad setting image options on replicapool/csi-vol-47f3b530-f56a-4448-83f5-21fa288d2191
  I1122 15:23:43.730634       1 snapshot.go:258] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad going to clone snapshot image "replicapool/csi-snap-9d261f5b-3a30-4194-a120-71d8a6c622cd@csi-snap-9d261f5b-3a30-4194-a120-71d8a6c622cd" from image "replicapool/csi-vol-47f3b530-f56a-4448-83f5-21fa288d2191" with snapshot ID 129
  I1122 15:23:44.742115       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.snap.9d261f5b-3a30-4194-a120-71d8a6c622cd"): map[csi.imageid:20e025a7c4e4])
  I1122 15:23:44.786169       1 manager.go:495] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad volume group snapshot "groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad" contains 3 snapshots: [replicapool/csi-snap-04bb9240-d641-47a1-af82-311f0530c8e0@csi-snap-04bb9240-d641-47a1-af82-311f0530c8e0 replicapool/csi-snap-b400bd18-094e-49e7-bc57-c8e0fc329163@csi-snap-b400bd18-094e-49e7-bc57-c8e0fc329163 replicapool/csi-snap-9d261f5b-3a30-4194-a120-71d8a6c622cd@csi-snap-9d261f5b-3a30-4194-a120-71d8a6c622cd]
  I1122 15:23:44.786316       1 util.go:102] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad object for volume group "0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-3d319d05-5296-435d-b0df-6912a5ac76f6" has been initialized
  I1122 15:23:44.787261       1 omap.go:221] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad got omap values: (pool="replicapool", namespace="", name="csi.volume.group.3d319d05-5296-435d-b0df-6912a5ac76f6"): map[csi.creationtime:2024-11-22T15:23:40.47340155Z csi.groupname:csi-vol-group-3d319d05-5296-435d-b0df-6912a5ac76f6 csi.volname:groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad]
  I1122 15:23:44.790673       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.snap.04bb9240-d641-47a1-af82-311f0530c8e0"): map[csi.groupid:0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-3d319d05-5296-435d-b0df-6912a5ac76f6])
  I1122 15:23:44.793362       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.snap.b400bd18-094e-49e7-bc57-c8e0fc329163"): map[csi.groupid:0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-3d319d05-5296-435d-b0df-6912a5ac76f6])
  I1122 15:23:44.796019       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.snap.9d261f5b-3a30-4194-a120-71d8a6c622cd"): map[csi.groupid:0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-3d319d05-5296-435d-b0df-6912a5ac76f6])
  I1122 15:23:44.799136       1 omap.go:159] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad set omap keys (pool="replicapool", namespace="", name="csi.volume.group.3d319d05-5296-435d-b0df-6912a5ac76f6"): map[0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-04bb9240-d641-47a1-af82-311f0530c8e0:csi-snap-04bb9240-d641-47a1-af82-311f0530c8e0 0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-9d261f5b-3a30-4194-a120-71d8a6c622cd:csi-snap-9d261f5b-3a30-4194-a120-71d8a6c622cd 0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-b400bd18-094e-49e7-bc57-c8e0fc329163:csi-snap-b400bd18-094e-49e7-bc57-c8e0fc329163])
  I1122 15:23:44.799164       1 manager.go:502] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad volume group snapshot "replicapool/csi-vol-group-3d319d05-5296-435d-b0df-6912a5ac76f6" has been created
  I1122 15:23:44.812476       1 omap.go:126] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad removed omap keys (pool="replicapool", namespace="", name="csi.volume.group.48126353-ded5-4290-a9dd-05b49c176d94"): [0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-d6750f44-22b1-48fc-95b7-844826ac7786]
  I1122 15:23:44.826209       1 omap.go:126] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad removed omap keys (pool="replicapool", namespace="", name="csi.volume.group.48126353-ded5-4290-a9dd-05b49c176d94"): [0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-034070d9-5d3c-40ac-ad88-f05f4cf1533c]
  I1122 15:23:44.840641       1 omap.go:126] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad removed omap keys (pool="replicapool", namespace="", name="csi.volume.group.48126353-ded5-4290-a9dd-05b49c176d94"): [0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-47f3b530-f56a-4448-83f5-21fa288d2191]
  I1122 15:23:44.840671       1 group_controllerserver.go:88] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad removing temporary volume group "replicapool/csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94"
  I1122 15:23:44.847434       1 volume_group.go:199] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad volume group "replicapool/csi-vol-group-48126353-ded5-4290-a9dd-05b49c176d94" has been removed
  I1122 15:23:44.854464       1 omap.go:126] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad removed omap keys (pool="replicapool", namespace="", name="csi.groups.default"): [csi.volume.group.0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-48126353-ded5-4290-a9dd-05b49c176d94]
  I1122 15:23:44.854626       1 utils.go:273] ID: 45 Req-ID: groupsnapshot-0161be0f-4e22-415b-86b1-2cc461097dad GRPC response: {"group_snapshot":{"creation_time":{"nanos":473401550,"seconds":1732289020},"group_snapshot_id":"0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-3d319d05-5296-435d-b0df-6912a5ac76f6","ready_to_use":true,"snapshots":[{"creation_time":{"nanos":856372830,"seconds":1732288987},"group_snapshot_id":"0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-3d319d05-5296-435d-b0df-6912a5ac76f6","ready_to_use":true,"size_bytes":1073741824,"snapshot_id":"0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-04bb9240-d641-47a1-af82-311f0530c8e0","source_volume_id":"0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-d6750f44-22b1-48fc-95b7-844826ac7786"},{"creation_time":{"nanos":880861876,"seconds":1732288989},"group_snapshot_id":"0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-3d319d05-5296-435d-b0df-6912a5ac76f6","ready_to_use":true,"size_bytes":1073741824,"snapshot_id":"0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-b400bd18-094e-49e7-bc57-c8e0fc329163","source_volume_id":"0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-034070d9-5d3c-40ac-ad88-f05f4cf1533c"},{"creation_time":{"nanos":897539906,"seconds":1732288991},"group_snapshot_id":"0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-3d319d05-5296-435d-b0df-6912a5ac76f6","ready_to_use":true,"size_bytes":1073741824,"snapshot_id":"0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-9d261f5b-3a30-4194-a120-71d8a6c622cd","source_volume_id":"0001-0024-28e82505-e50e-4f6a-985a-3cbebff30175-0000000000000004-47f3b530-f56a-4448-83f5-21fa288d2191"}]}}

e2e run: https://jenkins-ceph-csi.apps.ocp.cloud.ci.centos.org/blue/organizations/jenkins/mini-e2e-helm_k8s-1.31/detail/mini-e2e-helm_k8s-1.31/193/pipeline/

This commit consolidates flatten logic checks for cloneDepth
and snapshotLimit in PrepareVolumeForSnapshot. This allows
the function to be called for both CreateSnapshot and
CreateVolumeGroupSnapshot.
Clone Depth check and flattening of grand parent image
now occurs before creation of snapshot starts.
This aligns better with how PVC-PVC clone and
PVC-restore process occurs currently.
Flattening the grandparent image once prevents
flattening of every newly created snapshot.
Snapshot in above para refers to k8s VolumeSnapshot
(which is backed by a rbd image).

Signed-off-by: Rakshith R <[email protected]>
@Rakshith-R Rakshith-R force-pushed the flatten-group-snapshot branch 3 times, most recently from 4c35c58 to 8882254 Compare November 25, 2024 07:54
@Rakshith-R
Copy link
Contributor Author

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

@Rakshith-R
Copy link
Contributor Author

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

t
Signed-off-by: Rakshith R <[email protected]>
@Rakshith-R
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/skip/multi-arch-build skip building on multiple architectures WIP This PR still in work-in-progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant