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

rbd: use correct radosNamespace (backport #5099) #5100

Merged
merged 1 commit into from
Jan 24, 2025

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jan 21, 2025

Describe what this PR does

Issue: When an RBD image is created in a non-default namespace, the OMAP data for the PersistentVolume fails to regenerate because it still attempts to locate the RBD image in the default namespace.

This commit ensures the correct radosNamespace is retrieved from the ceph-csi-config.

  • RBD image created in namespace namespace-a
I0121 09:52:54.042570       1 cluster_mapping.go:157] found new clusterID mapping "rook-ceph" for existing clusterID "rook-ceph"
I0121 09:52:54.045417       1 omap.go:89] got omap values: (pool="replicapool", namespace="", name="csi.volumes.default"): map[]
I0121 09:52:54.058290       1 omap.go:159] set omap keys (pool="replicapool", namespace="", name="csi.volumes.default"): map[csi.volume.pvc-3399dd51-26a1-42f6-8d04-f4d811f2fcf8:c19c8329-00ff-491f-bed3-463ba55b0878])
I0121 09:52:54.065726       1 omap.go:159] set omap keys (pool="replicapool", namespace="", name="csi.volume.c19c8329-00ff-491f-bed3-463ba55b0878"): map[csi.imagename:csi-vol-c19c8329-00ff-491f-bed3-463ba55b0878 csi.volname:pvc-3399dd51-26a1-42f6-8d04-f4d811f2fcf8 csi.volume.encryptKMS:metadata csi.volume.encryptionType: csi.volume.owner:rook-ceph])
I0121 09:52:54.065890       1 rbd_journal.go:699] re-generated Volume ID (0001-0009-rook-ceph-0000000000000006-c19c8329-00ff-491f-bed3-463ba55b0878) and image name (csi-vol-c19c8329-00ff-491f-bed3-463ba55b0878) for request name (pvc-3399dd51-26a1-42f6-8d04-f4d811f2fcf8)
E0121 09:52:54.071402       1 rbd_journal.go:715] failed to get image id replicapool/csi-vol-c19c8329-00ff-491f-bed3-463ba55b0878: Failed as image not found (internal RBD image not found: rbd: ret=-2, No such file or directory)
I0121 09:52:54.083157       1 omap.go:126] removed omap keys (pool="replicapool", namespace="", name="csi.volumes.default"): [csi.volume.pvc-3399dd51-26a1-42f6-8d04-f4d811f2fcf8]
E0121 09:52:54.083328       1 persistentvolume.go:196] failed to regenerate journal Failed as image not found (internal RBD image not found: rbd: ret=-2, No such file or directory)
  • After the change
I0121 09:56:21.493457       1 cluster_mapping.go:157] found new clusterID mapping "rook-ceph" for existing clusterID "rook-ceph"
I0121 09:56:21.550271       1 omap.go:89] got omap values: (pool="replicapool", namespace="namespace-a", name="csi.volumes.default"): map[]
I0121 09:56:21.566790       1 omap.go:159] set omap keys (pool="replicapool", namespace="namespace-a", name="csi.volumes.default"): map[csi.volume.pvc-3399dd51-26a1-42f6-8d04-f4d811f2fcf8:c19c8329-00ff-491f-bed3-463ba55b0878])
I0121 09:56:21.572828       1 omap.go:159] set omap keys (pool="replicapool", namespace="namespace-a", name="csi.volume.c19c8329-00ff-491f-bed3-463ba55b0878"): map[csi.imagename:csi-vol-c19c8329-00ff-491f-bed3-463ba55b0878 csi.volname:pvc-3399dd51-26a1-42f6-8d04-f4d811f2fcf8 csi.volume.encryptKMS:metadata csi.volume.encryptionType: csi.volume.owner:rook-ceph])
I0121 09:56:21.572987       1 rbd_journal.go:703] re-generated Volume ID (0001-0009-rook-ceph-0000000000000006-c19c8329-00ff-491f-bed3-463ba55b0878) and image name (csi-vol-c19c8329-00ff-491f-bed3-463ba55b0878) for request name (pvc-3399dd51-26a1-42f6-8d04-f4d811f2fcf8)
I0121 09:56:21.620512       1 omap.go:159] set omap keys (pool="replicapool", namespace="namespace-a", name="csi.volume.c19c8329-00ff-491f-bed3-463ba55b0878"): map[csi.imageid:3fc4d40012e0d])
I0121 09:56:21.620569       1 persistentvolume.go:201] volumeHandler changed from 0001-0009-rook-ceph-0000000000000002-c19c8329-00ff-491f-bed3-463ba55b0878 to 0001-0009-rook-ceph-0000000000000006-c19c8329-00ff-491f-bed3-463ba55b0878

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

This is an automatic backport of pull request #5099 done by [Mergify](https://mergify.com).

Issue: When an RBD image is created in a non-default namespace,
the OMAP data for the PersistentVolume fails to regenerate
because it still attempts to locate the RBD image in the default
namespace.

This commit ensures the correct radosNamespace is retrieved from
the ceph-csi-config.

Signed-off-by: Praveen M <[email protected]>
(cherry picked from commit 8a66575)
@mergify mergify bot added ok-to-test Label to trigger E2E tests component/rbd Issues related to RBD labels Jan 21, 2025
@nixpanic nixpanic requested a review from a team January 21, 2025 16:14
@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-cephfs

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/upgrade-tests-rbd

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.30

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.31

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.30

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.29

@ceph-csi-bot
Copy link
Collaborator

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

@ceph-csi-bot
Copy link
Collaborator

/test ci/centos/mini-e2e/k8s-1.29

@ceph-csi-bot ceph-csi-bot removed the ok-to-test Label to trigger E2E tests label Jan 21, 2025
@nixpanic
Copy link
Member

There is a maintenance in the CentOS infrastructure, so things are probably caused by that at the moment.

@nixpanic nixpanic added the ci/retry/e2e Label to retry e2e retesting on approved PR's label Jan 22, 2025
@iPraveenParihar
Copy link
Contributor

/retest ci/centos/upgrade-tests-cephfs

@iPraveenParihar
Copy link
Contributor

/retest ci/centos/mini-e2e/k8s-1.29

@iPraveenParihar
Copy link
Contributor

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

@iPraveenParihar
Copy link
Contributor

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

@iPraveenParihar
Copy link
Contributor

/retest ci/centos/k8s-e2e-external-storage/1.31

@iPraveenParihar
Copy link
Contributor

/retest ci/centos/k8s-e2e-external-storage/1.29

@mergify mergify bot merged commit fb0f164 into release-v3.13 Jan 24, 2025
44 checks passed
@mergify mergify bot deleted the mergify/bp/release-v3.13/pr-5099 branch January 24, 2025 06:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci/retry/e2e Label to retry e2e retesting on approved PR's component/rbd Issues related to RBD
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants