[Bug 2078009] Re: "netplan apply" not applying after cloud-init hotplug

Lukas Märdian 2078009 at bugs.launchpad.net
Wed Aug 28 16:08:07 UTC 2024


** Also affects: netplan.io (Ubuntu)
   Importance: Undecided
       Status: New

** Also affects: netplan.io (Ubuntu Oracular)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to netplan.io in Ubuntu.
Matching subscriptions: foundations-bugs
https://bugs.launchpad.net/bugs/2078009

Title:
  "netplan apply" not applying after cloud-init hotplug

Status in Netplan:
  New
Status in netplan.io package in Ubuntu:
  New
Status in netplan.io source package in Oracular:
  New

Bug description:
  When using cloud-init's network hotplug functionality on LXD, `netplan
  apply` will not bring up the new interface.

  Procedure using LXD:
  $ lxc network create my-eth2 --type=bridge ipv4.address=10.10.42.1/24 ipv4.nat=true
  $ cat > ./cloud-config.yaml << EOF
  #cloud-config
  updates:
    network:
      when: ["hotplug"]
  EOF

  $ cat > ./my-network-config.yaml << EOF
  version: 2
  ethernets:
      eth0:
          dhcp4: true
      eth2:
          dhcp4: true
  EOF

  $ lxc launch ubuntu-daily:oracular doh --config user.user-data="$(cat ./cloud-config.yaml)"
  $ lxc config set doh cloud-init.network-config="$(cat ./my-network-config.yaml)"  # Note that this must be after launch
  $ lxc config device add doh eth2 nic name=eth2 nictype=bridged parent=my-eth2
  $ lxc exec doh -- netplan status --all
  $ lxc exec doh -- netplan apply
  $ lxc exec doh -- netplan status --all

  On 1.0.1-1ubuntu2~22.04.1, eth2 comes up when the new nic is added.

  On 1.1-1, eth2 does not come up and `netplan apply` will not bring it up.
  However, a reboot or `networkctl reload` does bring it up.

To manage notifications about this bug go to:
https://bugs.launchpad.net/netplan/+bug/2078009/+subscriptions




More information about the foundations-bugs mailing list