From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 92F9274E5E for ; Tue, 20 Apr 2021 18:10:57 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 7B0A225872 for ; Tue, 20 Apr 2021 18:10:27 +0200 (CEST) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 5EDB025865 for ; Tue, 20 Apr 2021 18:10:23 +0200 (CEST) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 3C08745BB4 for ; Tue, 20 Apr 2021 18:10:23 +0200 (CEST) Message-ID: <6527f71d-183a-f4c3-575a-8ad31bd19e4f@proxmox.com> Date: Tue, 20 Apr 2021 18:10:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:88.0) Gecko/20100101 Thunderbird/88.0 Content-Language: en-US To: Proxmox VE development discussion , =?UTF-8?Q?Dominic_J=c3=a4ger?= References: <20210111114259.121999-1-d.jaeger@proxmox.com> From: Thomas Lamprecht In-Reply-To: <20210111114259.121999-1-d.jaeger@proxmox.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment 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. [osd.pm] Subject: [pve-devel] applied-series: [PATCH manager 1/2] Fix #2053: OSD destroy only on specified node X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Apr 2021 16:10:57 -0000 On 11.01.21 12:42, Dominic J=C3=A4ger wrote: > Allow destroying only OSDs that belong to the node that has been specif= ied in > the API path. >=20 > So if > - OSD 1 belongs to node A and > - OSD 2 belongs to node B > then > - pvesh delete nodes/A/ceph/osd/1 is allowed but > - pvesh delete nodes/A/ceph/osd/2 is not >=20 > Destroying an OSD via GUI automatically inserts the correct node > into the API path. >=20 > pveceph automatically insert the local node into the API call, too. > Consequently, it can now only destroy local OSDs (fix #2053). > - pveceph osd destroy 1 is allowed on node A but > - pveceph osd destroy 2 is not >=20 > Signed-off-by: Dominic J=C3=A4ger > --- > PVE/API2/Ceph/OSD.pm | 25 +++++++++++++++++++++++++ > 1 file changed, 25 insertions(+) >=20 > applied, thanks! I reworked the the filtering/parsing the $tree result a bit, maybe you ca= n re-check if all seem OK to you? The test are def. good and helped here - thanks fo= r them!