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 E9B2094F43 for ; Tue, 28 Feb 2023 08:35:34 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id D28674314 for ; Tue, 28 Feb 2023 08:35:34 +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 ; Tue, 28 Feb 2023 08:35:33 +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 5B0EB48A1B; Tue, 28 Feb 2023 08:35:33 +0100 (CET) Message-ID: <1a501723-d465-3ecc-3cb3-58b8d29c0bc8@proxmox.com> Date: Tue, 28 Feb 2023 08:35:28 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 To: Thomas Lamprecht , Proxmox VE development discussion References: <20230213120021.3783742-1-aderumier@odiso.com> <3ba0178a-aa18-1c45-c7d6-7105954e3e83@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.043 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.092 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: Tue, 28 Feb 2023 07:35:35 -0000 Am 27.02.23 um 15:04 schrieb Thomas Lamprecht: > 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. > Okay! > >> >> 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? Sorry, should've been clearer. I mean PVE::Cluster::get_guest_config_properties() where it's only possible to query specific properties, hence the need for the second method. > >> 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? > Yes. >> >> 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.