[pve-devel] partially-applied: [PATCH v4 qemu-server 00/16] rework memory hotplug + virtiomem

Thomas Lamprecht t.lamprecht at proxmox.com
Mon Feb 27 15:04:40 CET 2023


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.





More information about the pve-devel mailing list