← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2015605] Re: desktop live installer: cloud-init/ubuntu-desktop-installer network config naming collisions

 

This bug was fixed in the package livecd-rootfs - 2.821

---------------
livecd-rootfs (2.821) lunar; urgency=medium

  [ Chad Smith ]
  * desktop livecd: allow cloud-init to write netplan config instead of
    directly to /etc/NetworkManager because ubuntu-desktop-installer
    will write netplan config in ephemeral boot stage when
    autoinstall.network is provided. This allows ubuntu-desktop-installer
    to control all netplan config written and apply to the ephemeral boot
    as generated from /etc/netplan/*. (LP: #2015605)

  [ Dan Bungert ]
  * d/control: fix uninstallability of livecd-rootfs due to rsync not being on
    i386.

 -- Dan Bungert <daniel.bungert@xxxxxxxxxxxxx>  Fri, 07 Apr 2023
17:24:28 -0600

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

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/2015605

Title:
  desktop live installer: cloud-init/ubuntu-desktop-installer network
  config naming collisions

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

Bug description:
  Seen on live desktop isos build date:
  $ cat /cdrom/.disk/info
  Ubuntu 23.04 "Lunar Lobster" - Dail amd64 (20230407)
  $ snap list ubuntu-desktop-installer
  Name                      Version         Rev  Tracking         Publisher   Notes
  ubuntu-desktop-installer  0+git.f46d534e  922  latest/stable/…  canonical✓  classic

  
  Desktop live installer prefers NetworkManager backend for network config due to a netplan config file /etc/netplan/01-network-manager.yaml which contains:

  network:
    version: 2
    renderer: NetworkManager

  livecd-rootfs configures cloud-init to write directly to /etc/NetworkManager/system-connections when discovering network due to a config snippet at
  /etc/cloud/cloud.cfg.d/99-installer-use-networkmanager.cfg which sets cloud-init to write directly to /etc/NetworkManager/system-connections with this config:
  # Automatically generated by installer build process
  system_info:
    network:
      renderers: ['network-manager']
      activators: ['network-manager']

  -
  This tells cloud-init to write out /etc/NetworkManager/system-connections/cloud-init-enp1s0.nmconnection directly.

  Later Ubuntu-desktop-installer(subiquity) starts, it may set network
  config and write it to /etc/netplan/00-installer.yaml and trigger a
  'netplan apply'.

  If there is a non-empty netplan config at this time, subiquity writes
  out /etc/netplan/00-installer.yaml and renames any other existing
  netplan yaml files to /etc/netplan/*.yaml.dist-subiquity.

  Then subiquity(ubuntu-desktop-installer)  invokes netplan apply to
  render all applicable network config to the ephemeral (installer)
  environment.

  When netplan is rendering to `backend: NetworkManager` instead of the
  default networkd and it'll write
  /etc/NetworkManager/netplan-*.nmconnection files with connection names
  scoped under `netplan-`. Cloud-init's rendered connections are scoped
  under `cloudinit-`. This results in a split brain problem where
  cloudinit's configuration and netplan's configuration are not aware of
  each other and netplan isn't aware of any pre-existing
  /etc/NetworkManager artifacts. We then have conflicting nm connections
  being defined and named for the same underlying network interfaces.
  This results in inability to run: nmcli load
  /etc/NetworkManager/system-connections/cloud-init-enp1s0.nmconnection
  with errors such as "unknown connection" or "ipv4.gateway: gateway
  cannot be set if there are no addresses configured"

  Ideally we probably want both cloud-init and subiquity to be
  configuring network in netplan config files so that any merged network
  config is well known by netplan and results in a single source of
  truth for network config.

  This may mean dropping the overrides provided by livecd-roots setting
  cloud-init to render directly to network-manager.

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/2015605/+subscriptions



References