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)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 1241060F2F for ; Thu, 3 Feb 2022 13:49:14 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 0920827113 for ; Thu, 3 Feb 2022 13:49:14 +0100 (CET) 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)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS id 5F36127107 for ; Thu, 3 Feb 2022 13:49:13 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id 3229E44857 for ; Thu, 3 Feb 2022 13:49:13 +0100 (CET) Date: Thu, 03 Feb 2022 13:49:06 +0100 From: Fabian =?iso-8859-1?q?Gr=FCnbichler?= To: Fabian Ebner , pve-devel@lists.proxmox.com References: <20220127140155.66141-1-f.ebner@proxmox.com> <20220127140155.66141-3-f.ebner@proxmox.com> <1643631853.hgjpywv6g4.astroid@nora.none> <3f5de144-086e-570f-da61-e05dd6d2e365@proxmox.com> In-Reply-To: <3f5de144-086e-570f-da61-e05dd6d2e365@proxmox.com> MIME-Version: 1.0 User-Agent: astroid/0.15.0 (https://github.com/astroidmail/astroid) Message-Id: <1643892517.1cq7x1cfxv.astroid@nora.none> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-SPAM-LEVEL: Spam detection results: 0 AWL 0.206 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% 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 T_SCC_BODY_TEXT_LINE -0.01 - Subject: Re: [pve-devel] [PATCH qemu-server 2/4] api: clone: fork before locking 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: Thu, 03 Feb 2022 12:49:14 -0000 On February 3, 2022 10:31 am, Fabian Ebner wrote: > Am 31.01.22 um 13:34 schrieb Fabian Gr=C3=BCnbichler: >> On January 27, 2022 3:01 pm, Fabian Ebner wrote: >>> using the familiar early+repeated checks pattern from other API calls. >>> Only intended functional changes are with regard to locking/forking. >>=20 >> two questions: >> - the FW config cloning happens inside the worker now, while it was=20 >> previously before forking the worker (LGTM, but might be called out=20 >> explicitly if intentional ;)) >=20 > Honestly, I didn't think too much about it, so thanks for pointing that > out! But thinking about it now, I also don't see an obvious issue with > it and IMHO it feels more natural to be part of the worker since it > takes the firewall config lock and the cleanup also happens inside the > worker. >=20 >> - there are some checks at the start of the endpoint (checking=20 >> storage/target), which are not repeated after the fork+lock - while=20 >> unlikely, our view of storage.cfg could change in-between (lock guest=20 >> config -> cfs_update). should those be moved in the check sub (or into= =20 >> the check_storage_access_clone helper)? >>=20 >=20 > Yes, for better consistency that should be done. Either way is fine with > me. Should I send a v2 or are you going to do a follow-up? I'll do a follow-up! >=20 >> rest of the series LGTM