From f02552da50a7abcdd0e94756b85bdb9454ff906c Mon Sep 17 00:00:00 2001 From: Praveen M Date: Wed, 8 Jan 2025 16:21:08 +0530 Subject: [PATCH 1/2] rbd: rename groupNamePrefix to volumeGroupNamePrefix CephFS uses the parameter `volumeGroupNamePrefix` for creating VolumeGroups. This commit renames `groupNamePrefix` to `volumeGroupNamePrefix` for RBD VolumeGroup creation to ensure consistent naming. Signed-off-by: Praveen M (cherry picked from commit eebfd15e78a184a9abf9321a3d57d91a57ef2a36) --- internal/rbd/manager.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/rbd/manager.go b/internal/rbd/manager.go index 8b0d6a06448..ced7026fc02 100644 --- a/internal/rbd/manager.go +++ b/internal/rbd/manager.go @@ -346,8 +346,8 @@ func (mgr *rbdManager) GetVolumeGroupSnapshotByName( return nil, errors.New("required 'pool' option missing in volume group parameters") } - // groupNamePrefix is an optional parameter, can be an empty string - prefix := mgr.parameters["groupNamePrefix"] + // volumeGroupNamePrefix is an optional parameter, can be an empty string + prefix := mgr.parameters["volumeGroupNamePrefix"] clusterID, err := util.GetClusterID(mgr.parameters) if err != nil { @@ -409,8 +409,8 @@ func (mgr *rbdManager) CreateVolumeGroupSnapshot( return nil, err } - // groupNamePrefix is an optional parameter, can be an empty string - prefix := mgr.parameters["groupNamePrefix"] + // volumeGroupNamePrefix is an optional parameter, can be an empty string + prefix := mgr.parameters["volumeGroupNamePrefix"] clusterID, err := vg.GetClusterID(ctx) if err != nil { From 51989321b076c88880dc3171e4c6d00afefbcccd Mon Sep 17 00:00:00 2001 From: Praveen M Date: Wed, 8 Jan 2025 17:29:18 +0530 Subject: [PATCH 2/2] doc: update examples to use volumeGroupNamePrefix Signed-off-by: Praveen M (cherry picked from commit c2fff75610eabfbc688b4de86013ff92623f5927) --- examples/rbd/groupsnapshotclass.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/examples/rbd/groupsnapshotclass.yaml b/examples/rbd/groupsnapshotclass.yaml index 16f83db8d9a..d54d1c1b3c7 100644 --- a/examples/rbd/groupsnapshotclass.yaml +++ b/examples/rbd/groupsnapshotclass.yaml @@ -14,6 +14,10 @@ parameters: # eg: pool: rbdpool pool: + # (optional) Prefix to use for naming RBD groups. + # If omitted, defaults to "csi-vol-group-". + # volumeGroupNamePrefix: "foo-bar-" + csi.storage.k8s.io/group-snapshotter-secret-name: csi-rbd-secret csi.storage.k8s.io/group-snapshotter-secret-namespace: default deletionPolicy: Delete