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 523ED94D59 for ; Mon, 27 Feb 2023 15:04:43 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 31C6B2BF51 for ; Mon, 27 Feb 2023 15:04:43 +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) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Mon, 27 Feb 2023 15:04:41 +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 91D1348971; Mon, 27 Feb 2023 15:04:41 +0100 (CET) Message-ID: Date: Mon, 27 Feb 2023 15:04:40 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:110.0) Gecko/20100101 Thunderbird/110.0 Content-Language: en-GB, de-AT To: Proxmox VE development discussion , Fiona Ebner , "aderumier@odiso.com" References: <20230213120021.3783742-1-aderumier@odiso.com> <3ba0178a-aa18-1c45-c7d6-7105954e3e83@proxmox.com> From: Thomas Lamprecht In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-SPAM-LEVEL: Spam detection results: 0 AWL -0.051 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 NICE_REPLY_A -0.001 Looks like a legit reply (A) 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] partially-applied: [PATCH v4 qemu-server 00/16] rework memory hotplug + virtiomem 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: Mon, 27 Feb 2023 14:04:43 -0000 Am 16/02/2023 um 13:35 schrieb Fiona Ebner: > Add a get_derived_property() method to AbstractConfig.pm, taking a > (partial) config and the name for the derived property. The first two > will be 'maxcpu' and 'maxmem' (should I use 'max-cpu' or different > names?), because that's what HA manager needs. Yeah, would prefer having *some* sort of casing, as none is IMO needlessly hard to read. kebab-case would work fine for me. > > The partial config needs to contain all actual properties needed to > compute the derived property, e.g. 'vcpus', 'sockets' and 'cores' for > 'maxcpu' in case of VMs. > > If we switch to get_guest_config_properties(), there needs to be a do you mean `get_derived_property` here? > second method to request which properties are actually needed for the > computation of the derived property beforehand. I.e., something like a `get_derived_property_inputs` sub? > > Whenever something in the actual properties changes, the calculation > needs to be adapted to still yield the same result for the derived > property, but this can be done entirely in the VM/CT plugin implementation. > > Whenever HA manager needs something new, a new derived property is > implemented in the plugins and dependency bumps for > qemu-server/pve-container are done. It has some complexity, but I don't have a really better idea, so fine by me.