android_kernel_xiaomi_sdm845/net/ipv4
Rumen G. Bogdanovski 1e356f9cdf [IPVS]: Bind connections on stanby if the destination exists
This patch fixes the problem with node overload on director fail-over.
Given the scenario: 2 nodes each accepting 3 connections at a time and 2
directors, director failover occurs when the nodes are fully loaded (6
connections to the cluster) in this case the new director will assign
another 6 connections to the cluster, If the same real servers exist
there.

The problem turned to be in not binding the inherited connections to
the real servers (destinations) on the backup director. Therefore:
"ipvsadm -l" reports 0 connections:
root@test2:~# ipvsadm -l
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  test2.local:5999 wlc
  -> node473.local:5999           Route   1000   0          0
  -> node484.local:5999           Route   1000   0          0

while "ipvs -lnc" is right
root@test2:~# ipvsadm -lnc
IPVS connection entries
pro expire state       source             virtual            destination
TCP 14:56  ESTABLISHED 192.168.0.10:39164 192.168.0.222:5999
192.168.0.51:5999
TCP 14:59  ESTABLISHED 192.168.0.10:39165 192.168.0.222:5999
192.168.0.52:5999

So the patch I am sending fixes the problem by binding the received
connections to the appropriate service on the backup director, if it
exists, else the connection will be handled the old way. So if the
master and the backup directors are synchronized in terms of real
services there will be no problem with server over-committing since
new connections will not be created on the nonexistent real services
on the backup. However if the service is created later on the backup,
the binding will be performed when the next connection update is
received. With this patch the inherited connections will show as
inactive on the backup:

root@test2:~# ipvsadm -l
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port           Forward Weight ActiveConn InActConn
TCP  test2.local:5999 wlc
  -> node473.local:5999           Route   1000   0          1
  -> node484.local:5999           Route   1000   0          1

rumen@test2:~$ cat /proc/net/ip_vs
IP Virtual Server version 1.2.1 (size=4096)
Prot LocalAddress:Port Scheduler Flags
  -> RemoteAddress:Port Forward Weight ActiveConn InActConn
TCP  C0A800DE:176F wlc
  -> C0A80033:176F      Route   1000   0          1
  -> C0A80032:176F      Route   1000   0          1

Regards,
Rumen Bogdanovski

Acked-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: Rumen G. Bogdanovski <rumen@voicecho.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
2007-11-07 04:15:09 -08:00
..
ipvs [IPVS]: Bind connections on stanby if the destination exists 2007-11-07 04:15:09 -08:00
netfilter [NETFILTER]: remove unneeded rcu_dereference() calls 2007-11-07 04:08:23 -08:00
af_inet.c [NET]: Forget the zero_it argument of sk_alloc() 2007-11-01 00:39:31 -07:00
ah4.c cleanup asm/scatterlist.h includes 2007-11-02 08:47:06 +01:00
arp.c [NET]: Make core networking code use seq_open_private 2007-10-10 16:55:33 -07:00
cipso_ipv4.c [NetLabel]: correct usage of RCU locking 2007-10-26 04:29:08 -07:00
datagram.c [IPV4]: Fix "ipOutNoRoutes" counter error for TCP and UDP 2007-06-03 18:08:50 -07:00
devinet.c [IPV4]: When possible test for IFF_LOOPBACK and not dev == loopback_dev 2007-10-10 16:52:48 -07:00
esp4.c [NET]: Fix incorrect sg_mark_end() calls. 2007-10-30 21:29:29 -07:00
fib_frontend.c [IPV4]: Compact some ifdefs in the fib code. 2007-11-07 04:11:41 -08:00
fib_hash.c [NET]: Make core networking code use seq_open_private 2007-10-10 16:55:33 -07:00
fib_lookup.h [RTNETLINK]: Fix sending netlink message when replace route. 2007-05-24 16:36:53 -07:00
fib_rules.c [IPV4/IPV6/DECNET]: Small cleanup for fib rules. 2007-10-10 16:51:22 -07:00
fib_semantics.c [NETLINK]: Introduce nested and byteorder flag to netlink attribute 2007-10-10 16:49:16 -07:00
fib_trie.c remove asm/bitops.h includes 2007-10-19 11:53:41 -07:00
icmp.c [INET]: Unexport icmpmsg_statistics 2007-10-26 04:06:08 -07:00
igmp.c [NET]: Make core networking code use seq_open_private 2007-10-10 16:55:33 -07:00
inet_connection_sock.c [INET]: Justification for local port range robustness. 2007-10-18 22:00:17 -07:00
inet_diag.c [INET]: Let inet_diag and friends autoload 2007-10-22 02:59:54 -07:00
inet_fragment.c [INET]: Consolidate frag queues freeing 2007-10-17 19:48:26 -07:00
inet_hashtables.c [INET]: Justification for local port range robustness. 2007-10-18 22:00:17 -07:00
inet_lro.c fix endianness bug in inet_lro 2007-10-14 12:41:52 -07:00
inet_timewait_sock.c [NET]: DIV_ROUND_UP cleanup (part two) 2007-10-10 16:48:37 -07:00
inetpeer.c [IPV4]: Fix inetpeer gcc-4.2 warnings 2007-07-20 19:39:17 -07:00
ip_forward.c [IPV4]: Uninline netfilter okfns 2007-10-15 12:26:35 -07:00
ip_fragment.c [NET]: Fix uninitialised variable in ip_frag_reasm() 2007-10-17 21:37:22 -07:00
ip_gre.c [NET]: Treat the sign of the result of skb_headroom() consistently 2007-10-23 21:27:55 -07:00
ip_input.c [IPV4]: Uninline netfilter okfns 2007-10-15 12:26:35 -07:00
ip_options.c [IPV4] ip_options.c: kmalloc + memset conversion to kzalloc 2007-07-31 14:06:45 -07:00
ip_output.c [IPV4]: Consolidate the ip cork destruction in ip_output.c 2007-11-07 04:08:25 -08:00
ip_sockglue.c [IPV4]: Clean the ip_sockglue.c from some ugly ifdefs 2007-11-07 04:08:55 -08:00
ipcomp.c [IPSEC]: Fix crypto_alloc_comp error checking 2007-11-07 04:15:03 -08:00
ipconfig.c [NET]: Wrap netdevice hardware header creation. 2007-10-10 16:52:50 -07:00
ipip.c [NET]: Treat the sign of the result of skb_headroom() consistently 2007-10-23 21:27:55 -07:00
ipmr.c [NET]: Make core networking code use seq_open_private 2007-10-10 16:55:33 -07:00
Kconfig typo fixes 2007-10-20 01:34:40 +02:00
Makefile [INET]: Collect frag queues management objects together 2007-10-15 12:26:39 -07:00
netfilter.c [NETFILTER]: Replace sk_buff ** with sk_buff * 2007-10-15 12:26:29 -07:00
proc.c [NET]: Define infrastructure to keep 'inuse' changes in an efficent SMP/NUMA way. 2007-11-07 04:08:57 -08:00
protocol.c [IPV4]: align inet_protos[] on SMP 2007-04-25 22:28:20 -07:00
raw.c [IPV4]: Use the {DEFINE|REF}_PROTO_INUSE infrastructure 2007-11-07 04:08:58 -08:00
route.c [NET]: Make core networking code use seq_open_private 2007-10-10 16:55:33 -07:00
syncookies.c [SK_BUFF]: Introduce tcp_hdr(), remove skb->h.th 2007-04-25 22:25:26 -07:00
sysctl_net_ipv4.c [INET]: Justification for local port range robustness. 2007-10-18 22:00:17 -07:00
tcp_bic.c [TCP]: Remove num_acked>0 checks from cong.ctrl mods pkts_acked 2007-10-10 16:47:55 -07:00
tcp_cong.c [TCP]: remove unused argument to cong_avoid op 2007-07-18 01:46:58 -07:00
tcp_cubic.c [TCP]: Remove num_acked>0 checks from cong.ctrl mods pkts_acked 2007-10-10 16:47:55 -07:00
tcp_diag.c [INET]: Let inet_diag and friends autoload 2007-10-22 02:59:54 -07:00
tcp_highspeed.c [TCP]: remove unused argument to cong_avoid op 2007-07-18 01:46:58 -07:00
tcp_htcp.c [TCP]: H-TCP maxRTT estimation at startup 2007-08-07 18:29:05 -07:00
tcp_hybla.c [TCP]: remove unused argument to cong_avoid op 2007-07-18 01:46:58 -07:00
tcp_illinois.c [TCP]: congestion control API pass RTT in microseconds 2007-07-31 02:27:57 -07:00
tcp_input.c [TCP]: Another TAGBITS -> SACKED_ACKED|LOST conversion 2007-11-01 00:10:18 -07:00
tcp_ipv4.c [IPV4]: Use the {DEFINE|REF}_PROTO_INUSE infrastructure 2007-11-07 04:08:58 -08:00
tcp_lp.c [TCP]: congestion control API pass RTT in microseconds 2007-07-31 02:27:57 -07:00
tcp_minisocks.c [TCP]: Move sack_ok access to obviously named funcs & cleanup 2007-10-10 16:48:00 -07:00
tcp_output.c [TCP]: Limit processing lost_retrans loop to work-to-do cases 2007-10-11 17:36:13 -07:00
tcp_probe.c [NET]: Make /proc/net per network namespace 2007-10-10 16:49:06 -07:00
tcp_scalable.c [TCP]: remove unused argument to cong_avoid op 2007-07-18 01:46:58 -07:00
tcp_timer.c [TCP]: Move sack_ok access to obviously named funcs & cleanup 2007-10-10 16:48:00 -07:00
tcp_vegas.c [TCP] vegas: Fix a bug in disabling slow start by gamma parameter. 2007-10-29 22:37:25 -07:00
tcp_vegas.h [TCP]: congestion control API pass RTT in microseconds 2007-07-31 02:27:57 -07:00
tcp_veno.c [TCP]: congestion control API pass RTT in microseconds 2007-07-31 02:27:57 -07:00
tcp_westwood.c [TCP]: congestion control API pass RTT in microseconds 2007-07-31 02:27:57 -07:00
tcp_yeah.c [TCP]: congestion control API pass RTT in microseconds 2007-07-31 02:27:57 -07:00
tcp.c [TCP]: Saner thash_entries default with much memory. 2007-10-30 00:59:25 -07:00
tunnel4.c [IPSEC]: Changing API of xfrm4_tunnel_register. 2007-02-13 12:54:47 -08:00
udp_impl.h [UDP]: Randomize port selection. 2007-10-10 16:48:31 -07:00
udp.c [IPV4]: Use the {DEFINE|REF}_PROTO_INUSE infrastructure 2007-11-07 04:08:58 -08:00
udplite.c [IPV4]: Use the {DEFINE|REF}_PROTO_INUSE infrastructure 2007-11-07 04:08:58 -08:00
xfrm4_input.c [IPSEC]: Rename mode to outer_mode and add inner_mode 2007-10-17 21:35:51 -07:00
xfrm4_mode_beet.c [IPSEC]: Add missing BEET checks 2007-10-17 21:31:50 -07:00
xfrm4_mode_transport.c [IPSEC]: Use IPv6 calling convention as the convention for x->mode->output 2007-10-10 16:55:54 -07:00
xfrm4_mode_tunnel.c [IPSEC]: Add missing BEET checks 2007-10-17 21:31:50 -07:00
xfrm4_output.c [IPSEC]: Rename mode to outer_mode and add inner_mode 2007-10-17 21:35:51 -07:00
xfrm4_policy.c [IPSEC]: Rename mode to outer_mode and add inner_mode 2007-10-17 21:35:51 -07:00
xfrm4_state.c [IPSEC]: Store afinfo pointer in xfrm_mode 2007-10-17 21:33:12 -07:00
xfrm4_tunnel.c [IPSEC]: Move tunnel parsing for IPv4 out of xfrm4_input 2007-10-17 21:28:53 -07:00