netplan apply is non-blocking
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netplan |
New
|
Undecided
|
Unassigned | ||
systemd |
New
|
Undecided
|
Unassigned |
Bug Description
lp:maas verifies user provided network configuration. It does this by launching the MAAS ephemeral environment with default network settings(DHCP on the boot interface), downloading a tar containing test scripts and the user config, applying it, and running the test scripts.
What I've noticed during testing is that sometimes the test scripts fail because they run before netplan finishes bringing up everything.
For example I have a netplan configuration that creates a bridge ontop of a bond.
$ netplan apply && ls /sys/class/net
bonding_masters enp1s0 enp2s0 enp3s0 lo
However if I add a short sleep the devices come up
$ netplan apply && sleep 0.1 && ls /sys/class/net
bond0 bonding_masters br0 enp1s0 enp2s0 enp3s0 lo
netplan apply should have a --blocking option so the command doesn't complete until all network settings are applied.
Adding systemd as my understanding is systemd-networkd has no way for netplan to determine if network settings have been applied.