Skip to content

realserver will never be online although checker success #1163

@HW-lj

Description

@HW-lj

keepalived -v

Keepalived v2.0.6 (02/03,2019), git commit +

Copyright(C) 2001-2019 Alexandre Cassen, [email protected]

Built with kernel headers for Linux 4.19.25
Running on Linux 4.19.25-vhulk1902.3.1.h113.aarch64 #1 SMP Tue Feb 12 00:00:00 UTC 2019

configure options:

Config options: LVS VRRP VRRP_AUTH OLD_CHKSUM_COMPAT FIB_ROUTING

System options: PIPE2 SIGNALFD INOTIFY_INIT1 VSYSLOG IPV4_DEVCONF LIBNL3 RTA_ENCAP RTA_EXPIRES RTA_NEWDST RTA_PREF FRA_SUPPRESS_PREFIXLEN FRA_SUPPRESS_IFGROUP FRA_TUN_ID RTAX_CC_ALGO RTAX_QUICKACK RTEXT_FILTER_SKIP_STATS FRA_L3MDEV FRA_UID_RANGE RTAX_FASTOPEN_NO_COOKIE RTA_VIA FRA_OIFNAME FRA_PROTOCOL FRA_IP_PROTO FRA_SPORT_RANGE FRA_DPORT_RANGE IFA_FLAGS IP_MULTICAST_ALL LWTUNNEL_ENCAP_MPLS LWTUNNEL_ENCAP_ILA LIBIPTC_LINUX_NET_IF_H_COLLISION LIBIPVS_NETLINK IPVS_DEST_ATTR_ADDR_FAMILY IPVS_SYNCD_ATTRIBUTES IPVS_64BIT_STATS VRRP_VMAC SOCK_NONBLOCK SOCK_CLOEXEC O_PATH GLOB_BRACE INET6_ADDR_GEN_MODE SO_MARK SCHED_RT SCHED_RESET_ON_FORK

old config:

! Configuration File for keepalived
  
virtual_server 22.22.91.58 5001 {
    delay_loop 6
    lb_algo rr
    lb_kind DR
    protocol TCP
    alpha

    real_server 9.82.250.109 5001 {
        weight 1
        TCP_CHECK {
            connect_port 23
            connect_timeout 15
            retry 3
            delay_before_retry 3
        }
    }
}

new config:

! Configuration File for keepalived
  
virtual_server 22.22.91.58 5001 {
    delay_loop 6
    lb_algo rr
    lb_kind DR
    protocol TCP
    alpha

    real_server 9.82.250.109 5001 {
        weight 1
        TCP_CHECK {
            connect_port 22
            connect_timeout 15
            retry 3
            delay_before_retry 3
        }
    }
}

step 1: start keepalived with old config, 23 port is unreachable
step 2: just for a while and then modify the config to the new one and reload
step 3: observe the log and you will see the success log but lack of Adding service [9.82.250.109]:tcp:5001 to VS [22.22.91.58]:tcp:5001

the reason is the new checker's state is is_up, so it can not update it's state properly

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions