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

vrrp_instance notify_stop never executes #185

Closed
davewongillies opened this issue Aug 21, 2015 · 6 comments
Closed

vrrp_instance notify_stop never executes #185

davewongillies opened this issue Aug 21, 2015 · 6 comments

Comments

@davewongillies
Copy link

I'm attempting to use the notify_stop option in my vrrp_instance but I'm noticing that when stopping keepalived that it never gets executed. The only log entry I see in syslog is:

Aug 21 01:34:10 my-keepalived-server Keepalived[30476]: Stopping Keepalived v1.2.13 (06/15,2014)

Is this the correct option to use when I want notifications of vrrp_instances being stopped when shutting down keepalived or is there something else I should be using?

vrrp_instance my_instance {
    state BACKUP
    interface eth0
    virtual_router_id 1
    priority 50
    advert_int 5

    smtp_alert
    notify_stop "/usr/local/sbin/keepalived_notify.sh"
    notify "/usr/local/sbin/keepalived_notify.sh"

    authentication {
        auth_type PASS
        auth_pass myp@assw0rd
    }

    include /etc/keepalived/conf.d/vrrp/instance.my_instance/*.conf
}

NB, the notify option works as expected when failing over my keepalived servers.

@acassen
Copy link
Owner

acassen commented Aug 21, 2015

1.2.13 is too old, consider upgrading.

@acassen acassen closed this as completed Aug 21, 2015
@davewongillies
Copy link
Author

I've built version 1.2.19 and I'm still seeing exactly the same behaviour:

Aug 21 04:53:44 my-keepalived-server Keepalived[5662]: Stopping Keepalived v1.2.19 (08/21,2015)

@acassen
Copy link
Owner

acassen commented May 31, 2019

Hello,

1.2.19 is also way too old. Current stable release is 2.0.16, there has been tons of extensions and fixes since 1.2.19 release. Please consider upgrading to last stable.

@davewongillies
Copy link
Author

@acassen thanks for replying to this almost 4 years later. I'm not in a job where I use keepalived anymore.

@acassen
Copy link
Owner

acassen commented May 31, 2019

fun enough :)... I received a pop-up on GitHub just today... didn't look at the date... sorry about that.

@ChrLau
Copy link

ChrLau commented Oct 13, 2021

Just some FYI: I noticed the same behaviour with the keepalived versions from Debian Stretch (Version 1.3.2) and Debian Buster (Version 2.0.10).

But it works with the Version 2.1.5 which is included in Debian Bullseye.
Haven't compiled or tested any 2.2.x releases.
For those who have systemd: A useable workaround is using drop-in file for the keepalived unit file and do whatever you need with the ExecStopPost and similiar parameters (see: https://www.freedesktop.org/software/systemd/man/systemd.service.html)

Keepalived v2.1.5 (07/13,2020)

Copyright(C) 2001-2020 Alexandre Cassen, <acassen@gmail.com>

Built with kernel headers for Linux 5.8.14
Running on Linux 5.10.0-9-amd64 #1 SMP Debian 5.10.70-1 (2021-09-30)

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 --with-kernel-dir=debian/ --enable-snmp --enable-sha1 --enable-snmp-rfcv2 --enable-snmp-rfcv3 --enable-dbus --enable-json --enable-bfd --enable-regex build_alias=x86_64-linux-gnu CFLAGS=-g -O2 -fdebug-prefix-map=/build/keepalived-NUm5zo/keepalived-2.1.5=. -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 JSON BFD OLD_CHKSUM_COMPAT FIB_ROUTING SNMP_V3_FOR_V2 SNMP_VRRP SNMP_CHECKER SNMP_RFCV2 SNMP_RFCV3 DBUS

System options:  PIPE2 SIGNALFD INOTIFY_INIT1 VSYSLOG EPOLL_CREATE1 IPV4_DEVCONF IPV6_ADVANCED_API 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 RTA_TTL_PROPAGATE IFA_FLAGS IP_MULTICAST_ALL 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_VMAC VRRP_IPVLAN IFLA_LINK_NETNSID CN_PROC SOCK_NONBLOCK SOCK_CLOEXEC O_PATH GLOB_BRACE INET6_ADDR_GEN_MODE VRF SO_MARK SCHED_RESET_ON_FORK

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

3 participants