Hi,

>> 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?

Actually, I am wondering even more why it tries to execute this again
even though the interface is already up.

> I tried the
> exact same iface stanza on a stretch machine, and doing repeated ifup and
> ifdowns just works as it should.

ifup should be idempotent, right?  Did you try "ifup && ifup"?

We also have another stretch machine on which this works.  So I am a bit
lost about why on one machine, "ifup" tries to bring up an already up
interface.

>> add tunnel "gre0" failed: File exists
> 
> I don't know why it prints "gre0" here, I think that's a bug in ip.

I see the same behavior.

> 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?

Does ifup have state?  So, could it be that on one machine it up'ed the
tunnel successfully and that's why it dos not try again, because it
remembers it already did that?
I thought it does not have any state beyond just the kernel network stack.

; Ralf

Reply via email to