[pve-devel] [PATCH ha-manager 02/11] resources: add get_static_stats() method

Thomas Lamprecht t.lamprecht at proxmox.com
Wed Nov 16 13:52:59 CET 2022


Hi,

Am 16/11/2022 um 13:38 schrieb DERUMIER, Alexandre:
>>> same here. As this is just internal we can also adapt it later
>>> though..
>>>
>>
>> Well, the Rust backend also uses 'maxcpu' and 'maxmem' currently :/
>> So at least in Usage/Static.pm, it will be more difficult to change
>> later.
>>
> I still have a virtio-mem pending patch series,
> where I introduce a real maxmemory option in config file.
> https://www.mail-archive.com/pve-devel@lists.proxmox.com/msg09395.html
> 
> 
> I think we should use same variable than in config files to avoid
> confusion.

not sure if config settings and internal run state/function params/return
values are that important to have identically named, or am I missing something?

> 
> maxmemory: the max memory we can hotplug when virtio-mem is used
> memory: the current online memory module
> balloon: the min size we can balloon.
> 
> 

yeah, I'd prefer either a format string with a default key:

memory: [current=]\d+[,max=\d+]

or:

memory: ...
memory-max: ...

Keeping the common prefix first groups those settings close together on
alphabetical sorting in API docs or CLI usage, making it easier to find
for users and having an actual separator is just nicer in general.





More information about the pve-devel mailing list