Skip to content

fix: use auth_client_required instead of removed auth_supported for RBD - #13991

Open
waterWang wants to merge 1 commit into
apache:mainfrom
waterWang:fix-kvm-rbd-auth-client-required
Open

fix: use auth_client_required instead of removed auth_supported for RBD#13991
waterWang wants to merge 1 commit into
apache:mainfrom
waterWang:fix-kvm-rbd-auth-client-required

Conversation

@waterWang

Copy link
Copy Markdown

Fixes #13989

Problem

CloudStack builds its RBD connection strings with the legacy Ceph option auth_supported=cephx (or auth_supported=none when no auth user is configured). This option was removed in Ceph Tentacle 20.2.4. As a result, every RBD operation performed by the KVM agent through librados fails:

agent.err: libvirt: Storage Driver error : internal error: failed to set RADOS option: auth_supported
agent.log: Failed to create RBD storage pool: org.libvirt.LibvirtException

Root cause

KVMPhysicalDisk.RBDStringBuilder emits auth_supported in the RBD URI string passed to qemu/librados. Modern librados no longer accepts this option name.

Fix

Replace auth_supported with auth_client_required (values cephx/none) — the modern option used by the qemu rbd driver (block/rbd.c calls rados_conf_set(cluster, "auth_client_required", ...)) and accepted by current Ceph releases. The qemu RbdAuthMode enum only supports cephx and none, matching the existing branches.

Changes

  • plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDisk.java: emit auth_client_required=cephx / auth_client_required=none
  • plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDiskTest.java: update 3 assertions to expect auth_client_required=cephx

Ceph Tentacle 20.2.4 removed the legacy `auth_supported` librados option.
CloudStack builds RBD connection strings with `auth_supported=cephx`/`none`,
so every RBD operation through the KVM agent fails with
"failed to set RADOS option: auth_supported".

Switch the RBD string builder to `auth_client_required`, the modern option
used by the qemu rbd driver and accepted by current Ceph releases.
@weizhouapache

Copy link
Copy Markdown
Member

@waterWang
thanks

have you verified the changes ?

@codecov

codecov Bot commented Aug 27, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 50.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 19.73%. Comparing base (6764ca5) to head (d698613).

Files with missing lines Patch % Lines
.../cloud/hypervisor/kvm/storage/KVMPhysicalDisk.java 50.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13991      +/-   ##
============================================
- Coverage     19.73%   19.73%   -0.01%     
+ Complexity    19959    19958       -1     
============================================
  Files          6371     6371              
  Lines        575784   575784              
  Branches      70478    70478              
============================================
- Hits         113653   113639      -14     
- Misses       449778   449798      +20     
+ Partials      12353    12347       -6     
Flag Coverage Δ
uitests 3.41% <ø> (ø)
unittests 21.01% <50.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KVM agent fails to connect to Ceph RBD storage pool after upgrading Ceph client to Tentacle 20.2.4

2 participants