Skip to content

rbd: update PV metadata#6059

Merged
mergify[bot] merged 1 commit into
ceph:develfrom
iPraveenParihar:rbd/update-pv-metadata
Feb 16, 2026
Merged

rbd: update PV metadata#6059
mergify[bot] merged 1 commit into
ceph:develfrom
iPraveenParihar:rbd/update-pv-metadata

Conversation

@iPraveenParihar

Copy link
Copy Markdown
Contributor

Describe what this PR does

When regenerating journal pass the requestName
parameter to PrepareVolumeMetadata instead of
an empty string.

Am not sure why we didn't set the PV metadata during RegenerateJournal. I tried to find from git blame and PR which introduced it but couldn't find any conversation around it. May be we missed noticing it?

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!)
[pm@dhcp53-115 cephfs]$ k get pvc
NAME                STATUS   VOLUME                                     CAPACITY   ACCESS MODES   STORAGECLASS      VOLUMEATTRIBUTESCLASS   AGE
raw-block-rbd-pvc   Bound    pvc-cd9e6b0d-a846-4b4a-91fd-734a13231527   1Gi        RWO            rook-ceph-block   <unset>                 20d

[pm@dhcp53-115 cephfs]$ k exec -it rook-direct-mount-5f695b75d8-5mzwg -- bash
[root@c1 /]# rbd image-meta ls replicapool/csi-vol-e9aa241a-8416-497d-a808-2ff7488de04a
There are 4 metadata on this image:

Key                               Value
csi.ceph.com/cluster/name         my-cluster
csi.storage.k8s.io/pv/name        pvc-cd9e6b0d-a846-4b4a-91fd-734a13231527
csi.storage.k8s.io/pvc/name       raw-block-rbd-pvc
csi.storage.k8s.io/pvc/namespace  rook-ceph

########### Remove Metadata ###########

[root@c1 /]# rbd image-meta rm replicapool/csi-vol-e9aa241a-8416-497d-a808-2ff7488de04a csi.storage.k8s.io/pv/name
[root@c1 /]# rbd image-meta rm replicapool/csi-vol-e9aa241a-8416-497d-a808-2ff7488de04a csi.storage.k8s.io/pvc/name
[root@c1 /]# rbd image-meta rm replicapool/csi-vol-e9aa241a-8416-497d-a808-2ff7488de04a csi.storage.k8s.io/pvc/namespace
[root@c1 /]# rbd image-meta ls replicapool/csi-vol-e9aa241a-8416-497d-a808-2ff7488de04a
There is 1 metadatum on this image:

Key                        Value
csi.ceph.com/cluster/name  my-cluster
[root@c1 /]#

########### Restart the RBD controller plugin pod ###########

I0213 09:25:20.870308       1 controller.go:460] "Reconciling" controller="persistentvolume-controller" namespace="" name="pvc-cd9e6b0d-a846-4b4a-91fd-734a13231527" reconcileID="1ab42231-c294-4089-8129-e204e9a55eb6"
I0213 09:25:20.945133       1 omap.go:89] got omap values: (pool="replicapool", namespace="", name="csi.volumes.default"): map[csi.volume.pvc-cd9e6b0d-a846-4b4a-91fd-734a13231527:e9aa241a-8416-497d-a808-2ff7488de04a]
I0213 09:25:20.947276       1 omap.go:89] got omap values: (pool="replicapool", namespace="", name="csi.volume.e9aa241a-8416-497d-a808-2ff7488de04a"): map[csi.imageid:e8ec82165fb0 csi.imagename:csi-vol-e9aa241a-8416-497d-a808-2ff7488de04a csi.volname:pvc-cd9e6b0d-a846-4b4a-91fd-734a13231527 csi.volume.owner:rook-ceph]
I0213 09:25:21.076891       1 controller.go:489] "Reconcile successful" controller="persistentvolume-controller" namespace="" name="pvc-cd9e6b0d-a846-4b4a-91fd-734a13231527" reconcileID="1ab42231-c294-4089-8129-e204e9a55eb6


########### Check image Metadata ###########

[pm@dhcp53-115 cephfs]$ k exec -it rook-direct-mount-5f695b75d8-5mzwg -- bash
[root@c1 /]# rbd image-meta ls replicapool/csi-vol-e9aa241a-8416-497d-a808-2ff7488de04a
There are 3 metadata on this image:

Key                               Value
csi.ceph.com/cluster/name         my-cluster
csi.storage.k8s.io/pvc/name       raw-block-rbd-pvc
csi.storage.k8s.io/pvc/namespace  rook-ceph


^^^ pv/name metadata is missing ^^^

########### With this PR fix ###########

[root@c1 /]# rbd image-meta ls replicapool/csi-vol-e9aa241a-8416-497d-a808-2ff7488de04a
There are 4 metadata on this image:

Key                               Value
csi.ceph.com/cluster/name         my-cluster
csi.storage.k8s.io/pv/name        pvc-cd9e6b0d-a846-4b4a-91fd-734a13231527
csi.storage.k8s.io/pvc/name       raw-block-rbd-pvc
csi.storage.k8s.io/pvc/namespace  rook-ceph

When regenerating journal pass the requestName
parameter to PrepareVolumeMetadata instead of
an empty string.

Signed-off-by: Praveen M <m.praveen@ibm.com>
@mergify mergify Bot added the component/rbd Issues related to RBD label Feb 13, 2026
@nixpanic

Copy link
Copy Markdown
Member

I am not sure the PV has the same name on both clusters. Maybe the empty name is intentional (which would definitely deserve a comment in the code).

@Madhu-1

Madhu-1 commented Feb 16, 2026

Copy link
Copy Markdown
Collaborator

I am not sure the PV has the same name on both clusters. Maybe the empty name is intentional (which would definitely deserve a comment in the code).

It was a miss when we added support for it.

@nixpanic

Copy link
Copy Markdown
Member

@Mergifyio queue

@mergify

mergify Bot commented Feb 16, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

Rule: default


This pull request spent 2 hours 46 minutes 32 seconds in the queue, including 2 hours 46 minutes 17 seconds running CI.

Required conditions to merge
  • #approved-reviews-by >= 2 [🛡 GitHub branch protection]
  • #changes-requested-reviews-by = 0 [🛡 GitHub branch protection]
  • any of:
    • all of:
      • base=devel
      • status-success=codespell
      • status-success=go-test
      • status-success=golangci-lint
      • status-success=lint-extras
      • status-success=mod-check
      • status-success=multi-arch-build
      • status-success=uncommitted-code-check
      • any of:
        • all of:
          • status-success=ci/centos/k8s-e2e-external-storage/1.33
          • status-success=ci/centos/k8s-e2e-external-storage/1.34
          • status-success=ci/centos/k8s-e2e-external-storage/1.35
          • status-success=ci/centos/mini-e2e-helm/k8s-1.33
          • status-success=ci/centos/mini-e2e-helm/k8s-1.34
          • status-success=ci/centos/mini-e2e-helm/k8s-1.35
          • status-success=ci/centos/mini-e2e/k8s-1.33
          • status-success=ci/centos/mini-e2e/k8s-1.34
          • status-success=ci/centos/mini-e2e/k8s-1.35
          • status-success=ci/centos/upgrade-tests-cephfs
          • status-success=ci/centos/upgrade-tests-rbd
        • label=ci/skip/e2e
    • all of:
      • base~=^(release-.+)$
      • any of:
        • label=ci/skip/e2e
        • all of:
          • status-success=ci/centos/k8s-e2e-external-storage/1.32
          • status-success=ci/centos/mini-e2e-helm/k8s-1.32
          • status-success=ci/centos/mini-e2e/k8s-1.32
          • status-success=ci/centos/k8s-e2e-external-storage/1.33
          • status-success=ci/centos/k8s-e2e-external-storage/1.34
          • status-success=ci/centos/mini-e2e-helm/k8s-1.33
          • status-success=ci/centos/mini-e2e-helm/k8s-1.34
          • status-success=ci/centos/mini-e2e/k8s-1.33
          • status-success=ci/centos/mini-e2e/k8s-1.34
          • status-success=ci/centos/upgrade-tests-cephfs
          • status-success=ci/centos/upgrade-tests-rbd
      • status-success=codespell
      • status-success=go-test
      • status-success=golangci-lint
      • status-success=lint-extras
      • status-success=mod-check
      • status-success=multi-arch-build
      • status-success=uncommitted-code-check
    • all of:
      • base=release-v3.15
      • any of:
        • label=ci/skip/e2e
        • all of:
          • status-success=ci/centos/k8s-e2e-external-storage/1.31
          • status-success=ci/centos/k8s-e2e-external-storage/1.32
          • status-success=ci/centos/mini-e2e-helm/k8s-1.31
          • status-success=ci/centos/mini-e2e-helm/k8s-1.32
          • status-success=ci/centos/mini-e2e/k8s-1.31
          • status-success=ci/centos/mini-e2e/k8s-1.32
          • status-success=ci/centos/k8s-e2e-external-storage/1.33
          • status-success=ci/centos/mini-e2e-helm/k8s-1.33
          • status-success=ci/centos/mini-e2e/k8s-1.33
          • status-success=ci/centos/upgrade-tests-cephfs
          • status-success=ci/centos/upgrade-tests-rbd
      • status-success=codespell
      • status-success=go-test
      • status-success=golangci-lint
      • status-success=lint-extras
      • status-success=mod-check
      • status-success=multi-arch-build
      • status-success=uncommitted-code-check
    • all of:
      • base=ci/centos
      • status-success=ci/centos/jjb-validate
      • status-success=ci/centos/job-validation

@mergify mergify Bot added the queued label Feb 16, 2026
mergify Bot added a commit that referenced this pull request Feb 16, 2026
@mergify mergify Bot merged commit 4eec16a into ceph:devel Feb 16, 2026
21 checks passed
@mergify mergify Bot removed the queued label Feb 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/rbd Issues related to RBD

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants