From nobody Sat Oct 24 20:21:00 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) client-ip=38.145.34.151; envelope-from=devel-bounces@lists.libvirt.org; helo=lists.libvirt.org; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass(p=none dis=none) header.from=undertheprinter.com ARC-Seal: i=1; a=rsa-sha256; t=1791197275; cv=none; d=zohomail.com; s=zohoarc; b=KLKzLxmIejOd8G9qGarkfU5xzXRG9MDQN9H+EN4jOFASBSVY0EGqRTq5pIuAodPz18uDvI54t/uyVMM3R4y2IEUcqPOeEjecVzaau6yb6bf2klOON5OFPCAzi/yBHNnhBo17fYiFlVI1+NaynL06I+ULAdgBw++/xX7h+MvXL0I= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1791197275; h=Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:List-Subscribe:List-Post:List-Owner:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Subject:Subject:To:To:Message-Id:Reply-To; bh=8LJ8G7krs7J/eIh1xu/n1Pg/zu9oZ5u/gZCcawk4/Lo=; b=hI+BMmTJ5COclRsY+90EYBy7EteC0jq+XI7TbigkzrBw0kIgRwSXqeqQQDLNC0uPaAagVoGtRXR+/K2mLwx+LRBYIE/fQYYMId/hXLY4xWVpBDJ0E2MLKyAdr6DqgilMAkFEx1jc78pCNXIlpIDPQGeJpXjkHre0O7lJGXqPLmw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of lists.libvirt.org designates 38.145.34.151 as permitted sender) smtp.mailfrom=devel-bounces@lists.libvirt.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.libvirt.org (lists.libvirt.org [38.145.34.151]) by mx.zohomail.com with SMTPS id 1791197275005121.72070090641466; Mon, 5 Oct 2026 03:47:55 -0700 (PDT) Received: by lists.libvirt.org (Postfix, from userid 993) id D89894197D; Mon, 5 Oct 2026 06:47:53 -0400 (EDT) Received: from [172.19.199.16] (unknown [10.16.107.18]) by lists.libvirt.org (Postfix) with ESMTP id E73BB41DDA; Mon, 5 Oct 2026 06:36:43 -0400 (EDT) Received: by lists.libvirt.org (Postfix, from userid 993) id 78C183F303; Sat, 3 Oct 2026 15:24:52 -0400 (EDT) Received: from mout-p-201.mailbox.org (mout-p-201.mailbox.org [80.241.56.171]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (3072 bits) server-digest SHA256) (No client certificate requested) by lists.libvirt.org (Postfix) with ESMTPS id 31C133F320 for ; Sat, 3 Oct 2026 15:24:51 -0400 (EDT) Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:b231:465::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 4hxwNx1rvXzMlTJ; Sat, 03 Oct 2026 21:16:17 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on lists.libvirt.org X-Spam-Level: X-Spam-Status: No, score=-3.5 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 X-Greylist: delayed 510 seconds by postgrey-1.37 at lists.libvirt.org; Sat, 03 Oct 2026 15:24:51 EDT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=undertheprinter.com; s=MBO0001; t=1791054977; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=8LJ8G7krs7J/eIh1xu/n1Pg/zu9oZ5u/gZCcawk4/Lo=; b=Le5p4WXCpjsDgnPyFQgmi87LKrITogFmRXPZUJng/wwyr7CwDQRRJ/2VetO5rL2sPlpakb /Iou2vFUH/Y7f3dBN97J1Fr05H6siisIO1cZjRYXGZGB/0RIDF1EbMyjEQTHr+Uh8iLiRv dR178F835XoJouIhiWxIgQprKTONcaKdgAmXaQjgxCFmtmiF+gMpVHIaw07tmI2CiLpJp9 eB5/3wuZAIrWh+WHMpsXz+HgtMs5fi4fb9WTpprbKOkwilSa/shfInQU6iBVsbL+cBDZ7K y2Ty/STG8JEklQi5iAgNGL+bUDSPbA8xm6VpEvwAHpnU0+iosf5KlU4CW9JDww== Authentication-Results: outgoing_mbo_mout; dkim=none; spf=pass (outgoing_mbo_mout: domain of janis.heims@undertheprinter.com designates 2001:67c:2050:b231:465::2 as permitted sender) smtp.mailfrom=janis.heims@undertheprinter.com From: Janis Heims To: devel@lists.libvirt.org Subject: [PATCH] replace rbd option auth_supported with auth_*_required Date: Sat, 3 Oct 2026 21:15:57 +0200 Message-ID: <20261003191557.352881-1-janis.heims@undertheprinter.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4hxwNx1rvXzMlTJ X-MailFrom: janis.heims@undertheprinter.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; header-match-devel.lists.libvirt.org-0; emergency; member-moderation Message-ID-Hash: HSEXFQWF3YQOBRYSWDMMVPA53MREKYEB X-Message-ID-Hash: HSEXFQWF3YQOBRYSWDMMVPA53MREKYEB X-Mailman-Approved-At: Mon, 05 Oct 2026 10:35:09 +0000 CC: Janis Heims X-Mailman-Version: 3.3.10 Precedence: list List-Id: Development discussions about the libvirt library & tools Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-ZohoMail-DKIM: pass (identity @undertheprinter.com) X-ZM-MESSAGEID: 1791197279659158500 Content-Type: text/plain; charset="utf-8" As stated in Yusuke Fujimaki's patch, Ceph recently removed the deprecated auth_supported option that is still used by libvirt, causing errors when attempting to start a storage pool on a newer Ceph server: https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/RELD= VG6A3LAA4IFA32EOFQ5OJPMI6OGR/ https://github.com/ceph/ceph/commit/350cc71d7d9e9cd6239d24080082de7ac9bf8b70 This patch addresses the issue by replacing the deprecated option with all three new options (auth_cluster_required, auth_service_required and auth_client_required), as was previously done in Ceph. Resolves: https://gitlab.com/libvirt/libvirt/-/work_items/918 Signed-off-by: Janis Heims --- src/libxl/libxl_conf.c | 11 ++++++---- src/libxl/xen_xl.c | 4 +++- src/storage/storage_backend_rbd.c | 22 +++++++++++++++++-- .../test-rbd-multihost-noauth.cfg | 2 +- 4 files changed, 31 insertions(+), 8 deletions(-) diff --git a/src/libxl/libxl_conf.c b/src/libxl/libxl_conf.c index 3bb5c1e591..49f968a857 100644 --- a/src/libxl/libxl_conf.c +++ b/src/libxl/libxl_conf.c @@ -1087,11 +1087,14 @@ libxlMakeNetworkDiskSrcStr(virStorageSource *src, =20 if (username) { virBufferEscape(&buf, '\\', ":", ":id=3D%s", username); - virBufferEscape(&buf, '\\', ":", - ":key=3D%s:auth_supported=3Dcephx\\;none", - secret); + virBufferEscape(&buf, '\\', ":", ":key=3D%s", secret); + virBufferAddLit(&buf, ":auth_cluster_required=3Dcephx"); + virBufferAddLit(&buf, ":auth_service_required=3Dcephx"); + virBufferAddLit(&buf, ":auth_client_required=3Dcephx\\;none"); } else { - virBufferAddLit(&buf, ":auth_supported=3Dnone"); + virBufferAddLit(&buf, ":auth_cluster_required=3Dnone"); + virBufferAddLit(&buf, ":auth_service_required=3Dnone"); + virBufferAddLit(&buf, ":auth_client_required=3Dnone"); } =20 if (src->nhosts > 0) { diff --git a/src/libxl/xen_xl.c b/src/libxl/xen_xl.c index d05972af5b..c1ddc7c071 100644 --- a/src/libxl/xen_xl.c +++ b/src/libxl/xen_xl.c @@ -1478,7 +1478,9 @@ xenFormatXLDiskSrcNet(virStorageSource *src) =20 virBufferStrcat(&buf, "rbd:", src->path, NULL); =20 - virBufferAddLit(&buf, ":auth_supported=3Dnone"); + virBufferAddLit(&buf, ":auth_cluster_required=3Dnone"); + virBufferAddLit(&buf, ":auth_service_required=3Dnone"); + virBufferAddLit(&buf, ":auth_client_required=3Dnone"); =20 if (src->nhosts > 0) { virBufferAddLit(&buf, ":mon_host=3D"); diff --git a/src/storage/storage_backend_rbd.c b/src/storage/storage_backen= d_rbd.c index 25cad4a28d..33e644d981 100644 --- a/src/storage/storage_backend_rbd.c +++ b/src/storage/storage_backend_rbd.c @@ -241,17 +241,35 @@ virStorageBackendRBDOpenRADOSConn(virStorageBackendRB= DState *ptr, goto cleanup; =20 if (virStorageBackendRBDRADOSConfSet(ptr->cluster, - "auth_supported", "cephx") < = 0) + "auth_cluster_required", "cep= hx") < 0) + goto cleanup; + + if (virStorageBackendRBDRADOSConfSet(ptr->cluster, + "auth_service_required", "cep= hx") < 0) + goto cleanup; + + if (virStorageBackendRBDRADOSConfSet(ptr->cluster, + "auth_client_required", "ceph= x") < 0) goto cleanup; } else { VIR_DEBUG("Not using cephx authorization"); + if (rados_create(&ptr->cluster, NULL) < 0) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("failed to create the RADOS cluster")); goto cleanup; } + if (virStorageBackendRBDRADOSConfSet(ptr->cluster, - "auth_supported", "none") < 0) + "auth_cluster_required", "non= e") < 0) + goto cleanup; + + if (virStorageBackendRBDRADOSConfSet(ptr->cluster, + "auth_service_required", "non= e") < 0) + goto cleanup; + + if (virStorageBackendRBDRADOSConfSet(ptr->cluster, + "auth_client_required", "none= ") < 0) goto cleanup; } =20 diff --git a/tests/xlconfigdata/test-rbd-multihost-noauth.cfg b/tests/xlcon= figdata/test-rbd-multihost-noauth.cfg index 5906865047..b149be077c 100644 --- a/tests/xlconfigdata/test-rbd-multihost-noauth.cfg +++ b/tests/xlconfigdata/test-rbd-multihost-noauth.cfg @@ -22,4 +22,4 @@ parallel =3D "none" serial =3D "none" builder =3D "hvm" boot =3D "d" -disk =3D [ "format=3Draw,vdev=3Dhda,access=3Drw,backendtype=3Dphy,target= =3D/dev/HostVG/XenGuest2", "format=3Draw,vdev=3Dhdb,access=3Drw,backendtype= =3Dqdisk,target=3Drbd:pool/image:auth_supported=3Dnone:mon_host=3Dmon1.exam= ple.org\\:6321\\;mon2.example.org\\:6322\\;mon3.example.org\\:6322" ] +disk =3D [ "format=3Draw,vdev=3Dhda,access=3Drw,backendtype=3Dphy,target= =3D/dev/HostVG/XenGuest2", "format=3Draw,vdev=3Dhdb,access=3Drw,backendtype= =3Dqdisk,target=3Drbd:pool/image:auth_cluster_required=3Dnone:auth_service_= required=3Dnone:auth_client_required=3Dnone:mon_host=3Dmon1.example.org\\:6= 321\\;mon2.example.org\\:6322\\;mon3.example.org\\:6322" ] base-commit: 215fab8ab1d912f6b25e60ab4d2ad59000f2eaff --=20 2.54.0