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 EAEA993F72 for ; Wed, 10 Apr 2024 12:52:47 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id CC9C6C242 for ; Wed, 10 Apr 2024 12:52:47 +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)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 10 Apr 2024 12:52:47 +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 008DB43C35 for ; Wed, 10 Apr 2024 12:52:47 +0200 (CEST) Message-ID: Date: Wed, 10 Apr 2024 12:52:46 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Dominik Csapak , Proxmox VE development discussion References: <20240320125158.2094900-1-d.csapak@proxmox.com> <20240320125158.2094900-4-d.csapak@proxmox.com> <6bc2caef-3b3f-468e-b75e-45a15bc5ed1a@proxmox.com> Content-Language: en-US From: Fiona Ebner In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.073 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 SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Subject: Re: [pve-devel] [PATCH qemu-server 3/3] api: include not mapped resources for running vms in migrate preconditions 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: Wed, 10 Apr 2024 10:52:48 -0000 Am 02.04.24 um 11:39 schrieb Dominik Csapak: > On 3/22/24 17:19, Fiona Ebner wrote: >> Am 20.03.24 um 13:51 schrieb Dominik Csapak: >>> so that we can show a proper warning in the migrate dialog and check it >>> in the bulk migrate precondition check >>> >>> the unavailable_storages and allowed_nodes should be the same as before >>> >>> Signed-off-by: Dominik Csapak >>> --- >>> not super happy with this partial approach, we probably should just >>> always return the 'allowed_nodes' and 'not_allowed_nodes' and change >>> the gui to handle the running vs not running state? >> >> So not_allowed_nodes can already be returned in both states after this >> patch. But allowed nodes still only if not running. I mean, there could >> be API users that break if we'd always return allowed_nodes, but it >> doesn't sound unreasonable for me to do so. Might even be an opportunity >> to structure the code in a bit more straightforward manner. > > yes, as said previosly i'd like this api call a bit to make it more > practical > but that probably has to wait for the next major release > > as for returning 'allowed_nodes' always, we'd have to adapt the gui of > course, > but if we don't deem it 'too breaking' i'd rework that a bit even now > Thinking about it in general for existing API users: 1. If allowed_nodes is not checked for live-migration, no breakage. 2. If allowed_nodes is checked for live-migration, the API user just becomes more accurate (as long as what we return is correct). 3. If there is an assert that allowed_nodes is not returned for live-migration, breakage. 4. If presence of allowed_nodes is used to guess whether it's a live-migration or not, breakage. But this is just a bug IMHO.