On Wed, May 06, 2020 at 12:25:57PM +0200, Sergio Gelato wrote:

> I've now run into this problem on several systems running buster. Whenever
> a script in /etc/network/if-up.d/ fails (see, e.g., #959864) the dhclient
> instance dies. This behaviour may actually predate buster, but is much more
> noticeable now that dhclient-script sets the interface's valid_lft to
> the actual, finite lifetime of the lease (cf. #834532). The result is that
> the system drops off the network when the initial DHCP lease expires.
> 
> I'm not sure how well specified the behaviour of ifup is on script failure;
> I couldn't find it documented. Maybe this needs to be clarified? That's also
> why I've filed a bug against postfix, whose if-up.d script really shouldn't
> be failing so casually.
> 
> Still, doing things halfway (killing dhclient but leaving the interface up)
> doesn't feel right. I'd rather deal with an immediate failure than with a
> delayed one.

I can certainly document the behaviour on script failure (as well as
documenting the order in which things are executed). Cleaning up after a
failure is currently not done. I can partially add that; the problem is
that there is no clearly defined order of what (post-)down commands/scripts 
should
be executed given a failure at a given stage of bringing the interface
up.

However, I can ensure that at least the interface's built-in methods
clean up properly after an error, so that a failing script after the
DHCP client is started will cause the client to be stopped orderly by
ifupdown itself, and the link brought down as well.

-- 
Met vriendelijke groet / with kind regards,
      Guus Sliepen <g...@sliepen.org>

Attachment: signature.asc
Description: PGP signature

Reply via email to