all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Mira Limbeck <m.limbeck@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH ifupdown2] fix patch 0008-lacp: replace else with if condition
Date: Mon, 20 Nov 2023 13:52:08 +0100	[thread overview]
Message-ID: <20231120125208.496176-1-m.limbeck@proxmox.com> (raw)

The original patch removed the first branch of `if` condition, leaving the
`else` in which matched the `if` above.
The correct condition for this `else` is any bond mode that is not `lacp`
(4).

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
---
 ...bond-remove-bond-min-links-0-warning.patch | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/debian/patches/pve/0008-lacp-bond-remove-bond-min-links-0-warning.patch b/debian/patches/pve/0008-lacp-bond-remove-bond-min-links-0-warning.patch
index 089b315..07ed0b2 100644
--- a/debian/patches/pve/0008-lacp-bond-remove-bond-min-links-0-warning.patch
+++ b/debian/patches/pve/0008-lacp-bond-remove-bond-min-links-0-warning.patch
@@ -1,4 +1,4 @@
-From df1e76e6bcdca3044ee9d53ddb62a71bedf4b8a6 Mon Sep 17 00:00:00 2001
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
 From: Alexandre Derumier <aderumier@odiso.com>
 Date: Tue, 16 May 2023 00:33:36 +0200
 Subject: [PATCH] lacp bond: remove bond-min-links=0 warning
@@ -6,15 +6,17 @@ Subject: [PATCH] lacp bond: remove bond-min-links=0 warning
 This is only cumulus specific
 
 Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
+[ML: fixed condition of the remaining `else` branch]
+Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
 ---
- ifupdown2/addons/bond.py | 7 -------
- 1 file changed, 7 deletions(-)
+ ifupdown2/addons/bond.py | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
 
 diff --git a/ifupdown2/addons/bond.py b/ifupdown2/addons/bond.py
-index 74d2cab..4a555cc 100644
+index 74d2cab..e18fcbc 100644
 --- a/ifupdown2/addons/bond.py
 +++ b/ifupdown2/addons/bond.py
-@@ -610,13 +610,6 @@ class bond(Addon, moduleBase):
+@@ -610,14 +610,7 @@ class bond(Addon, moduleBase):
              # if we need to reset the mode to system default
              ifla_info_data[Link.IFLA_BOND_MODE] = ifla_bond_mode
  
@@ -25,9 +27,8 @@ index 74d2cab..4a555cc 100644
 -            # get_min_links_nl may return None so we need to strictly check 0
 -            if min_links == 0:
 -                self.logger.warning('%s: attribute bond-min-links is set to \'0\'' % ifname)
-         else:
+-        else:
++        if ifla_bond_mode != 4:
              # IFLA_BOND_AD_LACP_RATE and IFLA_BOND_AD_LACP_BYPASS only for 802.3ad mode (4)
              for nl_attr, attr_name in self._bond_lacp_attrs:
--- 
-2.30.2
-
+                 if nl_attr in ifla_info_data:
-- 
2.39.2




             reply	other threads:[~2023-11-20 12:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20 12:52 Mira Limbeck [this message]
2023-11-20 13:41 ` [pve-devel] applied: " Thomas Lamprecht

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=20231120125208.496176-1-m.limbeck@proxmox.com \
    --to=m.limbeck@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal