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 8A0361FF183 for ; Wed, 30 Jul 2025 18:37:49 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id EA50614F69; Wed, 30 Jul 2025 18:39:13 +0200 (CEST) From: Stefan Hanreich To: pve-devel@lists.proxmox.com Date: Wed, 30 Jul 2025 18:39:08 +0200 Message-ID: <20250730163910.412108-1-s.hanreich@proxmox.com> X-Mailer: git-send-email 2.47.2 MIME-Version: 1.0 X-SPAM-LEVEL: Spam detection results: 0 AWL -0.194 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 KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods 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. RDNS_NONE 0.793 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [bridge.py] Subject: [pve-devel] [PATCH ifupdown2 1/1] d/patches: fix issue when reloading bonds with altname slaves X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" When reloading the network configuration via ifupdown2 and a bond has bridge-slaves defined with their altname, the bond would break after reloading - then work again after every second reload. The issue for this is that the port list is parsed directly via parse_port_list, provided by the modulebase. This method doesn't do any translation of altnames. This leads to a wrong detection of pre-existing slave interfaces when reloading. ifupdown then tries to enslave the interfaces with the 'real' name and un-enslave the interfaces with the altname, leading to no interfaces being enslaved to the bond at all. Signed-off-by: Stefan Hanreich --- Notes: Might want to hold off on applying this one until Christoph could take a closer look. While I couldn't find issues with bridge_ports and VLAN devices in my tests, both modules also use parse_port_list so I think a closer look is warranted as well for those invocations. This solves the bond issue on my test node at least. ...r-addons-add-transparent-support-interface-a.patch | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/debian/patches/pve/0011-nlmanager-addons-add-transparent-support-interface-a.patch b/debian/patches/pve/0011-nlmanager-addons-add-transparent-support-interface-a.patch index 5a67c6a..5c8fe18 100644 --- a/debian/patches/pve/0011-nlmanager-addons-add-transparent-support-interface-a.patch +++ b/debian/patches/pve/0011-nlmanager-addons-add-transparent-support-interface-a.patch @@ -51,6 +51,17 @@ index 2af5cf6..ef6d37a 100644 def _is_bond(self, ifaceobj): # at first link_kind is not set but once ifupdownmain +@@ -301,6 +302,10 @@ + or ifaceobj.get_attr_value_first("bond-mode") \ + or self.get_bond_slaves(ifaceobj) + ++ def parse_port_list(self, ifacename, port_expr, ifacenames=None): ++ port_list = super().parse_port_list(ifacename, port_expr, ifacenames) ++ return self.cache.link_translate_altnames(port_list) ++ + def get_dependent_ifacenames(self, ifaceobj, ifacenames_all=None, old_ifaceobjs=False): + """ Returns list of interfaces dependent on ifaceobj """ + diff --git a/ifupdown2/addons/bridge.py b/ifupdown2/addons/bridge.py index 87bcda9..1da8de7 100644 --- a/ifupdown2/addons/bridge.py -- 2.47.2 _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel