From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 6093F1FF13F for ; Thu, 09 Apr 2026 13:47:38 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id EAD383016; Thu, 9 Apr 2026 13:48:21 +0200 (CEST) From: Kefu Chai To: pve-devel@lists.proxmox.com Subject: [PATCH manager] api: cluster: ceph: fix osd metadata return schema Date: Thu, 9 Apr 2026 19:47:41 +0800 Message-ID: <20260409114741.3119391-1-k.chai@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1775735199880 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.608 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment KAM_MAILER 2 Automated Mailer Tag Left in Email RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [ceph.pm,proxmox.com] Message-ID-Hash: D5TF5FLOTIVXKK5PFO6YUO5HVSYVUOPH X-Message-ID-Hash: D5TF5FLOTIVXKK5PFO6YUO5HVSYVUOPH X-MailFrom: k.chai@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: The 'osd' field used 'properties' inside a 'type: array', which is invalid -- arrays use 'items' to describe their elements. The 'osd metadata' command returns a bare JSON array where each element is an object describing one OSD, so replace 'properties' with 'items'. The runtime behavior is unaffected; this is a schema-only correction. Fixes: https://bugzilla.proxmox.com/show_bug.cgi?id=5346 Signed-off-by: Kefu Chai --- PVE/API2/Cluster/Ceph.pm | 62 +++++++++++++++++++--------------------- 1 file changed, 30 insertions(+), 32 deletions(-) diff --git a/PVE/API2/Cluster/Ceph.pm b/PVE/API2/Cluster/Ceph.pm index 399460fb..1e9b4482 100644 --- a/PVE/API2/Cluster/Ceph.pm +++ b/PVE/API2/Cluster/Ceph.pm @@ -193,39 +193,37 @@ __PACKAGE__->register_method({ osd => { type => "array", description => "OSDs configured in the cluster and their properties.", - properties => { - "{id}" => { - type => "object", - description => "Useful properties are listed, but not the full list.", - properties => { - id => { - type => "integer", - description => "OSD ID.", - }, - front_addr => { - type => "string", - description => - "Bind addresses and ports for frontend traffic to OSDs.", - }, - back_addr => { - type => "string", - description => - "Bind addresses and ports for backend inter OSD traffic.", - }, - device_id => { - type => "string", - description => "Devices used by the OSD.", - }, - osd_data => { - type => "string", - description => "Path to the OSD data directory.", - }, - osd_objectstore => { - type => "string", - description => "OSD objectstore type.", - }, - %{$metadata_common_props}, + items => { + type => "object", + description => "Useful properties are listed, but not the full list.", + properties => { + id => { + type => "integer", + description => "OSD ID.", + }, + front_addr => { + type => "string", + description => + "Bind addresses and ports for frontend traffic to OSDs.", + }, + back_addr => { + type => "string", + description => + "Bind addresses and ports for backend inter OSD traffic.", + }, + device_id => { + type => "string", + description => "Devices used by the OSD.", + }, + osd_data => { + type => "string", + description => "Path to the OSD data directory.", + }, + osd_objectstore => { + type => "string", + description => "OSD objectstore type.", }, + %{$metadata_common_props}, }, }, }, -- 2.47.3