Comment 3 for bug 1664818

Revision history for this message
Steve Langasek (vorlon) wrote :

> The requirement here is, I need to know when ens1 goes up or down, so
> that I can make changes to the bridge interface. The `ifmonitor` script
> will monitor the link status of ens1, and then take appropriate actions,
> such as restarting a DHCP client, adding or removing routes that have
> been programmed via the lan0 bridge to egress on ens1, adding or
> removing IP addresses from the configuration, etc.

Knowing the status of the physical link so that you can take appropriate action on the bridge/bond makes sense. But it seems to me that should be handled intrinsically by networkd, not something you could or should configure with scripts. Opening a task on systemd for us to verify the behavior here. When all the physical links in a bridge/bond drop, does networkd treat that as a down / subsequent up event?

When you say "egress on ens1", what do you mean? Your network config doesn't show any such routes. Why would these routes be managed externally to networkd?

> In the ifupdown world, the other horrible hack I've sometimes found
> necessary (although the reason why is eluding me at the moment) is when
> I want an interface to be 'manual', yet behave like a 'static'
> definition, in that it should configure itself automatically when it
> comes online. So I might have something like:

In ifupdown, I would expect to handle this as a static network without 'auto'.

For netplan / networkd, this looks like it needs some further work to support, already captured in bug #1664844.