On Sun, Nov 26, 2017 at 06:09:29PM +0100, Ralf Jung wrote:

> The following command:
> 
>   /sbin/ifup -a --read-environment
> 
> tries to bring up some GRE tunnels on my system that are already up.  
> Obviously,
> this fails.  One consequence of that is that the systemd "networking" unit is
> always marked as failed, so systemd never thinks the network is actually up.
> 
> The relevant bits of the /etc/network/interfaces.d/* looks as follows:
[...]
>         pre-up ip tunnel add $IFACE mode gre local 51.X.X.X remote 185.X.X.X 
> ttl 255
[...]

The problem with jessie was that it ignored any errors from
pre/post-up/down commands. This was fixed in stretch. If you want
ifupdown to ignore any errors from your pre-up command, just append "||
true" to it, like:

         pre-up ip tunnel add $IFACE mode gre local 51.X.X.X remote 185.X.X.X 
ttl 255 || true

However, this begs the question: why does this fail at all? I tried the
exact same iface stanza on a stretch machine, and doing repeated ifup and
ifdowns just works as it should.

> add tunnel "gre0" failed: File exists

I don't know why it prints "gre0" here, I think that's a bug in ip. I do
see it when I manually try to do the ip tunnel add command multiple
times without ip tunnel del inbetween.

> With exactly the same setup (literally -- this is all automatically 
> deployed), I
> do not get any errors on our jessie systems.  Also the stretch system with a
> slightly older kernel (4.9.0-3) is not affected.  The broken machine has
> 4.9.0-4-amd64.

Hm, that is also weird. Maybe there is something that causes this tunnel
to be brought up before ifup tries to do the same?

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

Attachment: signature.asc
Description: PGP signature

Reply via email to