public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Christian Ebner <c.ebner@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [PATCH pve-manager 3/3] ui: cluster join: point out version mismatch with the cluster
Date: Mon, 23 Nov 2026 18:59:15 +0100	[thread overview]
Message-ID: <20261123175915.396455-4-c.ebner@proxmox.com> (raw)
In-Reply-To: <20261123175915.396455-1-c.ebner@proxmox.com>

Joining a node that runs a different Proxmox VE version than the
cluster can lead to problems that are hard to diagnose afterwards,
for example when the node was installed from a different ISO than the
one the cluster is based on.

If the pasted join information contains the highest manager version
of the cluster nodes, compare its major and minor version with the
one of the local node. A differing minor version shows a hint
recommending to upgrade the older side first. A differing major
version shows a warning instead, as mixed major versions are only
meant to exist temporarily during an upgrade.

Joining is still possible in both cases, as a minor version
difference is usually harmless and the user might have reasons to
proceed anyway.

Suggested-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
 www/manager6/dc/ClusterEdit.js | 70 ++++++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/www/manager6/dc/ClusterEdit.js b/www/manager6/dc/ClusterEdit.js
index 10932585..9afb2368 100644
--- a/www/manager6/dc/ClusterEdit.js
+++ b/www/manager6/dc/ClusterEdit.js
@@ -157,6 +157,8 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
                 clusterName: '',
             },
             hasAssistedInfo: false,
+            versionHint: '',
+            versionWarning: '',
         },
         formulas: {
             submittxt: function (get) {
@@ -206,9 +208,61 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
                 linkEditor.setDefaultLinks();
             }
         },
+        updateVersionHint: function (clusterVersion) {
+            let vm = this.getViewModel();
+
+            let localVersion = PVE.VersionInfo?.version;
+            // the cluster version comes from pasted, possibly older or malformed join information
+            let parseVersion = (version) =>
+                typeof version === 'string'
+                    ? version
+                          .match(/^(\d+)\.(\d+)/)
+                          ?.slice(1)
+                          .map((v) => parseInt(v, 10))
+                    : undefined;
+
+            let local = parseVersion(localVersion);
+            let cluster = parseVersion(clusterVersion);
+
+            let hint = '';
+            let warning = '';
+            if (local && cluster && (local[0] !== cluster[0] || local[1] !== cluster[1])) {
+                let localIsOlder =
+                    local[0] < cluster[0] || (local[0] === cluster[0] && local[1] < cluster[1]);
+                let text = Ext.String.format(
+                    gettext(
+                        'This node runs Proxmox VE {0}, but the newest cluster node runs Proxmox VE {1}.',
+                    ),
+                    Ext.htmlEncode(localVersion),
+                    Ext.htmlEncode(clusterVersion),
+                );
+
+                if (local[0] !== cluster[0]) {
+                    let upgradeText = localIsOlder
+                        ? gettext('Upgrade this node before joining.')
+                        : gettext('Upgrade the cluster before joining.');
+                    let supportText = gettext(
+                        'Mixed major versions are only supported temporarily during an upgrade.',
+                    );
+                    warning =
+                        '<i class="fa fa-fw fa-exclamation-triangle warning"></i> ' +
+                        `${text} ${supportText} ${upgradeText}`;
+                } else {
+                    let upgradeText = localIsOlder
+                        ? gettext('Consider upgrading this node before joining.')
+                        : gettext('Consider upgrading the cluster before joining.');
+                    hint = `${text} ${upgradeText}`;
+                }
+            }
+
+            vm.set('versionHint', hint);
+            vm.set('versionWarning', warning);
+        },
         recomputeSerializedInfo: function (field, value) {
             let vm = this.getViewModel();
 
+            this.updateVersionHint(undefined);
+
             let assistedEntryBox = this.lookup('assistedEntry');
 
             if (!assistedEntryBox.getValue()) {
@@ -270,6 +324,7 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
                 };
                 field.valid = true;
                 vm.set('hasAssistedInfo', true);
+                this.updateVersionHint(joinInfo.pveVersion);
             }
             vm.set('info', info);
         },
@@ -340,6 +395,21 @@ Ext.define('PVE.ClusterJoinNodeWindow', {
             },
             value: '',
         },
+        {
+            xtype: 'displayfield',
+            userCls: 'pmx-hint',
+            bind: {
+                value: '{versionHint}',
+                hidden: '{!versionHint}',
+            },
+        },
+        {
+            xtype: 'displayfield',
+            bind: {
+                value: '{versionWarning}',
+                hidden: '{!versionWarning}',
+            },
+        },
         {
             xtype: 'panel',
             width: 776,
-- 
2.47.3





      parent reply	other threads:[~2026-11-23 17:59 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 17:59 [PATCH cluster/manager 0/3] cluster join: check node versions and warn when joining cluster with version difference Christian Ebner
2026-11-23 17:59 ` [PATCH pve-cluster 1/3] api: join info: include the cluster's highest manager version Christian Ebner
2026-11-23 17:59 ` [PATCH pve-manager 2/3] ui: cluster join info: include the cluster's " Christian Ebner
2026-11-23 17:59 ` Christian Ebner [this message]

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=20261123175915.396455-4-c.ebner@proxmox.com \
    --to=c.ebner@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /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