Hi!
I have a 3 node LXD cluster set up and running w/ OVN overlays. What I’m after is provisioning both containers and VMs that may have 2 or more connections to these overlays or a physical bridge.
To start, I have two profiles that define the interfaces into two differnent OVN networks as follows:
Internet:
config: {}
description: internet
devices:
internet0:
name: internet0
network: ovn-internet0-0
type: nic
name: net-ovn-internet0-0
internal:
config: {}
description: mgmt
devices:
mgmt0:
name: mgmt0
network: ovn-mgmt0-0
type: nic
name: net-ovn-mgmt0-0
I launch a container and apply these profiles with:
lxc launch ubuntu:22.04 -p net-ovn-internet0-0 -p net-ovn-mgmt0-0 test01
The container launches successfully, however it only one interface (the first profile applied perhaps?) will acquire an IP address. Investigating I find that /etc/netplan/50-cloud-init.yaml only references one interface:
network:
version: 2
ethernets:
internet0:
dhcp4: true
If I add the second to that (or in an override file e.g. 60-override.yaml) and apply the second interface will come up and work as expected.
Question #1: Is there some way that I missed to do this solely without netplan adjustment?
Next topic is routing - I’d like the hosts to have specific routes for one of the networks, and a default out the other. With dhcp I only get a default. I tried adding specific routes by adding ipv4.routes to the internal interface profile applied to the container (mgmt0) but this appeared to cause some problems with the OVN network, almost as if that route was placed in the OVN routing config with a bad next hop (possibly back to the host?). Even after deleting all hosts with that profile attached the destination appeared to continue to be black holed - the only way I was able to fix it (not knowing much at all about OVN/OVS) was to delete the ovn network in lxd and recreate it. I did not test this thoroughly so I admit I’m speculating as to what is happening.
Question #2: is adding what is the best way to tell an instance of specific routes that will apply to the instance only?
Question #3: I’ve noticed that with VMs the interfaces are configured but named differently. They behave similarly though. Any way to persist the interface names that are in the profiles?
Thanks!
Greg