All of lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Taylor <gtaylor@tnetconsulting.net>
To: lartc@vger.kernel.org
Subject: Re: GRE-NAT broken - SOLVED
Date: Thu, 01 Feb 2018 18:31:49 +0000	[thread overview]
Message-ID: <44430e52-304c-2342-3f52-1eec38a0aed2@tnetconsulting.net> (raw)
In-Reply-To: <93df1d66-01b5-1ddf-b3f7-5a59c940eb2f@spamtrap.tnetconsulting.net>

On 02/01/2018 03:34 AM, Matthias Walther wrote:
> Hello Grant,

Hi Matthias,

> I think I missed an email, as I don't know whom you're quoting here.

I was actually quoting myself in an email I sent about 7 hours prior. 
Here's a link to it:  https://www.spinics.net/lists/lartc/msg23508.html

> So after all it's a race condition during start up. It's awesome, that 
> you found the cause! Thanks for all your work, you put into this.

You're welcome.

> Last night, I managed to make all connections work by executing conntrack 
> -D on the hypervisor. Awesome!

Yay!

> But this morning, there were some broken tunnels again. This doesn't 
> seem to last very long.

Hum.  :-/

> You wrote, that I should change the order in startup. So I just should 
> postpone the starting of the VMs for a little while? Or do I need to 
> change the order in my iptables rules somehow?

I think it's an issue between when the IPTables rules are entered vs 
when the GRE tunnels are brought up.

You might not have the ability to control when GRE packets come in from 
the remote sites.  Thus connection tracking may learn about something 
before IPTables is ready.

I think that you will need to do some more digging into connection 
tracking and how to interpret the output.  At least enough so that you 
can learn what is necessary to surgically add / remove entries to the 
connection tracking table.  That way you won't need to blow the entire 
connection tracking table away like "conntrack -D" does.

> To me this looks like a bug in the conntrack module. It shouldn't be 
> necessary to clean the table manually once in a while.

I don't know if it's a bug in connection tracking or not.  It might 
simply be a race condition.  I.e. depending on which direction CT sees 
GRE packets from first, and possibly associated replies.  Possibly 
leading to an undesired state ala race condition.

Note:  CT state expiration can also likely cause the "seen first" issue 
again, even after the systems have been up and the tunnels have passed 
traffic.

Try clearing the connection tracking table, and then starting a 
persistent ping through each tunnel and seeing if the tunnels stay up 
and functional.  -  I.e. constantly send traffic through the tunnels to 
make sure that the connection tracking table entries don't become stale, 
which leads to them getting purged, which means a new "first seen" 
condition again.

If the persistent ping does work, 1) you have a workaround, and 2) you 
know that it's likely CT state expiration, which means that there may be 
a tunable that can help prevent the relevant state information from 
expiring.



-- 
Grant. . . .
unix || die

  parent reply	other threads:[~2018-02-01 18:31 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-31  5:29 GRE-NAT broken - SOLVED Grant Taylor
2018-01-31  5:33 ` Grant Taylor
2018-02-01 10:34 ` Matthias Walther
2018-02-01 18:31 ` Grant Taylor [this message]
2018-02-02 12:33 ` Matthias Walther
2018-02-02 20:21 ` Grant Taylor
2018-02-02 21:30 ` Matthias Walther
2018-02-02 23:18 ` Grant Taylor
2018-02-05  0:17 ` Matthias Walther
2018-02-05  1:05 ` Grant Taylor
2018-02-05 14:00 ` Matthias Walther
2018-02-05 23:10 ` Grant Taylor
2018-02-06 23:01 ` Matthias Walther
2018-02-07  3:52 ` Grant Taylor

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44430e52-304c-2342-3f52-1eec38a0aed2@tnetconsulting.net \
    --to=gtaylor@tnetconsulting.net \
    --cc=lartc@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.