The Netplan Everywhere NetworkManager fails to supply Netplan with networking information until a connection is deleted and re-created

Bug #2010561 reported by Aaron Rainbolt
This bug affects 1 person
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Fix Released
Lukas Märdian

Bug Description

Steps to reproduce:

1. Install Ubuntu Lunar or a flavor thereof onto physical hardware with a WiFi adapter. (I used Lubuntu Lunar.)
2. Connect to WiFi and install all updates.
3. Enable the Netplan Everywhere PPA and install the updated NetworkManager from it (further details at
4. When the installation finishes, run "sudo netplan get".

Expected result: Networking information related to the WiFi connection should appear in the "sudo netplan get" output.

Actual result: "sudo netplan get" returns the following:

    ** (process:4088): WARNING **: 12:41:41.394; Permissions for /etc/netplan/01-network-manager-all.yaml are too open. Netplan configuration should NOT be accessible by others.
      version: 2
      renderer: NetworkManager

End of output. Additionally, the /etc/netplan folder does not contain files that I would expect to be there that would contain the networking info.

Additional information:

If I disconnect from WiFi, then delete my WiFi connection entirely in nmtui, and *then* reconnect to the same WiFi network, "sudo netplan get" returns the expected networking information. /etc/netplan is also properly populated after doing this.

This bug seems like it will probably cause unintended behavior after an upgrade from 23.04 (which uses normal NetworkManager) to 23.10 (which is supposed to be using the Netplan Everywhere NetworkManager). People probably won't know to entirely delete the WiFi and other connections and then reconnect them in order for the netplan output to be usable.

Related branches

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

Hi Aaron, thank you very much for testing and spotting this "issue".
What you see is currently the "expected behavior", as described in

I.e. connection profiles not being imported into /etc/netplan by default (on installation), but only once (re-)created or modified through NetworkManager.

But maybe it's not the way that users would intuitively expect it to be and the NetworkManager package should automatically re-create and import all current connection profiles from /etc/NetworkManager/system-connections/ into /etc/netplan on installation time.

Changed in netplan:
status: New → Triaged
importance: Undecided → Medium
tags: added: netplan-everywhere
Revision history for this message
Lukas Märdian (slyon) wrote (last edit ):

Maybe something like this pseudo-code in network-manager preinst maintainer script:

foreach UUID in $(cat /etc/NetworkManager/system-connections/* | grep "^uuid=")
  ORIG_ID=$(nmcli --get-values con show $UUID)
  nmcli con mod $UUID con-name $ORIG_ID".NETPLAN"
  nmcli con reload
  nmcli con mod $UUID con-name $ORIG_ID

While on it, we should probably also make the network-manager package install a /etc/NetworkManager/system-connections/README file after migration, which states that the existing connection profiles have been migrated to /etc/netplan (and where a backup can be found).

Lukas Märdian (slyon)
Changed in network-manager (Ubuntu):
status: New → In Progress
assignee: nobody → Lukas Märdian (slyon)
Revision history for this message
Lukas Märdian (slyon) wrote :
Revision history for this message
Lukas Märdian (slyon) wrote :

Merged. This fix should land in the "Netplan Everywhere" PPA today (for Lunar):

Changed in network-manager (Ubuntu):
status: In Progress → Fix Committed
Changed in netplan:
status: Triaged → Invalid
Lukas Märdian (slyon)
Changed in network-manager (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Simon Déziel (sdeziel) wrote (last edit ):

@slyon I saw that requires the `file` package to be available. Some systems don't have installed, albeit probably not common on desktops but I though I'd mention just in case.

That same commit also seem to have a bogus error handling if `nm-online -qs` fails:

nm-online -qs || (echo "SKIP: NetworkManager is not ready ..." 1>&2 && continue)

The `continue` will be run in the `()` subshell. I think this could be fixed by using `{}` instead.

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

Thanks Simon, those are two good catches!

The "file" package/command is seeded in the Ubuntu desktop flavours:
$ seeded-in-ubuntu file
file (from file) is seeded in:
  edubuntu: daily-live
  kubuntu: daily-live
  lubuntu: daily-live
  ubuntu-budgie: daily-legacy, daily-live
  ubuntu-mate: daily-live
  ubuntu-server: daily-live, daily-preinstalled
  ubuntu-unity: daily-live
  ubuntu: daily-canary, daily-legacy, daily-live, daily-preinstalled
  ubuntucinnamon: daily-live
  ubuntukylin: daily-live
  ubuntustudio: dvd
  xubuntu: daily-live, daily-minimal

The subshell issue should be fixed with this commit:

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.