Ok I've reproduced this by introducing a delay by changing /lib/systemd/system/ifup@.service
-ExecStart=/bin/sh -ec 'ifup --allow=hotplug %I; ifup --allow=auto %I; \ +ExecStart=/bin/sh -ec '/usr/bin/test %I == bond0 && echo found bond0 && sleep 3 ; ifup --allow=hotplug %I; ifup --allow=auto %I; \
that reproduces this by allowing bond0.3000 to complete ifup before bond0 is processed, and when bond0 is ifup'ed it clears bond0.3000's gateway due to bond0 going down and back up.
Ok I've reproduced this by introducing a delay by changing /lib/systemd/ system/ ifup@.service
-ExecStart=/bin/sh -ec 'ifup --allow=hotplug %I; ifup --allow=auto %I; \
+ExecStart=/bin/sh -ec '/usr/bin/test %I == bond0 && echo found bond0 && sleep 3 ; ifup --allow=hotplug %I; ifup --allow=auto %I; \
that reproduces this by allowing bond0.3000 to complete ifup before bond0 is processed, and when bond0 is ifup'ed it clears bond0.3000's gateway due to bond0 going down and back up.