Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pablo Neira Ayuso <pablo@netfilter.org>
To: Simone Zaffalon <zaffa@zaffa.it>
Cc: netfilter@vger.kernel.org
Subject: Re: conntrackd: failover problems
Date: Wed, 29 Dec 2010 15:46:21 +0100	[thread overview]
Message-ID: <4D1B49BD.3030202@netfilter.org> (raw)
In-Reply-To: <AANLkTimcTzk29z_9CqY9a6jNfoQrSs+V4Qx7vKRisMJh@mail.gmail.com>

On 29/12/10 12:40, Simone Zaffalon wrote:
> Hi Pablo.
> Thank you for the answer.
>>
>> Better use the primary-backup.sh script that is included in the
>> conntrack-tools package. You can find it under doc/sync. That script
>> should be called by your HA manager during the failover.
> 
> Already done. I've included
> /usr/share/doc/conntrackd/examples/sync/ftfw/script_master.sh in
> vip-up.sh (the ucarp script called when failover occours):
> -----------vip-up.sh--------------------------
> #! /bin/sh
> exec 2> /dev/null
> 
> /sbin/ip addr add "$2"/24 dev "$1"
> 
> # or alternatively:
> # /sbin/ifconfig "$1":254 "$2" netmask 255.255.255.0
> #!/bin/sh
> 
> /usr/sbin/conntrackd -c # commit the cache
> /usr/sbin/conntrackd -f # flush the caches
> /usr/sbin/conntrackd -R # resync with kernel conntrack table
> -----------------------------------------------
> 
> and of course i did the same with script_backup.sh in vip-down.sh

This seems to be an old script version. What conntrack-tools version are
you using?

> Now I'm switching to keepalived (to stick more with provided examples)
> and i am doing some other experiment and i let you know how far i'll
> go with that.
> In the meantime, as i asked before, is there any way to increment log
> verbosity to understand what's going on (in /var/log/conntrackd.log)?

You cannot increase verbosity but you have plenty of conntrackd -s
information to know what is going on (see manpage for -s option parameters).

I still don't know what is your problem, please provide a more detailed
procedure of what you're testing and I'll be happy to help you.

To test conntrackd, it's a good idea to start with something simple:

1) create a TCP connection between two peers that are firewalled.
2) check in the primary firewall that `conntrackd -i' shows the flow
(this is to display the internal cache).
3) check in the backup firewall that `conntrackd -e' show the foreign
flow, that means it has been correctly propagated (-e shows the external
cache).
4) for a simple failover scenario, set a link down in the primary to
trigger the failover.
5) the new primary must contain the entry with `conntrack -L' (to
display the kernel conntrack table).
6) check the logs, they must contain that one flow was injected (committed).

  reply	other threads:[~2010-12-29 14:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-27 14:50 conntrackd: failover problems Simone Zaffalon
2010-12-28 16:59 ` Pablo Neira Ayuso
2010-12-29 11:40   ` Simone Zaffalon
2010-12-29 14:46     ` Pablo Neira Ayuso [this message]
2010-12-29 15:10       ` limiting not working for individual IPs J Webster
2011-01-04 10:06       ` conntrackd: failover problems Simone Zaffalon
2011-01-06  3:16         ` 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=4D1B49BD.3030202@netfilter.org \
    --to=pablo@netfilter.org \
    --cc=netfilter@vger.kernel.org \
    --cc=zaffa@zaffa.it \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox