From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id BFDBF1FF065 for ; Mon, 23 Nov 2026 18:59:50 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id CE561216DD; Mon, 23 Nov 2026 18:59:31 +0100 (CET) From: Christian Ebner 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 Message-ID: <20261123175915.396455-4-c.ebner@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261123175915.396455-1-c.ebner@proxmox.com> References: <20261123175915.396455-1-c.ebner@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1795456766611 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.353 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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: I5SIB337BGK6ENPUM2H3U4CPY4ZHVQGI X-Message-ID-Hash: I5SIB337BGK6ENPUM2H3U4CPY4ZHVQGI X-MailFrom: c.ebner@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: 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 Signed-off-by: Christian Ebner --- 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 = + ' ' + + `${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