From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) by lore.proxmox.com (Postfix) with ESMTPS id 79A531FF389 for ; Wed, 22 May 2024 14:11:32 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id C22E3B914; Wed, 22 May 2024 14:11:48 +0200 (CEST) To: pve-devel@lists.proxmox.com Date: Wed, 22 May 2024 14:05:51 +0200 In-Reply-To: <20240522120553.49114-1-krambrock@hrz.uni-marburg.de> References: <20240522120553.49114-1-krambrock@hrz.uni-marburg.de> MIME-Version: 1.0 Message-ID: List-Id: Proxmox VE development discussion List-Post: From: Daniel Krambrock via pve-devel Precedence: list Cc: Daniel Krambrock X-Mailman-Version: 2.1.29 X-BeenThere: pve-devel@lists.proxmox.com List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: Proxmox VE development discussion List-Help: Subject: [pve-devel] [PATCH cluster] close #4369: make VMID suggestion strategy configurable Content-Type: multipart/mixed; boundary="===============9212584041660430758==" Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" --===============9212584041660430758== Content-Type: message/rfc822 Content-Disposition: inline Return-Path: X-Original-To: pve-devel@lists.proxmox.com Delivered-To: pve-devel@lists.proxmox.com Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 0AA1BC49A5 for ; Wed, 22 May 2024 14:11:47 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id DC926B86B for ; Wed, 22 May 2024 14:11:46 +0200 (CEST) Received: from vhrz1173.hrz.uni-marburg.de (vhrz1173.HRZ.Uni-Marburg.DE [137.248.1.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Wed, 22 May 2024 14:11:46 +0200 (CEST) Received: from vhrz1173.hrz.uni-marburg.de (vhrz1173.HRZ.Uni-Marburg.DE [137.248.1.43]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by vhrz1865.HRZ.Uni-Marburg.DE (Postfix) with ESMTPS id 4VkqlX6knQzygT; Wed, 22 May 2024 14:06:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uni-marburg.de; s=dkim; t=1716379576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nq0LOlCGG+A6BiEA4Hq1xzw+YnnJ/Y7otqkXJPa/Baw=; b=TIaxBl4ICAvobdFh7Grw27Ezz1S6uIzOY2KsLuj8OVwcl8GUogeaiFOJn7A0D1ef0taG9Z BbUJUk1IsGBpyjUUTedpv1+qU+3sYB/+uz7c9H+Wi4M7jNP6G5YELhAJ3+LzFhBy41fio5 UGGFdHz63tRZ02JEpJtPzdMoj3nqtoA= Authentication-Results: smtpd-out; dkim=none; spf=none (smtpd-out: domain of root@vhrz2211.hrz.uni-marburg.de has no SPF policy when checking 137.248.1.43) smtp.mailfrom=root@vhrz2211.hrz.uni-marburg.de Received: from vhrz2211.hrz.uni-marburg.de (vhrz2211.HRZ.Uni-Marburg.DE [172.25.3.10]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by vhrz1865.HRZ.Uni-Marburg.DE (Postfix) with ESMTPS id 4VkqlX5jK9zygL; Wed, 22 May 2024 14:06:16 +0200 (CEST) Received: from root by vhrz2211.hrz.uni-marburg.de with local (Exim 4.96) (envelope-from ) id 1s9kjY-000Cof-2P; Wed, 22 May 2024 14:06:16 +0200 From: Daniel Krambrock 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> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240522120553.49114-1-krambrock@hrz.uni-marburg.de> References: <20240522120553.49114-1-krambrock@hrz.uni-marburg.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Rspamd-Score: -4.80 / 12.00 / 15.00 X-Rspamd-Queue-Id: 4VkqlX6knQzygT X-SPAM-LEVEL: Spam detection results: 0 AWL 0.018 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DMARC_PASS -0.1 DMARC pass policy SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Signed-off-by: Daniel Krambrock --- 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 --===============9212584041660430758== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel --===============9212584041660430758==--