[pve-devel] [PATCH cluster v4 1/2] cluster files: add used_vmids.list

Fabian Grünbichler f.gruenbichler at proxmox.com
Mon Jan 27 13:18:09 CET 2025


> 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?

> 
> Co-authored-by: Daniel Krambrock <krambrock at hrz.uni-marburg.de>
> Signed-off-by: Severen Redwood <severen.redwood at sitehost.co.nz>
> Tested-by: Aaron Lauterer <a.lauterer at proxmox.com>
> Reviewed-by: Aaron Lauterer <a.lauterer at proxmox.com>
> ---
> There are no changes to this patch since v3.
> 
>  src/PVE/Cluster.pm  | 1 +
>  src/pmxcfs/status.c | 1 +
>  2 files changed, 2 insertions(+)
> 
> diff --git a/src/PVE/Cluster.pm b/src/PVE/Cluster.pm
> index f899dbe..059c7af 100644
> --- a/src/PVE/Cluster.pm
> +++ b/src/PVE/Cluster.pm
> @@ -84,6 +84,7 @@ my $observed = {
>      'virtual-guest/profiles.cfg' => 1,
>      'mapping/pci.cfg' => 1,
>      'mapping/usb.cfg' => 1,
> +    'used_vmids.list' => 1,
>  };
>  
>  sub prepare_observed_file_basedirs {
> diff --git a/src/pmxcfs/status.c b/src/pmxcfs/status.c
> index dc44464..7f60145 100644
> --- a/src/pmxcfs/status.c
> +++ b/src/pmxcfs/status.c
> @@ -114,6 +114,7 @@ static memdb_change_t memdb_change_array[] = {
>  	{ .path = "firewall/cluster.fw" },
>  	{ .path = "mapping/pci.cfg" },
>  	{ .path = "mapping/usb.cfg" },
> +	{ .path = "used_vmids.list" },
>  };
>  
>  static GMutex mutex;
> -- 
> 2.47.0




More information about the pve-devel mailing list