public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [PATCH cluster/manager 0/2] fix #6501: allow cluster names up to 32 characters
@ 2026-10-28  9:58 Kefu Chai
  2026-10-28  9:58 ` [PATCH pve-cluster 1/2] fix #6501: api: cluster create: " Kefu Chai
  2026-10-28  9:58 ` [PATCH manager 2/2] fix #6501: ui: " Kefu Chai
  0 siblings, 2 replies; 3+ messages in thread
From: Kefu Chai @ 2026-10-28  9:58 UTC (permalink / raw)
  To: pve-devel

The cluster name is limited to 15 characters. The limit dates back to
2011, when clusters ran on cman. corosync 3, corosync-qdevice and
pmxcfs handle longer names, so this series raises the limit to 32, in
the cluster create API (pve-cluster) and in the create dialog
(pve-manager). The allowed characters stay the same.

On master and on stable-bookworm (pve-cluster 8.1), the name is only
checked when a cluster is created. Joining a node copies corosync.conf
as is, and parse_conf, pmxcfs and qnetd don't limit the name. So older
nodes, including ones that join later, should work with a longer name,
and so should a downgrade. The reporter also says a longer name set in
corosync.conf by hand works for them.

On a single node, the two packages can be upgraded in either order:

- new pve-cluster, old pve-manager: the GUI still stops at 15, while
  pvecm and the API take 32
- old pve-cluster, new pve-manager: the GUI takes 32, but the API
  rejects anything over 15 ("value may only be 15 characters long")
  before creating anything

The second case is confusing but harmless. Bumping pve-manager's
dependency on libpve-cluster-api-perl, which ships the API, would avoid
it.

With a QDevice, the name is also the CN of the cluster's certificate,
which qnetd checks. RFC 5280 limits a CN to 64 characters, so 32 is
fine.

I tested this on a three-node lab cluster. The API accepts a
32-character name and rejects 33. After I renamed the cluster to a
32-character name in corosync.conf, it stayed quorate, and pmxcfs,
pvecm status and the cluster status and join info APIs showed the new
name. I couldn't test a join or mixed versions there, so that part is
from reading the code. Please let me know if I missed something.

pve-cluster:

Kefu Chai (1):
  fix #6501: api: cluster create: allow cluster names up to 32 characters

 src/PVE/API2/ClusterConfig.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

pve-manager:

Kefu Chai (1):
  fix #6501: ui: cluster create: allow cluster names up to 32 characters

 www/manager6/dc/ClusterEdit.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.47.3




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH pve-cluster 1/2] fix #6501: api: cluster create: allow cluster names up to 32 characters
  2026-10-28  9:58 [PATCH cluster/manager 0/2] fix #6501: allow cluster names up to 32 characters Kefu Chai
@ 2026-10-28  9:58 ` Kefu Chai
  2026-10-28  9:58 ` [PATCH manager 2/2] fix #6501: ui: " Kefu Chai
  1 sibling, 0 replies; 3+ messages in thread
From: Kefu Chai @ 2026-10-28  9:58 UTC (permalink / raw)
  To: pve-devel

The 15 character limit was added in 2011, back when clusters ran on
cman. corosync 3, corosync-qdevice and pmxcfs have no such limit, and
the reporter says a longer name works for them after changing it in
corosync.conf by hand.

With a QDevice, the cluster name is also the CN of the cluster's TLS
certificate, which qnetd checks. RFC 5280 caps a CN at 64 characters.

Raise the limit to 32. That covers the requested 25 with room to spare.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
---
 src/PVE/API2/ClusterConfig.pm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/PVE/API2/ClusterConfig.pm b/src/PVE/API2/ClusterConfig.pm
index bbed40e..c634ec9 100644
--- a/src/PVE/API2/ClusterConfig.pm
+++ b/src/PVE/API2/ClusterConfig.pm
@@ -102,7 +102,7 @@ __PACKAGE__->register_method({
                 description => "The name of the cluster.",
                 type => 'string',
                 format => 'pve-node',
-                maxLength => 15,
+                maxLength => 32,
             },
             nodeid => get_standard_option('corosync-nodeid'),
             votes => {
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH manager 2/2] fix #6501: ui: cluster create: allow cluster names up to 32 characters
  2026-10-28  9:58 [PATCH cluster/manager 0/2] fix #6501: allow cluster names up to 32 characters Kefu Chai
  2026-10-28  9:58 ` [PATCH pve-cluster 1/2] fix #6501: api: cluster create: " Kefu Chai
@ 2026-10-28  9:58 ` Kefu Chai
  1 sibling, 0 replies; 3+ messages in thread
From: Kefu Chai @ 2026-10-28  9:58 UTC (permalink / raw)
  To: pve-devel

Use the same limit as the cluster create API in pve-cluster.

Signed-off-by: Kefu Chai <k.chai@proxmox.com>
---
 www/manager6/dc/ClusterEdit.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/www/manager6/dc/ClusterEdit.js b/www/manager6/dc/ClusterEdit.js
index 10932585..cb23607c 100644
--- a/www/manager6/dc/ClusterEdit.js
+++ b/www/manager6/dc/ClusterEdit.js
@@ -21,7 +21,7 @@ Ext.define('PVE.ClusterCreateWindow', {
                 xtype: 'textfield',
                 fieldLabel: gettext('Cluster Name'),
                 allowBlank: false,
-                maxLength: 15,
+                maxLength: 32,
                 name: 'clustername',
             },
             {
-- 
2.47.3





^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-28  9:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-28  9:58 [PATCH cluster/manager 0/2] fix #6501: allow cluster names up to 32 characters Kefu Chai
2026-10-28  9:58 ` [PATCH pve-cluster 1/2] fix #6501: api: cluster create: " Kefu Chai
2026-10-28  9:58 ` [PATCH manager 2/2] fix #6501: ui: " Kefu Chai

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