[07:13] <slyon> Hybrid512: macvlan is currently not supported, feature request pending here: https://bugs.launchpad.net/netplan/+bug/1664847
[10:57] <syoc> I see that "netplan try" uses return code 0 even if it fails to apply the config? Are there any tricks to do an automatic sanity check for a netplan config?
[11:01] <slyon> syoc: You should be able to call "/lib/netplan/generate ./your-config.yaml", this will try to parse the config and show any parsing errors. Call this as non-root (without sudo), so it cannot actually write/generate any config files.
[11:01] <slyon> this is not an officially supported way, but should work.
[11:08] <syoc> slyon thanks a bunch!
[11:11] <syoc> well it errors out on a faulty config, but it also errors out on a correct config when I'm not using sudo (which makes complete sense). Was looking for something to use in conjunction with https://docs.ansible.com/ansible/latest/collections/ansible/builtin/template_module.html#parameter-validate
[11:12] <syoc> so it needs to return 0
[11:14] <slyon> unfortunately there is currently no official way to check the config. If you're fine with it generating the config files in /run/systemd/... /run/NetworkManager/... you could run it with "sudo"
[11:21] <slyon> or prepare a temp root-dir and make use of the "generate --root-dir" option to validate the configs
[16:31] <Lucas8037> hello. I'm trying to change the MAC address for a USB WiFi dongle thru netplan, running Ubuntu 20.04.
[16:32] <Lucas8037> am using networkd as renderer, and under `wifis:` key, under my device `wlx...`, I added `macaddress:` with the desired MAC.
[16:32] <Lucas8037> this does generate a .link file in /run/systemd/network/10-netplan-$blah with `MACAddress=` to the right value under `[Link]`, and yet it's being ignored
[16:33] <Lucas8037> anyone has any clue why this isn't working?
[16:34] <Lucas8037> `udevadm test-builtin net_setup_link /sys/class/net/$dev` does show that the generated file is being sourced, together with `/usr/lib/systemd/{99-default,73-usb-net-by-mac}.link`
[16:35] <Lucas8037> the order in which files are sourced is 99, 73, 10
[16:36] <Lucas8037> 99 includes a somewhat sketchy `MACAddressPolicy=persistent`, which I feel is quite probably the one to blame