Bug 1232073 - keepalived does not call vrrp_instance notify script
Summary: keepalived does not call vrrp_instance notify script
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: keepalived
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Ryan O'Hara
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-06-16 02:35 UTC by Andrew J. Schorr
Modified: 2015-07-14 15:43 UTC (History)
4 users (show)

Fixed In Version: keepalived-1.2.18-1.fc22
Clone Of:
Environment:
Last Closed: 2015-07-14 15:42:02 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Andrew J. Schorr 2015-06-16 02:35:00 UTC
Description of problem: When "keepalived --vrrp -D" starts as MASTER, it does not call the vrrp_instance notify script.  This worked correctly in the previous version keepalived-1.2.16.


Version-Release number of selected component (if applicable):
keepalived-1.2.17-2.fc21.x86_64

How reproducible:
Create /etc/keepalived/keepalived.conf with a vrrp_instance that starts in state MASTER with a notify script.  Notice that the notify script is not called when keepalived is started.

Steps to Reproduce:
1. In /etc/sysconfig/keepalived, set KEEPALIVED_OPTIONS="--vrrp -D"
2. In /etc/keepalived/keepalived.conf, configure a vrrp_instance with state MASTER and a notify script.
3.

Actual results:
The notify script is not called when keepalived starts.

Expected results:
The notify script should be called.

Additional info: This works correctly in keepalived-1.2.16-1.fc21.x86_64

Comment 1 Andrew J. Schorr 2015-06-16 02:58:46 UTC
This is also true when the instance starts in the BACKUP state.  I'm not sure whether notify is called when there is a state transition, but it's never getting called at startup.

Comment 2 Andrew J. Schorr 2015-06-16 03:09:41 UTC
I just tested a transition from BACKUP to MASTER and then to BACKUP again, and I do not think the notify script is ever called.  From the ChangeLog, it appears that there were lots of patches related to notify in the new release.  It seems to be completely broken.

Regards,
Andy

Comment 3 Ryan O'Hara 2015-06-16 11:25:29 UTC
Please check to see if SELinux is enabled. If so, could you look for any AVCs that might be preventing the notify scripts from running?

ausearch -m avc

Comment 4 Andrew J. Schorr 2015-06-16 12:29:16 UTC
SElinux is disabled:

[hero@ti50 ~]$ selinuxenabled && echo YES
[hero@ti50 ~]$ grep -w SELINUX /etc/sysconfig/selinux 
# SELINUX= can take one of these three values:
SELINUX=disabled

Regards,
Andy

Comment 5 Andrew J. Schorr 2015-06-17 00:33:39 UTC
FYI, I created an upstream bug report here:

https://sourceforge.net/p/keepalived/bugs/14/

Regards,
Andy

Comment 6 Ryan O'Hara 2015-06-17 14:07:00 UTC
(In reply to Andrew J. Schorr from comment #5)
> FYI, I created an upstream bug report here:
> 
> https://sourceforge.net/p/keepalived/bugs/14/

I am not sure that the upstream maintainer monitors that sourceforge page. Your best bet is to open an issue on the github page [1] and/or contact the mailing list [2]. I will be investigating this problem soon.

[1] https://github.com/acassen/keepalived
[2] http://lists.sourceforge.net/mailman/listinfo/keepalived-devel

Comment 7 Andrew J. Schorr 2015-06-17 14:40:24 UTC
Thanks for redirecting me.  I opened an issue on github:

https://github.com/acassen/keepalived/issues/156

Comment 8 Ryan O'Hara 2015-06-18 01:13:52 UTC
I did some tests this evening. Just to be clear we're talking about the "notify" script, not the "notify_master" or "notify_backup", right? I was able to get "notify_master" to work, but "notify" did not. In face, my current configuration has two VRRP instances defined and if I specify a notify script in the first instance, the second instance does not even get parsed. Seems like something is broken in the parser. I will continue investigating.

Comment 9 Andrew J. Schorr 2015-06-18 01:17:12 UTC
Thanks for following up on this.  I'm talking about the "notify" script.  Here's my config (as I posted in the github ticket):

vrrp_instance firewall {
state BACKUP
interface lan0.3009
virtual_router_id 66
priority 150
advert_int 1
authentication {
auth_type PASS
auth_pass pw32wd
}
virtual_ipaddress {
192.168.1.1/28 brd 192.168.1.63 dev lan0.3004
}
notify /etc/keepalived_notify.sh
}

Comment 10 Ryan O'Hara 2015-06-18 01:44:44 UTC
I've not verified this yet, but it appears this patch is the root of the problem:

https://github.com/acassen/keepalived/commit/5c4177381bee24f9f7fbe33b8dc20c2d9cc2bccb

Comment 11 Ryan O'Hara 2015-06-18 13:50:49 UTC
It was explained on the mailing list that 'notify' now takes a list of script, so what you want to have in keepalived.conf is:

notify {
    /etc/keepalived_notify.sh
}

That should fix the problem. However, the patch that introduced this feature is causes major incompatibility with existing configurations where 'notify' is a single script. For this reason I am going to revert the patch and rebuild Fedora packages.

Comment 12 Andrew J. Schorr 2015-06-18 14:56:47 UTC
That makes sense.  This is not a minor release change, and it's not documented.  And please see my subsequent remark in the github thread -- there seems to be another bug that causes the notify script to be called twice.  Overall, I'd say that this release is not ready yet.

Comment 13 Andrew J. Schorr 2015-06-18 19:10:25 UTC
See also this bug:

https://github.com/acassen/keepalived/issues/157

Do we want a separate Fedora bugzilla for this?

Comment 14 Ryan O'Hara 2015-06-18 21:02:17 UTC
(In reply to Andrew J. Schorr from comment #13)
> See also this bug:
> 
> https://github.com/acassen/keepalived/issues/157
> 
> Do we want a separate Fedora bugzilla for this?

Not necessarily. Let's chase that upstream and see what happens.

Comment 15 Fedora Update System 2015-06-23 13:56:15 UTC
keepalived-1.2.17-4.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/keepalived-1.2.17-4.fc21

Comment 16 Fedora Update System 2015-06-23 13:57:27 UTC
keepalived-1.2.17-4.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/keepalived-1.2.17-4.fc22

Comment 17 Fedora Update System 2015-06-24 15:56:13 UTC
Package keepalived-1.2.17-4.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing keepalived-1.2.17-4.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2015-10567/keepalived-1.2.17-4.fc21
then log in and leave karma (feedback).

Comment 18 Fedora Update System 2015-07-01 15:52:25 UTC
keepalived-1.2.18-1.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/keepalived-1.2.18-1.fc22

Comment 19 Fedora Update System 2015-07-01 15:52:37 UTC
keepalived-1.2.18-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/keepalived-1.2.18-1.fc21

Comment 20 Fedora Update System 2015-07-14 15:42:02 UTC
keepalived-1.2.18-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2015-07-14 15:43:56 UTC
keepalived-1.2.18-1.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.