I also confirmed the fix using systemd 249.11-0ubuntu3.8 from jammy-
proposed:

$ apt-cache policy systemd
systemd:
  Installed: 249.11-0ubuntu3.8
  Candidate: 249.11-0ubuntu3.8
  Version table:
 *** 249.11-0ubuntu3.8 500
        500 http://archive.ubuntu.com/ubuntu jammy-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     249.11-0ubuntu3.7 500
        500 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages
     249.11-0ubuntu3 500
        500 http://archive.ubuntu.com/ubuntu jammy/main amd64 Packages
$ cat /etc/systemd/network/10-vlan18.netdev 
[NetDev]
Name=vlan18
Kind=vlan

[VLAN]
Id=18
$ cat /etc/systemd/network/20-vlan18.network 
[Match]
Name=vlan18

[Network]
Address=10.10.1.1/24

[Link]
ActivationPolicy=manual
$ cat /etc/systemd/network/30-ens3.network 
[Match]
Name=ens3

[Network]
DHCP=ipv4
VLAN=vlan18
$ ip a show vlan18
3: vlan18@ens3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group 
default qlen 1000
    link/ether 52:54:00:c6:8b:40 brd ff:ff:ff:ff:ff:ff

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

Title:
  systemd-networkd: ActivationPolicy ignored in VLANs

Status in systemd package in Ubuntu:
  Fix Released
Status in systemd source package in Jammy:
  Fix Committed
Status in systemd source package in Kinetic:
  Fix Released

Bug description:
  [Impact]

  The ActivationPolicy property in .network files is ignored for VLANs.

  [Test Plan]

  * On a Jammy machine with an interface named ens3, create the
  following configs:

  $ cat > /etc/systemd/network/10-vlan18.netdev << EOF
  [NetDev]
  Name=vlan18
  Kind=vlan

  [VLAN]
  Id=18
  EOF

  $ cat > /etc/systemd/network/20-vlan18.network << EOF
  [Match]
  Name=vlan18

  [Network]
  Address=10.10.1.1/24

  [Link]
  ActivationPolicy=manual
  EOF

  $ cat > /etc/systemd/network/30-ens3.network << EOF
  [Match]
  Name=ens3

  [Network]
  DHCP=ipv4
  VLAN=vlan18
  EOF

  * Reboot the machine
  * On an affected machine, the vlan18@ens3 interface will have a configured IP 
at boot, despite the ActivationPolicy=manual setting in 
/etc/systemd/network/20-vlan18.network. On a patched machine, the interface 
should not have a configured IP.

  [Where problems could occur]

  The patch adds a condition where a netdev is not yet ready to be
  created. Specifically, it makes sure stacked netdevs are not created
  before their underlying link is activated. If we saw any problems, it
  would be related to netdev creation.

  [Original Description]

  This has been fixed upstream, see

  Upstream bug: https://github.com/systemd/systemd/issues/22593

  Any chance of a backport of the fix to 22.04?

  Fix: https://github.com/systemd/systemd-stable/pull/211

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