[Touch-packages] [Bug 2036358] Re: systemd wait-online now times out after jammy and lunar upgrade

2023-09-25 Thread pernacentus
Tested 249.11-0ubuntu3.11 on Ubuntu Server 22.04 (Jammy) and now I have no 
delay on boot.
Also the following command now returns immediately:
$ SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd-wait-online --timeout=10
Found link 9
Found link 8
Found link 7
Found link 6
Found link 5
Found link 4
Found link 3
Found link 2
Found link 1
enp4s0: link is ignored
eno1: link is ignored
enp3s0: link is ignored
enp5s0: link is ignored
lo: link is ignored
eno2: link is ignored
enp7s0: link is ignored
enp2s0: link is ignored
enp6s0: link is ignored

Thanks!

-- 
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/2036358

Title:
  systemd wait-online now times out after jammy and lunar upgrade

Status in systemd package in Ubuntu:
  Invalid
Status in systemd source package in Jammy:
  Fix Committed
Status in systemd source package in Lunar:
  Fix Committed

Bug description:
  [NOTE]

  If you are running a desktop system and you see this issue, you should
  run:

  $ systemctl disable --now systemd-networkd.service

  This will disable systemd-networkd and associated units, including
  systemd-networkd-wait-online.service. NetworkManager and systemd-
  networkd should not be running at the same time. On desktop,
  NetworkManager is the default network stack.

  [Impact]

  When all interfaces are "not required for online", e.g. when they are
  marked "optional: true" in netplan, systemd-networkd-wait-online will
  timeout. Or, in other words, systemd-networkd-wait-online will timeout
  even though all interfaces are ignored, hence none of them will ever
  be marked as "ready." Depending on what units depend on network-
  online.target, this can delay boot by 120 seconds (the default timeout
  for systemd-networkd-wait-online).

  [Test Plan]

  1. Create a new LXD container. These instructions assume jammy is the
  release, but the same can be done for lunar.

  $ lxc launch ubuntu-daily:jammy jammy
  $ lxc exec jammy bash

  2. Once in the container, modify the default /etc/netplan/10-lxc.yaml
  so that eth0 is configured with "optional: true":

  $ vi /etc/netplan/50-cloud-init.yaml # Use whatever editor you like
  $ cat /etc/netplan/50-cloud-init.yaml
  network:
    version: 2
    ethernets:
  eth0:
    dhcp4: true
    dhcp-identifier: mac
    optional: true

  3. Re-generate and apply the netplan configuration.

  $ netplan generate
  $ netplan apply

  4. Manually run systemd-networkd-wait-online, and observe that all
  links are ignored, and the command times out:

  $ SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-networkd-wait-online 
--timeout=10
  Found link lo(1)
  Found link eth0(19)
  lo: link is ignored
  eth0: link is ignored
  Timeout occurred while waiting for network connectivity.

  [Where problems could occur]

  This patch partially re-instates a patch remove in bug 1982218.
  However, instead of exiting if all links are unmanaged, we exit if all
  links are ignored in manager_configured(). If the patch was wrong, we
  may re-introduce bug 1982218, so as part of this SRU verification,
  that bug should be tested too. Any other regressions would also be
  related to systemd-networkd-wait-online behavior.

  [Original Description]

  On Ubuntu 22.04 desktop system using network-manager and upgrading to
  systemd 249.11-0ubuntu3.10, wait-online now times out which prevents
  logins (GDM, ssh, console) until it does time out. This seems to be
  introduced by the change for
  https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1982218.

  https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1982218/comments/21
  also mentioned the problem on Lunar.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2036358/+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


[Touch-packages] [Bug 2036358] Re: systemd wait-online now times out after jammy and lunar upgrade

2023-09-19 Thread pernacentus
It also affects Ubuntu Server 22.04 after updating to 249.11-0ubuntu3.10, since 
I'm on a headless server, I'm not using NetworkManager.
On boot systemd-networkd-wait-online hangs and fails after a timeout.

Here's my netplan configuration:



$ cat /etc/netplan/00-installer-config.yaml
# This is the network config written by 'subiquity'
network:
  ethernets:
enp2s0:
  addresses: [192.168.178.116/24]
  nameservers:
addresses: [1.1.1.1,1.0.0.1]
  routes:
- to: default
  via: 192.168.178.1
  dhcp4: false
  dhcp6: false
  optional: true
enp3s0:
  dhcp4: false
  dhcp6: false
  optional: true
enp4s0:
  dhcp4: false
  dhcp6: false
  optional: true
enp5s0:
  dhcp4: false
  dhcp6: false
  optional: true
enp6s0:
  dhcp4: false
  dhcp6: false
  optional: true
enp7s0:
  dhcp4: false
  dhcp6: false
  optional: true
  version: 2



cat /run/systemd/network/10-netplan-enp2s0.network



[Match]
Name=enp2s0

[Link]
RequiredForOnline=no

[Network]
LinkLocalAddressing=ipv6
Address=192.168.178.116/24
DNS=1.1.1.1
DNS=1.0.0.1

[Route]
Destination=0.0.0.0/0
Gateway=192.168.178.1

---

Other interfaces have also RequiredForOnline=no, hence they should be
ignored by systemd-networkd-wait-online and it should not hang at boot.

Also for me running SYSTEMD_LOG_LEVEL=debug /lib/systemd/systemd-
networkd-wait-online --timeout=5 --any yelds:

---

Found link 7
Found link 6
Found link 5
Found link 4
Found link 3
Found link 2
Found link 1
enp4s0: link is ignored
enp6s0: link is ignored
enp5s0: link is ignored
enp2s0: link is ignored
enp3s0: link is ignored
lo: link is ignored
enp7s0: link is ignored

---

-- 
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/2036358

Title:
  systemd wait-online now times out after jammy and lunar upgrade

Status in systemd package in Ubuntu:
  Confirmed

Bug description:
  On Ubuntu 22.04 desktop system using network-manager and upgrading to
  systemd 249.11-0ubuntu3.10, wait-online now times out which prevents
  logins (GDM, ssh, console) until it does time out. This seems to be
  introduced by the change for
  https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1982218.

  https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1982218/comments/21
  also mentioned the problem on Lunar.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/2036358/+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