Netdev List
 help / color / mirror / Atom feed
From: Julian Anastasov <ja@ssi.bg>
To: Drunkard Zhang <gongfan193@gmail.com>
Cc: Wensong Zhang <wensong@linux-vs.org>,
	Simon Horman <horms@verge.net.au>,
	Pablo Neira Ayuso <pablo@netfilter.org>,
	Patrick McHardy <kaber@trash.net>,
	Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org, lvs-devel@vger.kernel.org,
	netfilter-devel@vger.kernel.org, netfilter@vger.kernel.org,
	coreteam@netfilter.org,
	linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: ipvsadm: One-packet scheduling with UDP service is unstable
Date: Thu, 22 Aug 2013 09:43:21 +0300 (EEST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1308220925340.1727@ja.ssi.bg> (raw)
In-Reply-To: <CAJiejCQPa7V703RwOeWPpbQMJQvfswRn+pvTKFmNdeU05RU3SQ@mail.gmail.com>


	Hello,

On Tue, 20 Aug 2013, Drunkard Zhang wrote:

> Need help here, thank you for replying :-)
> 
> I'm setting up a syslog cluster based on IPVS, all UDP datagrams sent
> from firewall with fixed source IP and fixed source port, so
> pseudo-random balancing based on client IP and port won't working. And
> it seems that keepalived is not supporting One-packet scheduling
> option, so I did some hacks on it after keepalived started:
> 
> 1. dump LVS rules with ipvsadm -S -n > rules-vs3;
> 2. add --ops option;
> 3. restore LVS rules with ipvsadm-restore < rules-vs3;
> 4. dump the running LVS rules with ipvsadm -S -n
> 
> So, I got two problems here:
> 
> 1. Dumped rules in step 4 above is not usable anymore, the double-dash
> in --ops lost, so I can't restore rule with this dump anymore. This
> must be a bug.
> 
> 2. The --ops option is not working sometimes you applied the rules,
> and in most of times the --ops just not working. To make it work, just
> 'ipvsadm-restore < rules-vs3' for plenty of times until it's working.
> I haven't find the patterns make it work yet. This is lucky, I can't
> get it work on second host at all.
> 
> The "not working" above means the UDP datagrams from one source IP is
> sticked to one realserver, it doesn't distribute to other realservers
> which --ops designed for.

	Can you try with recent ipvsadm from git:

git clone git://git.kernel.org/pub/scm/utils/kernel/ipvsadm/ipvsadm.git

	I see related commit that will print -o for
the OPS feature:

===
commit 6a03100c189d00e3a8235215392465b5b877ba8f
Author: Krzysztof Gajdemski <songo@debian.org.pl>
Date:   Thu Mar 21 11:40:06 2013 +0100

    ipvsadm: Fix wrong format of -o option in FMT_RULE listing

    'ipvsadm -S' listed one-packet scheduling option in wrong format
    ('ops' instead of '--ops' or '-o') preventing any service with OPS
    feature from restoring using 'ipvsadm -R'.  Now we use '-o' which
    works well with save/restore commands.

    Signed-off-by: Krzysztof Gajdemski <songo@debian.org.pl>
    Signed-off-by: Simon Horman <horms@verge.net.au>
===

	Let me know if you still have any problems with OPS.
Sending to lvs-devel@vger.kernel.org and
lvs-users@linuxvirtualserver.org should be enough for
ipvsadm related discussions.

> So I wondering if there's some CONFIG_* options that ipvs needs, or
> recent development broke the code?

	No kernel options should be related to OPS. I assume
you are not using the SH scheduler. Make sure the OPS mode
is properly applied to the virtual service, check for "ops"
in the configuration:

cat /proc/net/ip_vs

> Do I need to attach kernel config file?

	No

Regards

--
Julian Anastasov <ja@ssi.bg>

  reply	other threads:[~2013-08-22  6:43 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-20 15:06 ipvsadm: One-packet scheduling with UDP service is unstable Drunkard Zhang
2013-08-22  6:43 ` Julian Anastasov [this message]
2013-08-22 10:58   ` Drunkard Zhang
2013-08-22 14:14     ` Julian Anastasov
2013-08-22 23:24       ` Drunkard Zhang

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=alpine.LFD.2.00.1308220925340.1727@ja.ssi.bg \
    --to=ja@ssi.bg \
    --cc=coreteam@netfilter.org \
    --cc=davem@davemloft.net \
    --cc=gongfan193@gmail.com \
    --cc=horms@verge.net.au \
    --cc=kaber@trash.net \
    --cc=kadlec@blackhole.kfki.hu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvs-devel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=netfilter@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=wensong@linux-vs.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox