all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: "DERUMIER, Alexandre" <alexandre.derumier@groupe-cyllene.com>
To: "pve-devel@lists.proxmox.com" <pve-devel@lists.proxmox.com>
Subject: Re: [pve-devel] [PATCH ifupdown2] patch: fix bond mac address at boot.
Date: Wed, 13 Sep 2023 18:10:53 +0000	[thread overview]
Message-ID: <6938365b87e0f5b9f081aab66863ed55beb285d8.camel@groupe-cyllene.com> (raw)
In-Reply-To: <20230901091231.155229-1-aderumier@odiso.com>

Hi,

is it possible to apply this patch ? (Just to avoid to forget it)

Thanks !

Alexandre

Le vendredi 01 septembre 2023 à 11:12 +0200, Alexandre Derumier a
écrit :
> since systemd v241, like for bridge, the bond mac is setup
> randomly at boot, instead inherit from first slave.
> 
> Then, on next ifreload, ifupdown2 was already fixing it,
> but with an down/up of the bond (with potentials impact on the
> network).
> 
> This patch have been sent upstream:
> https://antiphishing.cetsi.fr/proxy/v3?i=SXVFem5DOGVpUU1rNjdmQuxbAYzjRE578NJDXO0bRW0&r=bWt1djZ5QzcyUms5R1NzatwXz4Bu0iVoewR0TMqOYj2TEaWUEW6ErR0jSEGeptkpQiTgSpOogUpk-nmOcZSjcw&f=Q3ZQNmU2SnpsRFlRbUF3dmj8RjqNbw-iHBi50S-iFw7wq1QYxMyfpOzIpg23W0yvT_m-5a44zDEurFGuVbLSbw&u=https%3A//github.com/CumulusNetworks/ifupdown2/pull/270&k=syJL
> 
> This patch is applying fine too for ifupdown2 for proxmox7
> 
> ---
>  debian/patches/series                         |  1 +
>  .../patches/upstream/0001-fix-bond-mac.patch  | 28
> +++++++++++++++++++
>  2 files changed, 29 insertions(+)
>  create mode 100644 debian/patches/upstream/0001-fix-bond-mac.patch
> 
> diff --git a/debian/patches/series b/debian/patches/series
> index 1ff8dd4..cff704f 100644
> --- a/debian/patches/series
> +++ b/debian/patches/series
> @@ -10,3 +10,4 @@ pve/0009-gvgeb-fix-python-interpreter-shebang.patch
>  upstream/0001-add-ipv6-slaac-support-inet6-auto-accept_ra.patch
>  upstream/0001-addons-ethtool-add-rx-vlan-filter.patch
>  upstream/0001-scheduler-import-traceback.patch
> +upstream/0001-fix-bond-mac.patch
> \ No newline at end of file
> diff --git a/debian/patches/upstream/0001-fix-bond-mac.patch
> b/debian/patches/upstream/0001-fix-bond-mac.patch
> new file mode 100644
> index 0000000..79688ac
> --- /dev/null
> +++ b/debian/patches/upstream/0001-fix-bond-mac.patch
> @@ -0,0 +1,28 @@
> +From 062c3a6707b22cf7494bbf0ccb8ea6559dc334df Mon Sep 17 00:00:00
> 2001
> +From: Alexandre Derumier <alexandre.derumier@groupe-cyllene.com>
> +Date: Fri, 1 Sep 2023 09:43:05 +0200
> +Subject: [PATCH] bond: fix mac-address on create with first slave
> mac
> +
> +since systemd v241, bond (like bridge), are create with a random mac
> +instead their first slave.
> +
> +We already fixing it for bond on reload, but not at create
> +
> +Than mean that on first reload, we'll always ifdown/ifup interface
> and change mac.
> +---
> + ifupdown2/addons/bond.py | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/ifupdown2/addons/bond.py b/ifupdown2/addons/bond.py
> +index 74d2cab5..5e77e1b0 100644
> +--- a/ifupdown2/addons/bond.py
> ++++ b/ifupdown2/addons/bond.py
> +@@ -884,7 +884,7 @@ def _up(self, ifaceobj, ifaceobj_getfunc=None):
> +                 ifaceobj_getfunc,
> +             )
> + 
> +-            if not self.bond_mac_mgmt or not link_exists or
> ifaceobj.get_attr_value_first("hwaddress"):
> ++            if not self.bond_mac_mgmt or
> ifaceobj.get_attr_value_first("hwaddress"):
> +                 return
> + 
> +             # check if the bond mac address is correctly inherited
> from it's


  reply	other threads:[~2023-09-13 18:11 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-01  9:12 Alexandre Derumier
2023-09-13 18:10 ` DERUMIER, Alexandre [this message]
2023-09-15 14:21 ` [pve-devel] applied: " Thomas Lamprecht
2023-10-19  8:53 ` [pve-devel] " Thomas Lamprecht
2023-10-19  9:39   ` DERUMIER, Alexandre
2023-11-15  6:12   ` DERUMIER, Alexandre
2023-11-15 10:37     ` 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=6938365b87e0f5b9f081aab66863ed55beb285d8.camel@groupe-cyllene.com \
    --to=alexandre.derumier@groupe-cyllene.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