Specifying NetworkManager renderer per-interface doesn't work for ethernet interfaces

Bug #1753860 reported by Daniel Axtens
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Netplan
In Progress
Undecided
Unassigned

Bug Description

I tried to use NetworkManager with the following file:

network:
    version: 2
    ethernets:
        eth0:
           renderer: NetworkManager
           addresses: ["fd8f:1d7d:b141::3/64"]
           gateway6: "fd8f:1d7d:b141::1"
           nameservers:
               addresses: ["fd8f:1d7d:b140::1"]

It didn't work. nmcli reported that eth0 was 'unmanaged'.

The following file did work - moving NetworkManager to global scope:

network:
    version: 2
    renderer: NetworkManager
    ethernets:
        eth0:
           addresses: ["fd8f:1d7d:b141::3/64"]
           gateway6: "fd8f:1d7d:b141::1"
           nameservers:
               addresses: ["fd8f:1d7d:b140::1"]

I think this is due to the following in generate.c:

    /* Disable /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf
     * (which restricts NM to wifi and wwan) if global renderer is NM */
    if (get_global_backend() == BACKEND_NM)
        g_string_free_to_file(g_string_new(NULL), rootdir, "/run/NetworkManager/conf.d/10-globally-managed-devices.conf", NULL);

I think it needs to write a file if there is *any* NM interface, not just if the global backend is NM.

Daniel Axtens (daxtens)
summary: - Specifying NetworkManager renderer per-interface only works for Wifi
- interfaces
+ Specifying NetworkManager renderer per-interface doesn't work for
+ ethernet interfaces
Revision history for this message
Daniel Axtens (daxtens) wrote :
Changed in netplan:
status: New → In Progress
tags: added: id-5cc72cfe22e00d7a830c4ce6
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.