[Bug 1982855] Re: ubuntu-desktop-installer: cloud-init not configured to use network-manager resulting in unread /etc/netplan/50-cloud-init.yaml

Dan Bungert 1982855 at bugs.launchpad.net
Fri Apr 7 22:32:59 UTC 2023


** Also affects: livecd-rootfs (Ubuntu)
   Importance: Undecided
       Status: New

** Changed in: livecd-rootfs (Ubuntu)
       Status: New => Fix Released

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to livecd-rootfs in Ubuntu.
https://bugs.launchpad.net/bugs/1982855

Title:
  ubuntu-desktop-installer: cloud-init not configured to use network-
  manager resulting in unread /etc/netplan/50-cloud-init.yaml

Status in livecd-rootfs:
  New
Status in livecd-rootfs package in Ubuntu:
  Fix Released

Bug description:
  In this ephemeral install environment, the Ubuntu desktop installer
  prefers to setup NetworkManager for network configuration due to the
  file

  affects:
     ubuntu-deskstop-installer version 0+git.74cbf061 revision 560

  
  cat /etc/netplan/01-network-manager-all.yaml:
  # Let NetworkManager manage all devices on this system
  network:
    version: 2
    renderer: NetworkManager

  But cloud-init package default configuration sets network renderers to
  netplan:

  grep -B 1 renderers /etc/cloud/cloud.cfg
    network:
      renderers: ['netplan', 'eni', 'sysconfig']

  This results in cloud-init writing discovered network configuration to
  netplan files which will not be applied to the ephemeral system during
  boot via custom kernel commandline parameters which will break some
  potential custom install paths or cloud-init datasource overrides in
  the emphemeral desktop install environment.

  You can see cloud-init trying to render netplan files by default in /var/log/cloud-init.log:
  egrep 'netplan|network-manager' /var/log/cloud-init.log
  ...
  2022-07-26 15:43:12,972 - __init__.py[DEBUG]: Selected renderer 'netplan' from priority list: ['netplan', 'eni', 'sysconfig']
  2022-07-26 15:43:12,972 - netplan.py[DEBUG]: V2 to V2 passthrough
  2022-07-26 15:43:12,972 - util.py[DEBUG]: Writing to /etc/netplan/50-cloud-init.yaml - wb: [644] 491 bytes
  2022-07-26 15:43:12,972 - subp.py[DEBUG]: Running command ['netplan', 'generate'] with allowed return codes [0] (shell=False, capture=True)
  2022-07-26 15:43:26,106 - __init__.py[DEBUG]: Selected renderer 'netplan' from priority list: ['netplan', 'eni', 'sysconfig']
  2022-07-26 15:43:26,106 - netplan.py[DEBUG]: V2 to V2 passthrough
  2022-07-26 15:43:26,107 - util.py[DEBUG]: Writing to /etc/netplan/50-cloud-init.yaml - wb: [644] 491 bytes
  2022-07-26 15:43:26,107 - subp.py[DEBUG]: Running command ['netplan', 'generate'] with allowed return codes [0] (shell=False, capture=True)
  2022-07-26 15:43:26,166 - activators.py[DEBUG]: Attempting command ['netplan', 'apply'] for device all
  2022-07-26 15:43:26,166 - subp.py[DEBUG]: Running command ['netplan', 'apply'] with allowed return codes [0] (shell=False, capture=True)
  ...

  Since Desktop ephemeral environment prefers NetworkManager to render
  network, it should  change the default network renderers configured
  for cloud-init with a supplemental cloud config file

  cat > /etc/cloud/cloud.cfg.d/99-installer-use-networkmanager.cfg <<EOF
  system_info:
    network:
      renderers: ['network-manager']
  EOF

To manage notifications about this bug go to:
https://bugs.launchpad.net/livecd-rootfs/+bug/1982855/+subscriptions




More information about the foundations-bugs mailing list