Digging even further back, it turns out that IFDOWN is in itself a
workaround for an equal issue dating back to ~2012. As such, the core of
the issue lies with how initramfs network setup overrides netplan.
Adding that package.

Given the very limited setup /etc/initramfs-tools/initramfs.conf allows
(including the DHCP default mentioned in the description), there is a
case to be made for allowing admins to rely on the full config rather
than initramfs for their network setup.

** Also affects: initramfs-tools (Ubuntu)
   Importance: Undecided
       Status: New

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

Title:
  DROPBEAR_IFDOWN=* takes interface down but leaves netplan config

Status in dropbear package in Ubuntu:
  Confirmed
Status in initramfs-tools package in Ubuntu:
  New

Bug description:
  On bionic, setting the network interface up (e.g. eno1) with DHCP now
  causes a /run/netplan/eno1.yaml and a /run/net-eno1.conf file to be
  written. The former gets imported by netplan after boot and causes the
  DHCP lease from the initrd to be around forever, which I think goes
  against the intent of DROPBEAR_IFDOWN=*.

  I have brewed up a workaround script that lives in /etc/initramfs-
  tools/scripts/init-bottom/hack-delete-netif-netplan.sh for now:

  
  #### ---- 8< cut >8 --------
  #!/bin/sh

  PREREQ=""

  prereqs() {
          echo "$PREREQ"
  }

  case "$1" in
          prereqs)
                  prereqs
                  exit 0
          ;;
  esac

  . /scripts/functions

  log_begin_msg "Deleting all network configuration that systemd could try to 
import"
  rm /run/net-*.conf
  rm /run/netplan/*.yaml
  log_end_msg
  #### ---- 8< cut >8 --------

  I think that dropbear-intiramfs's init-bottom script should do this in
  addition to downing the interfaces that it finds via the
  DROPBEAR_IFDOWN pattern. Do you agree?

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