rbd: add mounter type validation for ControllerModifyVolume#6229
Conversation
|
/test ci/centos/mini-e2e/k8s-1.35/rbd |
1 similar comment
|
/test ci/centos/mini-e2e/k8s-1.35/rbd |
|
/test ci/centos/mini-e2e/k8s-1.34/rbd |
|
@Mergifyio rebase |
Add infrastructure to track and check the mounter type of RBD volumes: - Add mounterKey constant to store mounter type in image metadata - Save mounter type in setAllMetadata() when creating volumes - Remove mounter type in unsetAllMetadata() for cleanup - Add ErrMounterUnknown error for volumes without mounter metadata - Add UsesNBDMounter() method that lazily fetches the mounter type from metadata when needed and caches it The UsesNBDMounter() method returns ErrMounterUnknown when no mounter metadata exists, allowing detection of volumes created before mounter tracking was added. This is needed for issue ceph#6186 where QoS modifications should only be allowed on volumes using the rbd-nbd mounter. Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Niels de Vos <ndevos@ibm.com>
QoS parameters only work with the rbd-nbd mounter. Validate that volumes being modified via ControllerModifyVolume use rbd-nbd by calling UsesNBDMounter(). Handle different cases with a switch statement: - ErrMounterUnknown: Log warning and continue (volumes created before mounter tracking - QoS may or may not work) - Other errors: Return Internal error (metadata fetch failed) - Known non-rbd-nbd mounter: Return InvalidArgument (QoS won't work) This allows modification of existing volumes while still protecting against attempting QoS modifications on volumes that are known to use incompatible mounters. Fixes: ceph#6186 Assisted-by: Claude Code <noreply@anthropic.com> Signed-off-by: Niels de Vos <ndevos@ibm.com>
Signed-off-by: Niels de Vos <ndevos@ibm.com>
|
Deprecation notice: This pull request comes from a fork and was rebased using |
✅ Branch has been successfully rebased |
b1c92ef to
08c898f
Compare
|
/test ci/centos/upgrade-tests-cephfs |
|
/test ci/centos/k8s-e2e-external-storage/1.35 |
|
/test ci/centos/upgrade-tests-rbd |
|
/test ci/centos/k8s-e2e-external-storage/1.34 |
|
/test ci/centos/mini-e2e-helm/k8s-1.35 |
|
/test ci/centos/k8s-e2e-external-storage/1.33 |
|
/test ci/centos/mini-e2e-helm/k8s-1.34 |
|
/test ci/centos/mini-e2e/k8s-1.35 |
|
/test ci/centos/mini-e2e/k8s-1.34 |
|
/test ci/centos/mini-e2e-helm/k8s-1.33 |
|
/test ci/centos/mini-e2e/k8s-1.33 |
|
Deprecation notice: This pull request comes from a fork and was queued with |
Merge Queue Status
This pull request spent 9 seconds in the queue, including 1 second running CI. Required conditions to merge
|
RBD QoS parameters are only supported with the rbd-nbd mounter, but
ControllerModifyVolume previously had no way to enforce this.
This adds infrastructure to track the mounter type of RBD volumes via image
metadata (mounterKey), stored at volume creation and cleaned up on deletion. A
new UsesNBDMounter() method fetches and caches this value lazily.
ControllerModifyVolume now validates the mounter type before applying QoS
changes:
and proceed
Fixes: #6186