/srv/irclogs.ubuntu.com/2021/05/11/#netplan.txt

fieshwe're using netplan on our router / server box, its configuration is https://paste.debian.net/1197100/  during maintenance schedules, it seems our ISPs router (123.123.123.1) does a power cycle, leading to a "enp4s0f3 NIC Link is down" / "enp4s0f3 NIC Link is up" cycle.  whenever this happens, the default route is dropped and not added back automatically.  I can't figure out why this is, what to do07:45
fiesh(installing ifplugd doesn't seem like the right approach here, I'd just like the route to remain, and I don't know how it interacts with netplan anyhow).  Any hints?07:45
slyonfiesh: with "default route" you mean the gateway4/6 settings? Is there any other networking daemon running in the background (besides netplan/systemd-networkd), like NetworkManager or dhclient? Or maybe the ISPs router sends IPv6 RAs, to reconfigure the default routes... you could try: "accept-ra: false"08:05
slyonmcint: it should apply on reboot. Try "netplan --debug apply" do see what's going on.08:06
slyonSat0: macvtap is currently not supported, see: https://bugs.launchpad.net/netplan/+bug/166484708:08
slyonoh I see you're using "accept-ra: false" already..08:12
fieshslyon: yes, the two gateways are dropped.  There's no NetworkManager or dhclient.  However, since the system hosts many lxc instances, lxd is running.  It seems that lxd spawns an instance of dnsmasq -- could that be related?09:10
fieshdoing a `netplan apply` re-adds the gateways correctly after they've been dropped09:10
slyonfiesh: yeah.. sounds like something is changing the default gateway in the background somehow. Is the default gateway removed all together or changed to a different value? Is the static route still there after this change?09:14
slyonWould it be an option to define your default gateway as a static route as well?09:15
fieshslyon: the default route is just gone09:33
fieshslyon: that's a good suggestion... I'll give it a shot09:34
fieshslyon: ok so it work after the `netplan apply`...  I'll have to try a link down later when there's less traffic I'll potentially break09:37
fieshslyon: I am very hopeful... thank you! :)09:38
slyon:) let me know if that works!09:38
fiesh(I'm optimistic since no other routes go missing after the link cycle, so it would seem that adding the default route this way should behave alike)09:39
slyonack09:54
mcintslyon: thanks, nothing. in lxd *lxc containers, just the 50-cloud-init.yaml file. ok. it says it applied, but doesn't include the new ip address nor nameserver i configured12:29
mcintrenderer: networkd12:29
slyonmcint: would you mind sharing your YAML config?12:30
slyone.g. via paste.ubuntu.com12:31
mcintyeah... will sanitize values12:31
mcintseems likely that it's a container issue12:31
mcint** (generate:10751): DEBUG: 12:31:03.940: openvswitch: definition eno1 is not for us (backend 1)12:32
mcint** (generate:10751): DEBUG: 12:31:03.940: NetworkManager: definition eno1 is not for us (backend 1)12:32
lukasmthat looks ok, as you said you're using networkd as a backend renderer12:33
mcinthttps://paste.ubuntu.com/p/K6RBFr277y/12:34
mcintI had not included one before. also --debug, helped ...remind me i wasn't doing it as root12:35
mcintalso seeing:  DEBUG:eno1 not found in {}12:35
mcint...and the device is called eth0@if130. some kind of lxc autogenerated vdev/if12:36
mcintdevice that exists.  I'm clearly missing some fundamental understanding, and I don't think it's even in netplan12:36
slyonmcint: yeah "eno1 not found in {}" is not good. I think you're missing the netmask in your IP address, try "addresses: [172.1.2.3/24]" (or what every your netmask is12:37
slyonbut that should throw parsing errors IMO..12:38
slyonit shows this for me: "test.yaml:5:7: Error in network definition: address '172.1.2.3' is missing /prefixlength"12:39
slyontry fixing this up, maybe it can then correctly generate your configs12:39
mcintoh, sorry - bad hand-redaction.  I do have netmasks on every address for the interface14:06
mcinthttps://pasteboard.co/K1pi6rs.png14:14
slyonmcint: ok. Is this definition for eno1 or eth0? I think you should not add the @if130 suffix to eth014:16
slyonalso, indentation might be off due to the #eno1 comment, not sure how picky YAML is in this case14:16

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!