[PATCH cluster v3 6/6] datacenter config: add unique-next-id to schema

Severen Redwood severen.redwood at sitehost.co.nz
Tue Nov 5 03:00:54 CET 2024


Add the `unique-next-id` property to the datacentre config schema to
track whether only unique (ie. neither currently nor previously in use)
VM/CT IDs should be suggested by the `/cluster/nextid` API endpoint.

Co-authored-by: Daniel Krambrock <krambrock at hrz.uni-marburg.de>
Signed-off-by: Severen Redwood <severen.redwood at sitehost.co.nz>
---
There are no changes to this patch since v2.

 src/PVE/DataCenterConfig.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm
index abd0bbf..d1d4533 100644
--- a/src/PVE/DataCenterConfig.pm
+++ b/src/PVE/DataCenterConfig.pm
@@ -337,6 +337,11 @@ my $datacenter_schema = {
 	    format => $next_id_format,
 	    description => "Control the range for the free VMID auto-selection pool.",
 	},
+	'unique-next-id' => {
+	    optional => 1,
+	    type => 'boolean',
+	    description => "Only suggest VMIDs that are neither currently in use nor have previously been used.",
+	},
 	migration => {
 	    optional => 1,
 	    type => 'string', format => $migration_format,
-- 
2.47.0




More information about the pve-devel mailing list