From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id 425A71FF0E9 for ; Tue, 14 Jul 2026 10:23:06 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id DA443213A2; Tue, 14 Jul 2026 10:23:05 +0200 (CEST) Message-ID: <15aa5e3d-a2ea-4483-8ca8-91a39aaecf7c@proxmox.com> Date: Tue, 14 Jul 2026 10:23:01 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Beta Subject: Re: [PATCH manager v2] ui: fabrics: skip unsupported interface properties on submit To: Lukas Sichert , pve-devel@lists.proxmox.com References: <20260603155521.125175-1-l.sichert@proxmox.com> Content-Language: en-US From: Dominik Csapak In-Reply-To: <20260603155521.125175-1-l.sichert@proxmox.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1784017365530 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.367 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_LOW -0.7 Sender listed at https://www.dnswl.org/, low 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: 55755Z7E2WCXRCQ7CVHIACG2TPQXWQQZ X-Message-ID-Hash: 55755Z7E2WCXRCQ7CVHIACG2TPQXWQQZ X-MailFrom: d.csapak@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: wanted to apply this already, but during testing i noticed that even without the patch, we don't have an ipv4 column here, so i was confused by the commit message. It turns out, while this patch indeed fixes the error, the rationale in the commmit message is not precise and patch seems to conflate two things here (correct me if i'm missing something here) the panel never got a field via the column, because those got filtered out via 'hasIpv6Support' or in the initComponent you removed so the stray 'ip' comes from the overall store, not the columns (which get set in 'setValue') so this patch does two things here: it moves the removal of the ip column from the initcomponent to a config (which is fine IMO, but does not change the actual behavior) and it adds a manual filter in 'getValue' to skip the ip and ip6 field depending on this config -> this is what actually fixes the issue i think this should be split into two patch that reflect these two changes, with the proper commit messages. (though we can do it in one commmit, but then the message must explain the issue properly) the code itself LGTM On 6/3/26 5:54 PM, Lukas Sichert wrote: > BGP unnumbered interfaces have neither IPv4 nor IPv6 addresses, but the > base interface panel always added the IPv4 column and only allowed child > panels to disable IPv6. This meant BGP still exposed an IPv4 field and > would also serialize existing IPv4 and IPv6 data from the node interface > record. When submitting such an interface, the backend rejects the > unsupported property with: 'format error interfaces[0].ip: property is > not defined in schema' > > Add a 'hasIpv4Support' flag matching the existing IPv6 handling and use > both support flags to skip unsupported IP columns and properties during > serialization. > > Signed-off-by: Lukas Sichert > --- > www/manager6/sdn/fabrics/InterfacePanel.js | 37 ++++++++++++------- > .../sdn/fabrics/bgp/InterfacePanel.js | 11 +----- > 2 files changed, 24 insertions(+), 24 deletions(-) > > diff --git a/www/manager6/sdn/fabrics/InterfacePanel.js b/www/manager6/sdn/fabrics/InterfacePanel.js > index f07e7859..e325340f 100644 > --- a/www/manager6/sdn/fabrics/InterfacePanel.js > +++ b/www/manager6/sdn/fabrics/InterfacePanel.js > @@ -6,6 +6,7 @@ Ext.define('PVE.sdn.Fabric.InterfacePanel', { > > nodeInterfaces: {}, > > + hasIpv4Support: true, > hasIpv6Support: true, > > selModel: { > @@ -59,19 +60,6 @@ Ext.define('PVE.sdn.Fabric.InterfacePanel', { > dataIndex: 'type', > flex: 1, > }, > - { > - text: gettext('IPv4'), > - xtype: 'widgetcolumn', > - dataIndex: 'ip', > - flex: 1, > - widget: { > - xtype: 'proxmoxtextfield', > - isFormField: false, > - bind: { > - disabled: '{record.isDisabled}', > - }, > - }, > - }, > ], > > additionalColumns: [], > @@ -112,6 +100,23 @@ Ext.define('PVE.sdn.Fabric.InterfacePanel', { > > let columns = [...me.commonColumns]; > > + > + if (me.hasIpv4Support) { > + columns.push({ > + text: gettext('IPv4'), > + xtype: 'widgetcolumn', > + dataIndex: 'ip', > + flex: 1, > + widget: { > + xtype: 'proxmoxtextfield', > + isFormField: false, > + bind: { > + disabled: '{record.isDisabled}', > + }, > + }, > + }); > + } > + > if (me.hasIpv6Support) { > columns.push({ > text: gettext('IPv6'), > @@ -174,7 +179,11 @@ Ext.define('PVE.sdn.Fabric.InterfacePanel', { > continue; > } > > - if (['type', 'isDisabled'].includes(key)) { > + if ( > + ['type', 'isDisabled'].includes(key) || > + (key === 'ip' && !me.hasIpv4Support) || > + (key === 'ip6' && !me.hasIpv6Support) > + ) { > continue; > } > > diff --git a/www/manager6/sdn/fabrics/bgp/InterfacePanel.js b/www/manager6/sdn/fabrics/bgp/InterfacePanel.js > index c7ac7627..fd5e6f4b 100644 > --- a/www/manager6/sdn/fabrics/bgp/InterfacePanel.js > +++ b/www/manager6/sdn/fabrics/bgp/InterfacePanel.js > @@ -1,15 +1,6 @@ > Ext.define('PVE.sdn.Fabric.Bgp.InterfacePanel', { > extend: 'PVE.sdn.Fabric.InterfacePanel', > > + hasIpv4Support: false, > hasIpv6Support: false, > - > - // BGP unnumbered interfaces have no IP - override commonColumns to > - // exclude the IP column that the base class defines. > - initComponent: function () { > - let me = this; > - > - me.commonColumns = me.commonColumns.filter((col) => col.dataIndex !== 'ip'); > - > - me.callParent(); > - }, > });