Open iPraveenParihar opened 3 weeks ago
Initial test
configMap
{"clusterID":"rn","monitors":["10.96.180.5:6789"],"cephFS":{"radosNamespace":"rn","netNamespaceFilePath":"","subvolumeGroup":"","kernelMountOptions":"","fuseMountOptions":""},"rbd":{"netNamespaceFilePath":"","radosNamespace":""},"nfs":{"netNamespaceFilePath":""},"readAffinity":{"enabled":false,"crushLocationLabels": []},"namespace":""}
CephFS PVC created
pm@dhcp53-176:~$ k get pv pvc-983953db-919c-4f5d-a33e-9b59cdf80246 -o jsonpath='{.spec.csi.volumeAttributes.subvolumeName}' csi-vol-c0ef71cc-8daa-47a4-953e-277095874736
volume omap data in radosNamespace
rn
[root@c1 /]# rados ls -p myfs-metadata --namespace rn
csi.volume.c0ef71cc-8daa-47a4-953e-277095874736
csi.volumes.default
[root@c1 /]# rados listomapvals csi.volume.c0ef71cc-8daa-47a4-953e-277095874736 -p myfs-metadata --namespace rn
csi.imagename
value (44 bytes) :
00000000 63 73 69 2d 76 6f 6c 2d 63 30 65 66 37 31 63 63 |csi-vol-c0ef71cc|
00000010 2d 38 64 61 61 2d 34 37 61 34 2d 39 35 33 65 2d |-8daa-47a4-953e-|
00000020 32 37 37 30 39 35 38 37 34 37 33 36 |277095874736|
0000002c
csi.volname
value (40 bytes) :
00000000 70 76 63 2d 39 38 33 39 35 33 64 62 2d 39 31 39 |pvc-983953db-919|
00000010 63 2d 34 66 35 64 2d 61 33 33 65 2d 39 62 35 39 |c-4f5d-a33e-9b59|
00000020 63 64 66 38 30 32 34 36 |cdf80246|
00000028
csi.volume.owner
value (12 bytes) :
00000000 63 65 70 68 66 73 2d 72 61 64 6f 73 |cephfs-rados|
0000000c
[root@c1 /]# rados listomapvals csi.volumes.default -p myfs-metadata --namespace rn
csi.volume.pvc-983953db-919c-4f5d-a33e-9b59cdf80246
value (36 bytes) :
00000000 63 30 65 66 37 31 63 63 2d 38 64 61 61 2d 34 37 |c0ef71cc-8daa-47|
00000010 61 34 2d 39 35 33 65 2d 32 37 37 30 39 35 38 37 |a4-953e-27709587|
00000020 34 37 33 36 |4736|
00000024
[root@c1 /]#
CephFS snapshot created
pm@dhcp53-176:~$ k get vs cephfs-pvc-snap-rn -o jsonpath='{.status.boundVolumeSnapshotContentName}' snapcontent-0b4c4472-b33b-4c85-af43-76cdd0c34375
CephFS snapshot omap data
[root@c1 /]# rados ls -p myfs-metadata --namespace rn csi.snap.510ab77e-fbe9-4a51-ad0d-0644c4616678 csi.snaps.default csi.volume.c0ef71cc-8daa-47a4-953e-277095874736 csi.volumes.default [root@c1 /]# rados listomapvals csi.snap.510ab77e-fbe9-4a51-ad0d-0644c4616678 -p myfs-metadata --namespace rn csi.imagename value (45 bytes) : 00000000 63 73 69 2d 73 6e 61 70 2d 35 31 30 61 62 37 37 |csi-snap-510ab77| 00000010 65 2d 66 62 65 39 2d 34 61 35 31 2d 61 64 30 64 |e-fbe9-4a51-ad0d| 00000020 2d 30 36 34 34 63 34 36 31 36 36 37 38 |-0644c4616678| 0000002d
csi.snapname value (45 bytes) : 00000000 73 6e 61 70 73 68 6f 74 2d 30 62 34 63 34 34 37 |snapshot-0b4c447| 00000010 32 2d 62 33 33 62 2d 34 63 38 35 2d 61 66 34 33 |2-b33b-4c85-af43| 00000020 2d 37 36 63 64 64 30 63 33 34 33 37 35 |-76cdd0c34375| 0000002d
csi.source value (44 bytes) : 00000000 63 73 69 2d 76 6f 6c 2d 63 30 65 66 37 31 63 63 |csi-vol-c0ef71cc| 00000010 2d 38 64 61 61 2d 34 37 61 34 2d 39 35 33 65 2d |-8daa-47a4-953e-| 00000020 32 37 37 30 39 35 38 37 34 37 33 36 |277095874736| 0000002c
[root@c1 /]# rados listomapvals csi.snaps.default -p myfs-metadata --namespace rn csi.snap.snapshot-0b4c4472-b33b-4c85-af43-76cdd0c34375 value (36 bytes) : 00000000 35 31 30 61 62 37 37 65 2d 66 62 65 39 2d 34 61 |510ab77e-fbe9-4a| 00000010 35 31 2d 61 64 30 64 2d 30 36 34 34 63 34 36 31 |51-ad0d-0644c461| 00000020 36 36 37 38 |6678| 00000024 [root@c1 /]#
Describe what this PR does
This commit adds the support for storing the CephFS omap data in a namespace specified in the
ceph-csi-config
ConfigMap under cephFS.radosNamespace field.If the radosNamespace is not set, the default radosNamespace will be used i.e,
csi
.Related issues
Closes: #4599
Future concerns
Checklist:
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/