public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Krambrock via pve-devel <pve-devel@lists.proxmox.com>
To: pve-devel@lists.proxmox.com
Cc: Daniel Krambrock <krambrock@hrz.uni-marburg.de>
Subject: [pve-devel] [PATCH cluster] close #4369: make VMID suggestion strategy configurable
Date: Wed, 22 May 2024 14:05:51 +0200	[thread overview]
Message-ID: <mailman.222.1716379907.319.pve-devel@lists.proxmox.com> (raw)
In-Reply-To: <20240522120553.49114-1-krambrock@hrz.uni-marburg.de>

[-- Attachment #1: Type: message/rfc822, Size: 5270 bytes --]

From: Daniel Krambrock <krambrock@hrz.uni-marburg.de>
To: pve-devel@lists.proxmox.com
Subject: [PATCH cluster] close #4369: make VMID suggestion strategy configurable
Date: Wed, 22 May 2024 14:05:51 +0200
Message-ID: <20240522120553.49114-3-krambrock@hrz.uni-marburg.de>

Signed-off-by: Daniel Krambrock <krambrock@hrz.uni-marburg.de>
---
 src/PVE/Cluster.pm          | 1 +
 src/PVE/DataCenterConfig.pm | 9 +++++++++
 2 files changed, 10 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/PVE/DataCenterConfig.pm b/src/PVE/DataCenterConfig.pm
index abd0bbf..1394623 100644
--- a/src/PVE/DataCenterConfig.pm
+++ b/src/PVE/DataCenterConfig.pm
@@ -337,6 +337,15 @@ my $datacenter_schema = {
 	    format => $next_id_format,
 	    description => "Control the range for the free VMID auto-selection pool.",
 	},
+	'next-id-strategy' => {
+	    optional => 1,
+	    type => 'string',
+            enum => ['next-free', 'max+1', 'list'],
+            default => 'next-free',
+            description => "VMID allocation strategie. 'next-free' returns the lowerst free ID. "
+                ."'max+1' returns the biggerst used ID + 1. "
+                ."'list' returns the lowerst free ID that is not on the list of previously used IDs.",
+	},
 	migration => {
 	    optional => 1,
 	    type => 'string', format => $migration_format,
-- 
2.39.2



[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

  parent reply	other threads:[~2024-05-22 12:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20240522120553.49114-1-krambrock@hrz.uni-marburg.de>
2024-05-22 12:05 ` [pve-devel] [PATCH manager] " Daniel Krambrock via pve-devel
2024-05-22 12:05 ` Daniel Krambrock via pve-devel [this message]
2024-05-22 12:05 ` [pve-devel] [PATCH container] " Daniel Krambrock via pve-devel
2024-05-22 12:05 ` [pve-devel] [PATCH qemu] " Daniel Krambrock via pve-devel
2024-06-05  8:56 ` [pve-devel] (no subject) Shannon Sterz
     [not found] ` <20240522120553.49114-2-krambrock@hrz.uni-marburg.de>
2024-06-05  8:57   ` [pve-devel] [PATCH manager] close #4369: make VMID suggestion strategy configurable Shannon Sterz
     [not found] ` <20240522120553.49114-3-krambrock@hrz.uni-marburg.de>
2024-06-05  8:57   ` [pve-devel] [PATCH cluster] " Shannon Sterz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mailman.222.1716379907.319.pve-devel@lists.proxmox.com \
    --to=pve-devel@lists.proxmox.com \
    --cc=krambrock@hrz.uni-marburg.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal