This is an automated email from the ASF dual-hosted git repository.
weizhouapache pushed a commit to branch 4.22
in repository https://gitbox.apache.org/repos/asf/cloudstack.git
The following commit(s) were added to refs/heads/4.22 by this push:
new b9a5977a2bb fix: use auth_client_required instead of removed
auth_supported for RBD (#13991)
b9a5977a2bb is described below
commit b9a5977a2bbafd5ed178ae392c129a0cdc4930f6
Author: water <[email protected]>
AuthorDate: Thu Sep 10 23:06:07 2026 +0800
fix: use auth_client_required instead of removed auth_supported for RBD
(#13991)
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.
Co-authored-by: Wei Zhou <[email protected]>
---
.../main/java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDisk.java | 4 ++--
.../java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDiskTest.java | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git
a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDisk.java
b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDisk.java
index 8a9d69c9795..b3b55f484e4 100644
---
a/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDisk.java
+++
b/plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDisk.java
@@ -54,9 +54,9 @@ public class KVMPhysicalDisk {
rbdOpts += ":mon_host=" + composeOptionForMonHosts(monHost, monPort);
if (authUserName == null) {
- rbdOpts += ":auth_supported=none";
+ rbdOpts += ":auth_client_required=none";
} else {
- rbdOpts += ":auth_supported=cephx";
+ rbdOpts += ":auth_client_required=cephx";
rbdOpts += ":id=" + authUserName;
rbdOpts += ":key=" + authSecret;
}
diff --git
a/plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDiskTest.java
b/plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDiskTest.java
index 098f3e1b8bd..9129d0ad545 100644
---
a/plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDiskTest.java
+++
b/plugins/hypervisors/kvm/src/test/java/com/cloud/hypervisor/kvm/storage/KVMPhysicalDiskTest.java
@@ -44,7 +44,7 @@ public class KVMPhysicalDiskTest {
Mockito.doReturn(authUserName).when(kvmStoragePoolMock).getAuthUserName();
Mockito.doReturn(authSecret).when(kvmStoragePoolMock).getAuthSecret();
- String expected =
"rbd:volume1:mon_host=ceph-monitor\\:8000:auth_supported=cephx:id=admin:key=supersecret:rbd_default_format=2:client_mount_timeout=30";
+ String expected =
"rbd:volume1:mon_host=ceph-monitor\\:8000:auth_client_required=cephx:id=admin:key=supersecret:rbd_default_format=2:client_mount_timeout=30";
String result = KVMPhysicalDisk.RBDStringBuilder(kvmStoragePoolMock,
"volume1");
Assert.assertEquals(expected, result);
@@ -62,7 +62,7 @@ public class KVMPhysicalDiskTest {
String expected = "rbd:volume1:" +
"mon_host=ceph-monitor1\\:3300\\;ceph-monitor2\\:3300\\;ceph-monitor3\\:3300:" +
-
"auth_supported=cephx:id=admin:key=supersecret:rbd_default_format=2:client_mount_timeout=30";
+
"auth_client_required=cephx:id=admin:key=supersecret:rbd_default_format=2:client_mount_timeout=30";
String actualResult =
KVMPhysicalDisk.RBDStringBuilder(kvmStoragePoolMock, "volume1");
Assert.assertEquals(expected, actualResult);
@@ -80,7 +80,7 @@ public class KVMPhysicalDiskTest {
String expected = "rbd:volume1:" +
"mon_host=[fc00\\:1234\\:\\:1]\\:3300\\;[fc00\\:1234\\:\\:2]\\:3300\\;[fc00\\:1234\\:\\:3]\\:3300:"
+
-
"auth_supported=cephx:id=admin:key=supersecret:rbd_default_format=2:client_mount_timeout=30";
+
"auth_client_required=cephx:id=admin:key=supersecret:rbd_default_format=2:client_mount_timeout=30";
String actualResult =
KVMPhysicalDisk.RBDStringBuilder(kvmStoragePoolMock, "volume1");
Assert.assertEquals(expected, actualResult);