[pve-devel] [PATCH cluster v4 1/2] cluster files: add used_vmids.list
Severen Redwood
severen.redwood at sitehost.co.nz
Wed Mar 26 04:51:23 CET 2025
On 29/01/2025 03:57, Thomas Lamprecht wrote:
> Am 27.01.25 um 13:18 schrieb Fabian Grünbichler:
>>> Severen Redwood via pve-devel <pve-devel at lists.proxmox.com> hat am 08.11.2024 02:46 CET geschrieben:
>>
>>> Add `/etc/pve/used_vmids.list` to the list of cluster files, which will
>>> be used for recording previously used VM/CT IDs. This is required so
>>> that we can optionally ensure that such IDs are not suggested by the
>>> `/cluster/nextid` API endpoint.
>>
>> this is encroaching bikeshed-territory, but we don't currently use ".list" as an extension in /etc/pve (and I automatically have to think of APT repository files when seeing it ;)). I think a plain "used_vmids" or "used-vmids" would also work?
>>
>> maybe somebody else has an opinion or suggestion?
>
> I agree, and I would prefer kebab-case in any way, i.e.: used-vmids
No problem, I've changed it to `/etc/pve/used-ids` now. Slightly more generic than `used-vmids` since there are also container IDs.
> Besides that it mostly depends on if we want to re-use a common file for other
> such specific use cases around VMIDs like per-{user,group,pool} reservations
> (or allow-lists) of VMID ranges.
>
> One certainly does not need to implement that for landing this series, but
> might be worth use a slightly more structured format and generalized file
> name to allow easier extension in that direction without new files and
> only needing to look at a single file when allocating VMID.
> But this can also be adapted on applying, it should mostly affect parsing
> and serialization, and maybe those even not _that_ much.
I've not done this just yet since I'm not sure what sort of format you would prefer. Possibly some kind of section headers to separate out the different parts of the file? But maybe it's best to leave that for when the patches are applied.
More information about the pve-devel
mailing list