public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>,
	Alexandre Derumier <aderumier@odiso.com>
Subject: Re: [pve-devel] [PATCH ifupdown2 2/2] patch: add vlan interface ifdown/ifup when changes on reload, like for vxlan
Date: Sat, 22 Apr 2023 09:03:28 +0200	[thread overview]
Message-ID: <a1d2c6a6-7174-9f02-cffe-9b2ebc9b54ae@proxmox.com> (raw)
In-Reply-To: <20230420213711.687478-3-aderumier@odiso.com>

On 20/04/2023 23:37, Alexandre Derumier wrote:
> Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
> ---
>  ...-down-up-vxlan-interfaces-when-ifreload_down.patch | 11 +++++++----
>  1 file changed, 7 insertions(+), 4 deletions(-)
> 
> diff --git a/debian/patches/pve/0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch b/debian/patches/pve/0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch
> index c9964af..63494c9 100644
> --- a/debian/patches/pve/0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch
> +++ b/debian/patches/pve/0005-ifreload-down-up-vxlan-interfaces-when-ifreload_down.patch
> @@ -1,13 +1,16 @@
>  From 2c38d0a157c8946f35a7da1c7c05484d33e6986f Mon Sep 17 00:00:00 2001
>  From: Alexandre Derumier <aderumier@odiso.com>
>  Date: Wed, 5 Jun 2019 14:47:05 +0200
> -Subject: [PATCH 6/7] ifreload: down/up vxlan interfaces when
> +Subject: [PATCH 6/7] ifreload: down/up vxlan && vlan interfaces when
>   ifreload_down_changed=0
>  
>  almost all attributes of vxlan interfaces can't be updated
> -in current kernel (<= 5.2). (including vxlan-id)
> +(including vxlan-id).
>  
> -so when ifreload_down_changed=0, ifreload can't update vxlan.
> +Same for vlan interfaces (vlan-protocol, vlan-id)
> +
> +so when ifreload_down_changed=0, ifreload can't update vxlan or vlan
> + attributes.
>  
>  fix: https://github.com/CumulusNetworks/ifupdown2/issues/50
>  Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
> @@ -25,7 +28,7 @@ index b4e1864..9313573 100644
>                                           ifaceLinkKind.to_str(lastifaceobjlist[0].link_kind)))
>                       ifacedownlist.append(newifaceobjlist[objidx].name)
>  -                if not down_changed:
> -+                if not down_changed and ifaceLinkKind.to_str(lastifaceobjlist[0].link_kind) != 'vxlan':
> ++                if not down_changed and ifaceLinkKind.to_str(lastifaceobjlist[0].link_kind) != 'vxlan' and ifaceLinkKind.to_str(lastifaceobjlist[0].link_kind) != 'vlan':

style nit: could be slightly nicer if we pull out the link_kind
into an intermediate variable, i.e., something like:

link_kind = ifaceLinkKind.to_str(lastifaceobjlist[0].link_kind)

if not down_changed and link_kind != 'vxlan' and link_kind != 'vlan':

>                       continue
>                   if len(newifaceobjlist) != len(lastifaceobjlist):
>                       ifacedownlist.append(ifname)





  reply	other threads:[~2023-04-22  7:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 21:37 [pve-devel] [PATCH ifupdown2 0/2] fix #4683 : fix reload of vlan interfaces when attribute change Alexandre Derumier
2023-04-20 21:37 ` [pve-devel] [PATCH ifupdown2 1/2] patch : vlan: fix vlan-protocol query check Alexandre Derumier
2023-04-20 21:37 ` [pve-devel] [PATCH ifupdown2 2/2] patch: add vlan interface ifdown/ifup when changes on reload, like for vxlan Alexandre Derumier
2023-04-22  7:03   ` Thomas Lamprecht [this message]
2023-04-22  7:01 ` [pve-devel] applied: Re: [PATCH ifupdown2 0/2] fix #4683 : fix reload of vlan interfaces when attribute change 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=a1d2c6a6-7174-9f02-cffe-9b2ebc9b54ae@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=aderumier@odiso.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal