Skip to content

rbd: return InvalidArgument for unrecognized QoS - #6457

Open
Madhu-1 wants to merge 2 commits into
ceph:develfrom
Madhu-1:6443
Open

rbd: return InvalidArgument for unrecognized QoS#6457
Madhu-1 wants to merge 2 commits into
ceph:develfrom
Madhu-1:6443

Conversation

@Madhu-1

@Madhu-1 Madhu-1 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator

Unrecognized or invalid QoS parameters in mutable volume attributes are a client input error, not an internal
server error. Wrap these errors with ErrInvalidArgument so callers return codes.InvalidArgument instead of codes.Internal.

Allow unsetting the Qos by setting the values as max

@mergify mergify Bot added the component/rbd Issues related to RBD label Aug 5, 2026
@Madhu-1
Madhu-1 requested review from a team August 5, 2026 05:51

@iPraveenParihar iPraveenParihar left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Madhu-1, Have you tested if when the VAC is deleted or removed from a PVC, the QoS settings are cleared?

Comment thread internal/rbd/controllerserver.go
Comment thread internal/rbd/controllerserver.go
@Madhu-1

Madhu-1 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

@Madhu-1, Have you tested if when the VAC is deleted or removed from a PVC, the QoS settings are cleared?

This can never happened, only VAC can be changed from the PVC and VAC cannot be deleted if its attached to a PVC, what we have is safe check where it never happens in kubernetes. kept it to be on safer side for other CO

@Madhu-1
Madhu-1 requested a review from iPraveenParihar August 5, 2026 09:19
Rakshith-R
Rakshith-R previously approved these changes Aug 5, 2026
iPraveenParihar
iPraveenParihar previously approved these changes Aug 5, 2026
@Madhu-1

Madhu-1 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

/queue

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

@Mergifyio rebase

@mergify

mergify Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

rebase

🛑 The pull request rule doesn't match anymore

Details

This action has been cancelled.

@ceph-csi-bot ceph-csi-bot added ok-to-test Label to trigger E2E tests and removed queued/rebase labels Aug 5, 2026
@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/upgrade-tests-cephfs

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/upgrade-tests-rbd

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

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

@ceph-csi-bot ceph-csi-bot added the ci/in-progress/e2e This label acts like a guard and prevents Mergify from adding the `ok-to-test` label again. label Aug 5, 2026
@ceph-csi-bot ceph-csi-bot removed the ok-to-test Label to trigger E2E tests label Aug 5, 2026
@mergify mergify Bot removed the ci/in-progress/e2e This label acts like a guard and prevents Mergify from adding the `ok-to-test` label again. label Aug 5, 2026
@iPraveenParihar

Copy link
Copy Markdown
Contributor
nvmeof Test NVMe CSI [It] create a PVC with VAC containing allowHostNQNs, apply new VAC then delete the PVC

/go/src/github.com/ceph/ceph-csi/e2e/nvmeof.go:316

  [FAILED] Unexpected error:
      <*fmt.wrapError | 0x550ffd42da0>: 
      failed to get pvc: client rate limiter Wait returned an error: context deadline exceeded
      {
          msg: "failed to get pvc: client rate limiter Wait returned an error: context deadline exceeded",
          err: <*fmt.wrapError | 0x550ffd42d80>{
              msg: "client rate limiter Wait returned an error: context deadline exceeded",
              err: <context.deadlineExceededError>{},
          },
      }
  occurred
  In [It] at: /go/src/github.com/ceph/ceph-csi/e2e/nvmeof.go:395 @ 08/05/26 11:21:49.653

------------------------------

SS

@Madhu-1

Madhu-1 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

@nixpanic reusing the RBD functions like CreateVolume can cause problem for nvme, we need to separate it out as checks are unique for RBD and nvme will never pass through or we need to unset parameters specific to nvme before calling RBD functions

@nixpanic

nixpanic commented Aug 5, 2026

Copy link
Copy Markdown
Member

I guess there is something in the NVMe-oF Controller that calls ControllerModifyVolume on the RBD Controller 🤔

All failed CI jobs (3 currently, all other e2e still running), failed with this:

nvmeof Test NVMe CSI [It] create a PVC with VAC containing allowHostNQNs, apply new VAC then delete the PVC

/cc @gadididi

Unrecognized or invalid QoS parameters in
mutable volume attributes
are a client input error, not an internal
server error. Wrap these errors with
ErrInvalidArgument so callers return
codes.InvalidArgument instead of
codes.Internal.

Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
@Madhu-1

Madhu-1 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

I guess there is something in the NVMe-oF Controller that calls ControllerModifyVolume on the RBD Controller 🤔

All failed CI jobs (3 currently, all other e2e still running), failed with this:

nvmeof Test NVMe CSI [It] create a PVC with VAC containing allowHostNQNs, apply new VAC then delete the PVC

/cc @gadididi

it because we are calling rbd createVolume from vnme CreateVolume. added a 2nd commit to strip nvme specific mutable parameters

@mergify
mergify Bot dismissed stale reviews from iPraveenParihar and Rakshith-R August 5, 2026 12:28

Pull request has been modified.

@Madhu-1

Madhu-1 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

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

@Madhu-1

Madhu-1 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

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

Comment thread internal/nvmeof/controller/controllerserver_test.go Outdated
@Madhu-1

Madhu-1 commented Aug 5, 2026

Copy link
Copy Markdown
Collaborator Author

@Madhu-1
Madhu-1 requested a review from gadididi August 5, 2026 12:54
Comment thread internal/nvmeof/controller/controllerserver.go Outdated
@Madhu-1

Madhu-1 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator Author

Added one more commit to allow unsetting the Qos

@Madhu-1
Madhu-1 requested a review from nixpanic August 6, 2026 05:39
Comment thread internal/rbd/cgroup_qos.go Outdated
Comment thread internal/rbd/cgroup_qos.go Outdated
Accept "max" to reset QoS limits to
unlimited and "0" to fully
throttle I/O. This enables users to
revert QoS configurations
applied by a VolumeAttributesClass
by creating a VAC with all
values set to "max".

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
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.

[RBD] Unrecognized VolumeAttributesClass parameter names silently clear all cgroup QoS metadata

7 participants