Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistency in documentaion #2105

Closed
omikhaylov opened this issue Feb 22, 2022 · 1 comment
Closed

Inconsistency in documentaion #2105

omikhaylov opened this issue Feb 22, 2022 · 1 comment

Comments

@omikhaylov
Copy link

Describe the bug
There seem to be inconsistency in documentation:

Important: for a SYNC group to run reliably, it is vital that all instances in
the group are MASTER or that they are all either BACKUP or FAULT. A
situation with half instances having higher priority on machine A
half others with higher priority on machine B will lead to constant
re-elections. For this reason, when instances are grouped, any
track scripts/files configured against member VRRP instances will have
their tracking weights automatically set to zero, in order to avoid
inconsistent priorities across instances

When I accidently set weight to vrrp_script which I use to track one of my instances with, I got error message (in /tmp/keepalived_vrrp.log):
Mon Feb 21 13:38:06.984861723 2022: (eth0_1) ignoring tracked script TEST with weights due to SYNC group
Script was not executed as error said. But as I understood docs, weight should be set to zero and script should still be executed.

To Reproduce

  • Use sync_group with multiple instances
  • Set track_script in one instance with script with 'weight' parameter

Expected behavior
'weight' parameter in config should be ignored and log should indicate that it was set to '0'

Keepalived version
Keepalived v2.2.4 (12/27,2021)

Copyright(C) 2001-2021 Alexandre Cassen, acassen@gmail.com

Built with kernel headers for Linux 5.10.46
Running on Linux 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1+b1+sterra2 (2021-11-19)
Distro: Debian GNU/Linux 11 (bullseye)

configure options: --build=x86_64-linux-gnu --prefix=/usr --includedir=${prefix}/include --mandir=${prefix}/share/man --infodir=${prefix}/share/info --sysconfdir=/etc --localstatedir=/var --disable-option-checking --disable-silent-rules --libdir=${prefix}/lib/x86_64-linux-gnu --runstatedir=/run --disable-maintainer-mode --disable-dependency-tracking --enable-snmp --enable-sha1 --enable-snmp-rfcv2 --enable-snmp-rfcv3 --enable-dbus --enable-json --enable-bfd --enable-regex --enable-log-file build_alias=x86_64-linux-gnu CFLAGS=-g -O2 -ffile-prefix-map=/builds/vnovikov/keepalived=. -fstack-protector-strong -Wformat -Werror=format-security LDFLAGS=-Wl,-z,relro CPPFLAGS=-Wdate-time -D_FORTIFY_SOURCE=2

Config options: NFTABLES LVS REGEX VRRP VRRP_AUTH VRRP_VMAC JSON BFD OLD_CHKSUM_COMPAT SNMP_V3_FOR_V2 SNMP_VRRP SNMP_CHECKER SNMP_RFCV2 SNMP_RFCV3 DBUS FILE_LOGGING LOG_FILE_APPEND INIT=SYSV

System options: VSYSLOG MEMFD_CREATE 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_PROTOCOL FRA_IP_PROTO FRA_SPORT_RANGE FRA_DPORT_RANGE RTA_TTL_PROPAGATE IFA_FLAGS LWTUNNEL_ENCAP_MPLS LWTUNNEL_ENCAP_ILA NET_LINUX_IF_H_COLLISION LIBIPVS_NETLINK IPVS_DEST_ATTR_ADDR_FAMILY IPVS_SYNCD_ATTRIBUTES IPVS_64BIT_STATS IPVS_TUN_TYPE IPVS_TUN_CSUM IPVS_TUN_GRE VRRP_IPVLAN IFLA_LINK_NETNSID GLOB_BRACE GLOB_ALTDIRFUNC INET6_ADDR_GEN_MODE VRF SO_MARK

Distro (please complete the following information):

  • Name: Debian
  • Version: 11
  • Architecture: x86_64

Configuration file:
global_defs {
enable_dbus
}
vrrp_sync_group 0 {
notify "/etc/keepalived/scripts/notify_common"
group {
eth0_1
eth1_2
}
}
vrrp_script TEST {
script "/etc/keepalived/scripts/sla check --mode icmp-echo --hosts 172.16.101.15 --reachability any --tos 0xFF --data-size 56 --name TEST"
fall 5
rise 7
weight 80
timeout 2
interval 3
}
vrrp_instance eth0_1 {
interface eth0
virtual_ipaddress {
172.168.100.1/24 label eth0:900
}
priority 100
advert_int 3
garp_master_refresh 5
virtual_router_id 1
}
vrrp_instance eth1_2 {
interface eth1
virtual_routes {
0.0.0.0/0 via 172.16.100.1 dev eth1
}
virtual_ipaddress {
192.168.100.1/24 label eth1:900
}
priority 100
advert_int 3
garp_master_refresh 5
virtual_router_id 2
track_script {
TEST
}
}

@pqarmitage
Copy link
Collaborator

Many thanks for reporting this.

Commit 4e4d391 updates the keepalived.conf(5) man page to reflect what actually happens.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants