** Merge proposal linked:
   
https://code.launchpad.net/~joalif/ubuntu/+source/systemd/+git/systemd/+merge/476130

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to systemd in Ubuntu.
https://bugs.launchpad.net/bugs/2003250

Title:
  networkctl reload with bond devices causes slaves to go DOWN and UP,
  causing couple of seconds of network loss

Status in systemd package in Ubuntu:
  Fix Released
Status in systemd source package in Jammy:
  Triaged
Status in systemd source package in Kinetic:
  Won't Fix

Bug description:
  [SRU TEMPLATE]

  [DESCRIPTION]

  We currently use Ubuntu 22.04.1 LTS including updates for our production 
cloud (switched from legacy Centos 7).
  Although we like the distribution we recently hit serious systemd buggy 
behavior described in [1] bugreport using packages [2].

  Unfortunatelly the clouds we are running consist of openstack on top
  of kubernetes and we need to have complex network configuration
  including linux bond devices.

  Our observation is that every time we apply our configuration via
  CI/CD infrastructure using ansible and netplan (regardless whether
  there is actual network configuration change) we see approximatelly
  8-16 seconds network interruptions and see bond interfaces going DOWN
  and then UP.

  We expect bond interfaces stay UP when there is no network
  configuration change.

  We went though couple of options how to solve the issue and the first
  one is to add such existing patch [3] into current
  systemd-249.11-0ubuntu3.6.

  Could you comment whether this kind of non-security patch is likely to land 
in 22.04.1 LTS soon.
  We are able to help to bring patch into systemd package community way if you 
suggest the steps.

  [TESTING]

  Setup a jammy vm with a bond interface.
  Then:

  # touch /run/systemd/network/*
  # networkctl reload

  You can see in the logs the interfaces of the bond going up and down.
  With the fix they don't.

  [REGRESSION POTENTIAL]

  This patch modifies the behaviour of link_is_ready_to_call_set_link in
  case we have a bond interface. Therefore, things could go wrong for
  bonded interfaces.

  [OTHER]

  Fix upstream commit 9f913d37a01f71e559d099bff280.
  The fix was introduced upstream in v253.
  Jammy systemd is based on v249. Backporting is required.

  This patch modifies 2 functions in src/network/networkd-setlink.c:
  link_is_ready_to_call_set_link (hunk 1) and request_process_set_link (hunk 2).

  The way the fix is implemented is by modifing link_is_ready_to_set_link in 
the case
  the request type is SET_LINK_MASTER. In this case, it checks if the requested 
master is
  already set and if so it returns -EALREADY.
  The -EALREADY is returned to request_process_set_link which in turns cancels 
the request
  (does not go ahead to configure the link).

  Backport details
  Hunk 1:
  - change return type of link_is_ready_to_call_set_link from bool to int 
(since now return -EALREADY apart from 0,1).

  - In the original patch the check if the master is already set happens in the 
switch-case REQUEST_TYPE_SET_LINK_MASTER
  and it works fine. However, if we place the check in the equivalent place in 
jammy-systemd it causes regressions.
  For example in my setup, I have 2 interfaces in a bond, plus a third one.
  The problem I observed is that in jammy-systemd the code path (switch-case 
SET_LINK_MASTER) is also exercised by the
  third interface it returns -EALREADY and leaves it unconfigured.
  This does not seem to happen in v253.
  I guess the reason for this is that the implementation of the 'queue' that 
processes the requests has changed between v249 and v253.
  To overcome this I've restricted the check 'if master is already set' only in 
case we have a bond.

  Hunk 2:
  -adjust context

  I've run autopkgtests locally and it fails only one test, but this
  test fails even without the patch.

  [1] https://github.com/systemd/systemd/issues/25067
  [2] Packages
  root@controlplane-001:/etc/apt0# apt list | grep -E '^(systemd/|netplan.io)'
  netplan.io/jammy-updates,now 0.105-0ubuntu2~22.04.1 amd64 
[installed,automatic]
  systemd/jammy-updates,now 249.11-0ubuntu3.6 amd64 [installed,automatic]
  [3] https://github.com/systemd/systemd/pull/25162
  [4] # lsb_release -rd
  Description:    Ubuntu 22.04.1 LTS
  Release:        22.04

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2003250/+subscriptions


-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : touch-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to