persistent rather than run-time configuration (Netplan everywhere)

Bug #1985994 reported by ShiftPlusOne
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Netplan
Fix Released
High
Unassigned

Bug Description

Hello,

I'm looking into adding cloud-init support for Raspberry Pi OS and running into some issues.

We're going to be using NetworkManager and it looks like WLAN configuration for NM can only be done through netplan. However, the .nmconnection files generated by netplan end up in /run and re-generated on every boot.

That's great for server use, but on the desktop, I foresee some issues. If a user modifies or removes a connection using any of the standard tools, these changes are lost on reboot. If the netplan files are generated by rpi-imager, the user might not be aware of what cloud-init, netplan or YAML files are.

Are there any plans to support persistent connections in /etc that are only generated once?

Revision history for this message
Lukas Märdian (slyon) wrote :

That's true. NetworkManager .nmconnection proflies are generated in /run by netplan. Still, the netplan configuration files are available in /etc/netplan/*.yaml and could be modified by the user to preserve a configuration across reboots.

Using standard tools (like nmcli, or NM gui), could lead to conflicts, though, as the same connection would then be defined by a NM controlled profile in /etc/NetworkManager/system-connections/*.nmconnection and netplan controlled connection in /etc/netplan/*.yaml -> /run/NetworkManager/system-connections/10-netplan-*.nmconnection

We have a longer term effort (called "Netplan everywhere") of tightly integrating NetworkManager and netplan, so that configuration changes made through NetworkManager tooling (GUI/CLI/DBus), would be reflected in /etc/netplan/ and thus be re-generated on reboot. But still way to go to get this fully implemented.

As a short term workaround, you might be able to directly write a *.nmconnection profile into /etc/NetworkManager/system-connections/ via cloud-init, e.g.: https://cloudinit.readthedocs.io/en/latest/topics/examples.html#writing-out-arbitrary-files

Changed in netplan:
status: New → Triaged
importance: Undecided → High
summary: - persistent rather than run-time configuration
+ persistent rather than run-time configuration (Netplan everywhere)
tags: added: fr-2097
Revision history for this message
ShiftPlusOne (schneiderit) wrote :

Sounds like "Netplan everywhere" will be the solution then. Many thanks!

And thanks for the suggested workarounds.

Revision history for this message
Lukas Märdian (slyon) wrote :
Lukas Märdian (slyon)
tags: added: netplan-everywhere
Revision history for this message
Lukas Märdian (slyon) wrote :

This integration is enabled in Mantic's NetworkManager as of: https://launchpad.net/ubuntu/+source/network-manager/1.42.4-1ubuntu3

Changed in netplan:
status: Triaged → Fix Committed
Lukas Märdian (slyon)
Changed in netplan:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.