As a workaround, you can do the following (using the original report's config as an example):
# systemctl edit <email address hidden>
Add the following and save the file:
[Unit]
<email address hidden>
Then, let's add Type=oneshot to the ifup@ template so that the above After= actually has some effect:
# systemctl edit ifup@
Add the following and save the file:
[Service]
Type=oneshot
Then reboot.
The problem seems to be a race condition introduced with systemd integration. For me, the missing default route triggered around 80% of the time, but not always.
On Ubuntu 16, systemd executes the ifup@ template units in parallel in a way that is not adequately controlled. For instance, <email address hidden> and ifup@bond0 will execute in parallel. The ifup for bond0 will involve "ip link ... down", then "up" from ifenslave hooks. I believe that if the link down comes after default route from bond0.3000, the default route will be deleted. My journalctl observations support this.
Debugging tip: use systemctl edit ifup@, and add --verbose to the ifup invocations (note, there are 2 of them!). Adding the verbose option to /etc/default/networking does not work, except for lo interface.
As a workaround, you can do the following (using the original report's config as an example):
# systemctl edit <email address hidden>
Add the following and save the file:
[Unit]
<email address hidden>
Then, let's add Type=oneshot to the ifup@ template so that the above After= actually has some effect:
# systemctl edit ifup@
Add the following and save the file:
[Service]
Type=oneshot
Then reboot.
The problem seems to be a race condition introduced with systemd integration. For me, the missing default route triggered around 80% of the time, but not always.
On Ubuntu 16, systemd executes the ifup@ template units in parallel in a way that is not adequately controlled. For instance, <email address hidden> and ifup@bond0 will execute in parallel. The ifup for bond0 will involve "ip link ... down", then "up" from ifenslave hooks. I believe that if the link down comes after default route from bond0.3000, the default route will be deleted. My journalctl observations support this.
Debugging tip: use systemctl edit ifup@, and add --verbose to the ifup invocations (note, there are 2 of them!). Adding the verbose option to /etc/default/ networking does not work, except for lo interface.