Adding virtual (alias) IP on host breaks netplan config

SYSTEM INFORMATION
OS type and version Ubuntu 22.04
Webmin version 2.104
Cloudmin version 9.7 Pro

Hi, when I add a new alias IP on a bridge via Cloudmin’s “System configuration → Network Interfaces”, it breaks the corresponding netplan configuration, rendering it unable to boot so at next reboot we end up in big trouble.

The config error is the addition of those lines in the .yaml netplan file below the route section :

            interfaces: [ARRAY(0x55847fb42aa8)]
            parameters:
                stp: true
                forward-delay: 4

even while the parameters and interface section is already here, it keeps adding them and the interfaces declaration is obviously buggy as hell and breaks netplan at next reboot, cutting off the server from the Internet :sob:

If I add more alias IP it keeps adding those 4 stupid and broken lines each time, with different value for the ARRAY.

Please fix this since it makes Cloudmin basically dangerous to use for server admin !

Assume that the host server OS is Ubuntu - what is the guest OS?

Does this happen when you try and add a ‘Virtual IP’ or a ‘Real IP’?

I tried to add a virtual interface and an error was generated:

Failed to save network interface : scp: /etc/network/interfaces: No such file or directory

The interface does appear in Cloudmin however:

My cloudmin host is RHEL 9 and the guest OS is Ubuntu 22.04

The virtual interface cannot be deleted however:

Failed to delete interface : scp: /etc/network/interfaces: No such file or directory

In fact my use case is adding a virtual IP on another physical Host server, from our Cloudmin Master.

Right, so that is quite a significant issue. I’d guess this is related to the underlying Webmin functionality. Certainly one that @Jamie should be made aware of?

Yes, this looks like a bug. Is Webmin or Virtualmin installed on the guest system?

OP issue is related to modifying a secondary cloudmin host’s virtual interfaces from cloudmin master.

The issue I discovered is related to a guest OS’s virtual interface. I’ll create a new thread for this.

@lorelin does the system you’re trying to add this additional IP to have Webmin or Virtualmin installed?

Sure, those are physical hosts, so they all have Webmin installed to be managed by the Cloudmin master.

Also the issue arise the same when I modify the network interfaces from Cloudmin master or when I open the Webmin on managed system, via the Cloudmin master tunneling, and add the IP in the Webmin networking module of the physical host.

Ubuntu 20.04 and 22.04
I found several problems with netplan using webmin and virtualmin.

  1. Netplan differs from 20.04 to 22.04
  2. 22.04 need 0600 not 0644
  3. When adding a new IPv6 to a virtual server, sometimes put /64 in the first IPV6 in the netplan.
    If the system reboots, it can only be recovered in rescue mode.
  4. The system modifies netplan ipv6 by adding " " to the existing ipv6 in the original nameserver address ‘2001.2637.221::1’ changes to “‘2001.2637.221::1’” on reboot, not pinging, only in rescue mode can recovery be achieved
  5. If a virtual server deleted, ipv6 address is deleted ok, but “/64” in the end stay in netplan file.
  6. Netplan reads all files in /etc/netplan, why not create a file like 234_example.com with ipv6, instead of making changes to the default file?
    like
network:
  version: 2
  renderer: networkd
  ethernets:
    enp27s0:
      addresses: [ 2001:xxxx:xxxx:xxxx::cafe/64 ]

This is my default yaml (22.04) i use in severall servers, addresses are default ip server, then only add new files with domain ip

network:
  version: 2
  renderer: networkd
  ethernets:
        enp27s0:
            addresses: ['xxx.xxx.xxx.xxx/32','xxx.xxx.xxx.yyy/32', '2001:xxxx:xxxx:xxxx::1/64']
             nameservers:
                addresses: [xxx.xxx.xxx.kkk, xxx.xxx.xxx.yyy, '2001:4860:4860::8888']
                search: [' dedicated.server.hosting ']
            routes:
              - on-link: true
                to: default
                via: "fe80::1"

Or run “netplan try” after some modification

netplan try can’t be used with a bridged network configuration, which the mandatory default for VM hosting…

So we are bound with apply & pray… and loosing access to the server in case of problem :cry:
Only way out in this case is rebooting in rescue and blindly searching what went wrong…

Really not satisfying !