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 EE4D61FF13F for ; Thu, 12 Feb 2026 12:58:58 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id BFB7EDAE3; Thu, 12 Feb 2026 12:59:43 +0100 (CET) From: Friedrich Weber To: pve-devel@lists.proxmox.com Subject: [PATCH pve-cluster 1/2] corosync: create config: allow setting token coefficient Date: Thu, 12 Feb 2026 12:57:55 +0100 Message-ID: <20260212115928.148999-2-f.weber@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260212115928.148999-1-f.weber@proxmox.com> References: <20260212115928.148999-1-f.weber@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1770897576329 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.012 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: 4D4K7CPU3PGCTDCGKAUISRG7OZCDLSBR X-Message-ID-Hash: 4D4K7CPU3PGCTDCGKAUISRG7OZCDLSBR X-MailFrom: f.weber@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: By default, corosync calculates several timeouts based on the cluster size, in particular the token timeout, which is a fixed base value plus the number of nodes (minus 2) multipled by a factor called the "token coefficient" (with a default of 650ms) [1]. New clusters should be created with a lower token coefficient. Thus, allow to pass a custom token coefficient when creating the configuration for a new corosync cluster. [1] https://manpages.debian.org/trixie/corosync/corosync.conf.5.en.html#token_coefficient Signed-off-by: Friedrich Weber --- src/PVE/Corosync.pm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/PVE/Corosync.pm b/src/PVE/Corosync.pm index f5b10fa..aef0d31 100644 --- a/src/PVE/Corosync.pm +++ b/src/PVE/Corosync.pm @@ -274,6 +274,7 @@ sub create_conf { my $clustername = $param->{clustername}; my $nodeid = $param->{nodeid} || 1; my $votes = $param->{votes} || 1; + my $token_coefficient = $param->{'token-coefficient'}; my $local_ip_address = PVE::Cluster::remote_node_ip($nodename); @@ -324,6 +325,8 @@ sub create_conf { $node->{"ring${lnum}_addr"} = $link->{address}; } + $totem->{token_coefficient} = $token_coefficient if defined($token_coefficient); + return { main => $conf }; } -- 2.47.3