From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Pierre-Philipp Braun <pbraun@nethence.com>
Cc: netfilter@vger.kernel.org
Subject: Re: failing fail-over - commit still in progress
Date: Sat, 12 Aug 2023 23:08:39 +0200 [thread overview]
Message-ID: <ZNf013cGy81TcxoN@calendula> (raw)
In-Reply-To: <df659821-cee6-9702-e259-9db8cf290316@nethence.com>
On Sat, Aug 12, 2023 at 12:52:19PM +0300, Pierre-Philipp Braun wrote:
>
> > Three nodes and FT-FW mode will not work. FT-FW would need to be
> > extended to maintain sequence tracking for more than one single node.
> > It is doable but this requires development effort.
> >
> > For three node, you should try NOTRACK which means sync messages are
> > sent from active to passive nodes without any kind of sequence
> > tracking (best effort approach).
>
> I switched to NOTRACK UDP but I get the same issue with the commit.
>
> The inbound session is seen alright on all the nodes, although node3 (active vrrp) sees it both in internal and external cache.
> The host where the guest lives sees it only in the internal cache this time.
You should see:
- active: internal cache contains the flow that represents the SSH
connection.
- backup: external cache contains the flow that represents the SSH
connection.
on failover, what you see in the external cache in the backup node
will be visible in the internal cache.
By "inbound session", I guess you refer to the SSH connection you use
for testing, but is this a SSH connection to the guest VM? Is this
DNAT to the guest VM or simply routing?
Such guess VM gets migrated to the active node and the active node
forwards traffic to the guest VM?
From what you write, there is no state synchronization issue with
NOTRACK with three nodes.
If connection gets lost on failover, it might be also be related to
your firewall policy. If the state is not yet in conntrack, NAT
packets will be handled as local packet by the router, not the guess
itself, likely being rejecting them with TCP RST.
Dropping packets that are in invalid state is important to make sure
no races occur with state injection, your basechain policy is also set
to accept as default.
Please also check that you set:
/proc/sys/net/netfilter/nf_conntrack_tcp_loose
to zero to disable TCP connection tracking pick up on failover.
Otherwise, conntrack creates an entry from the middle.
Moreover, you will need to drop packets in invalid state in your
policy in combination with this sysctl toggle, both at input and
forward chains.
next prev parent reply other threads:[~2023-08-12 21:08 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-11 8:55 failing fail-over - commit still in progress Pierre-Philipp Braun
2023-08-11 8:58 ` Pierre-Philipp Braun
2023-08-11 10:53 ` Pablo Neira Ayuso
2023-08-12 9:52 ` Pierre-Philipp Braun
2023-08-12 21:08 ` Pablo Neira Ayuso [this message]
2023-08-21 6:19 ` Pierre-Philipp Braun
2023-08-21 9:26 ` Pablo Neira Ayuso
2023-08-24 9:59 ` Pierre-Philipp Braun
2023-08-28 8:02 ` Pablo Neira Ayuso
[not found] ` <f1291caf-2103-3fcb-7e60-e5a3218624ad@nethence.com>
2023-09-01 8:37 ` Pablo Neira Ayuso
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=ZNf013cGy81TcxoN@calendula \
--to=pablo@netfilter.org \
--cc=netfilter@vger.kernel.org \
--cc=pbraun@nethence.com \
/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.