fix: use auth_client_required instead of removed auth_supported for RBD - #13991
Conversation
|
@waterWang have you verified the changes ? |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## 4.22 #13991 +/- ##
=========================================
Coverage 17.86% 17.86%
Complexity 16037 16037
=========================================
Files 5928 5928
Lines 534479 534479
Branches 65410 65410
=========================================
+ Hits 95468 95469 +1
+ Misses 428173 428172 -1
Partials 10838 10838
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
The rados_auth_shim.so LD_PRELOAD needed for libvirtd's own RBD storage-pool code turns out to crash any QEMU process that inherits it as a spawned child -- corrects the post's earlier claim that the systemd Environment= drop-in wouldn't affect qemu. Adds the fix (wrap qemu-kvm to strip LD_PRELOAD before exec) and clarifies why apache/cloudstack#13991 is still needed independently of the wrapper. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
weizhouapache
left a comment
There was a problem hiding this comment.
code lgtm
tested with ceph 20.
cc @DaanHoogland
but I think we need this in 4.22 (and maybe 4.20) too
Yes I agree, @waterWang is not responding so I think we must scavange the changes and re-submit. |
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.
d698613 to
af5e775
Compare
@DaanHoogland |
|
@blueorangutan package |
|
@weizhouapache a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19165 |
|
@blueorangutan test |
|
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian Build Failed (tid-16944) |
|
@blueorangutan test |
|
@weizhouapache a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
|
[SF] Trillian test result (tid-16946)
|
|
Awesome work, congrats on your first merged pull request! |
|
merging based on approvals and manual validation against ceph 20 (tentacle). |
Fixes #13989
Problem
CloudStack builds its RBD connection strings with the legacy Ceph option
auth_supported=cephx(orauth_supported=nonewhen 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:Root cause
KVMPhysicalDisk.RBDStringBuilderemitsauth_supportedin the RBD URI string passed to qemu/librados. Modern librados no longer accepts this option name.Fix
Replace
auth_supportedwithauth_client_required(valuescephx/none) — the modern option used by the qemu rbd driver (block/rbd.ccallsrados_conf_set(cluster, "auth_client_required", ...)) and accepted by current Ceph releases. The qemuRbdAuthModeenum only supportscephxandnone, matching the existing branches.Changes
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDisk.java: emitauth_client_required=cephx/auth_client_required=noneplugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDiskTest.java: update 3 assertions to expectauth_client_required=cephx