[08:53] <slyon> teward: Cou cannot do this via the "gateway4/6" shortcuts, but you should be able to define the routes manually, having different metrics, so that one is preferred over the other: https://netplan.io/reference/#routing
[12:50] <Hybrid512> o/
[12:50] <Hybrid512> Hi
[12:52] <Hybrid512> Question : I have a standalone hypervisor that I use as KVM host in a MaaS setup
[12:53] <Hybrid512> I have an issue with this machine, my VMs are deployed correctly but when I reboot them, sometimes, and randomly, some VMs lose their network
[12:54] <Hybrid512> my configuration is this on the host : bond0 -> br0 -> [eth inside VMs with vlan coming from a trunk port]
[12:55] <Hybrid512> I need to have my vlans flowing through the bond and the bridge to the VMs so that vlan configuration is done inside the VM and not at the hypervisor level
[12:55] <Hybrid512> I know it works but I suppose this vlan filtering is causing my issues so I was hoping someone could help me in fixing this or at least checking my netplan config :/
[12:57] <slyon> Hmm... do they lose the connection during reboot, or at runtime (after reboot)? Does it work if you do another reboot? Do you have any kind of logs about this?
[12:57] <slyon> Sure, I can have a look at your netplan config if you want to paste it somewhere.
[12:59] <Hybrid512> here is my conf : https://pastebin.ubuntu.com/p/7fxxyz6h95/
[13:00] <Hybrid512> I don't know exactly when they lose the connection
[13:00] <Hybrid512> at boot time, when it works, I get the user prompt very fast, when it doesn't , boot startup hang for a (quite long) moment then I get the prompt but I lost my network then
[13:01] <Hybrid512> restarting the VM sometime fixes the issue
[13:01] <Hybrid512> it is really random, sometimes it work, sometimes it fails
[13:01] <Hybrid512> but, it NEVER fails when I deploy the VM (so at install time) with MaaS
[13:01] <Hybrid512> only when I reboot
[13:07] <slyon> I cannot spot any obvious problems with your network config... Maybe you could try to collect some more logs about the problem. I.e. reboot until it fails, then reboot again once and collect the logs from previous boot via: journalctl -b -1 -u systemd-networkd (networkd logs at first, to see what's going on with the networking)
[13:10] <Hybrid512> are there any recommendation towards vlan filtering on bridges ? I suspect the issue to be close to that
[13:10] <Hybrid512> regarding bridges options maybe like stp, fd, maxwait, ...
[13:10] <Hybrid512> I'm not top notch regarding network :/
[13:18] <Hybrid512> slyon : this one is the netplan config that is set by MaaS inside the VM : https://pastebin.ubuntu.com/p/Kf29qdZkVs/
[13:18] <Hybrid512> (if you spot something)
[13:23] <slyon> Hybrid512: the MAAS auto-generate netplan config should most probably be fine (I cannot spot any issue).. I'm not really sure about vlan filtering on bridges. I'm wondering if it might be a problem that the bridge has an IP and the VLANs on top have different IPs... why are you defining the VLANs on top of the bridge? Most examples I can find device VLANs directly on the bond (and define one bridge per VLAN on top, if
[13:23] <slyon> needed). So basically the other way around.
[13:24] <slyon> *define VLANs directly on top of the bond
[13:25] <Hybrid512> so your idea would be to give the host vlan IP at the bond level and not at the bridge level instead ?
[13:26] <Hybrid512> I can try that
[13:26] <slyon> Yeah, I'm not sure if this works. But it might be worth a try.
[13:27] <Hybrid512> okay, I'll try that and see if that makes anything better
[13:27] <Hybrid512> this is really tricky anyway and can lead to lots of troubles because it works "most of the time" ... pretty hard to debug
[13:28] <slyon> like having vlans.vlan1201.link: bond0 (instead of br0)
[13:28] <Hybrid512> if this is a bad practice, it should be forbidden (or at least discouraged) by netplan
[15:51] <Hybrid512> slyon: I tried what you proposed ... it didn't change anything :(
[15:52] <Hybrid512> and I don't see any valuable informations in the logs :(  :(
[16:00] <slyon> hm.. that's sad. I'm not really sure what I should recommend now :-/ maybe you could try asking in #maas if there are some better ways to debug this situation and get proper logs of what's going on?
[16:47] <Hybrid512> is it possible to configure macvlan with netplan ?