Cockpit/netplan interface issue

Hi guys, I have a linux server with cockpit installed. In the cockpit GUI I have configured three network interfaces for the server. However when I restart the server, one of the interfaces (ens18) is put into disabled state.

I found this netplan config on the server, which I suspect is overwriting the configuration in cockpit on reboot. I tried disabling this configuration file by giving it a .bak extension and running sudo netplan apply.

However after the next reboot I was unable to reach any of the network interfaces and had to recall the snapshot I made prior.

Do you guys have any suggestions how to solve this?

OS Release: Ubuntu 20.04.6 LTS

Cockpit interface configuration (before reboot):

Netplan configuration:

network:
  ethernets:
    ens18:
      accept-ra: false
      addresses: []
      dhcp4: false
      dhcp6: false
      link-local: []
      networkmanager:
        passthrough:
          ipv4.method: disabled
          ipv6.method: disabled
  renderer: NetworkManager
  version: 2

Not sure if this is the issue, but I found a GitHub link about a similar issue where netplan stores the configuration under /run/NetworkManager/ while Cockpit is saving its config under /etc/NetworkManager/. They end up concluding that it’s not supported, but I wonder if you could symlink one to the other.

1 Like

Interesting. I’ve looked into this now and these two directories seem to be fairly different.

/etc/NetworkManager on the left, /run/NetworkManager on the right:
(Had to stitch the screenshots together due to forum rules)

I’m not quite sure how I would symlink these two without breaking anything.

This definitely needs some experimentation! Maybe just the conf.d directories would be enough.

I was able to solve this with a workaround by forcing the desired configuration using the Netplan configuration file. However this is ofcourse not the ideal situation as I probably now have to remember to change to configuration in two places if I at some point want to change the IP address for that interface for example.