[Bug 2015605] Re: desktop live installer: cloud-init/ubuntu-desktop-installer network config naming collisions
Chad Smith
2015605 at bugs.launchpad.net
Fri Apr 7 22:13:42 UTC 2023
** Description changed:
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
+ 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
+ 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']
-
+ 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.
+ 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.
+ 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.
--
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/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:
New
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
More information about the foundations-bugs
mailing list