Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 412393 - sys-cluster/keepalived-1.2.2-r3 not emailing notices
Summary: sys-cluster/keepalived-1.2.2-r3 not emailing notices
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal
Assignee: Gentoo Cluster Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-04-17 18:14 UTC by jon
Modified: 2012-07-24 16:16 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Keepalived configuration sample (keepalived.conf,533 bytes, text/plain)
2012-07-11 14:00 UTC, jon
Details
mail relaying keepalived config (keepalived.smtp.example.conf,1.68 KB, text/plain)
2012-07-11 14:34 UTC, Ultrabug
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jon 2012-04-17 18:14:17 UTC
From what I read in the docs keepalived is supposed to send email notices when its VRRP status changes between master and backup. Yet I see no indication that it ever tries to send the email. Sendmail and keepalived don't log anything. I increased keepalived's logging verbosity and I saw it registered the email settings from global_defs. Yet when the status switched it didn't log an attempt to send an email (not that it necessarily would), nor an error. Sendmail did not log a connection attempt.
Comment 1 Ultrabug gentoo-dev 2012-07-11 09:42:19 UTC
On all the servers I have keepalived running, I receive the mails just fine.

Mind you elaborate on your issue and share a bit of your config maybe please ?
Comment 2 jon 2012-07-11 14:00:21 UTC
Created attachment 317922 [details]
Keepalived configuration sample

This is a typical config from our systems with all sensitive info replaced with generic info.
Comment 3 jon 2012-07-11 14:03:42 UTC
We have over a half dozen servers and none of them attempt to send emails when the state changes. So we added a "notify" script to send the emails. We also change the conf.d/keepalived to contain:

opts="--vrrp"

To run keepalived in VRRP only mode. We only use the VRRP facility.
Comment 4 Ultrabug gentoo-dev 2012-07-11 14:34:14 UTC
Created attachment 317926 [details]
mail relaying keepalived config

You may be missing the smtp_alert directive in the vrrp_instance declaration (see my sample conf).

This is a sample config of mine (I use postfix as a local MTA but yours should work anyway)
Comment 5 jon 2012-07-11 15:28:35 UTC
My apologies. I can't tell you how many times I reviewed the man pages and the PDF docs I had printed and missed that directive. Thanks for clearing this up. I'll have to try it out later but I assume it will work.
Comment 6 Ultrabug gentoo-dev 2012-07-11 16:20:52 UTC
(In reply to comment #5)
> My apologies. I can't tell you how many times I reviewed the man pages and
> the PDF docs I had printed and missed that directive. Thanks for clearing
> this up. I'll have to try it out later but I assume it will work.

It happens mate, I hope this solves your problem, please keep this bug updated about your results so I can close it when you're done.
Comment 7 Ultrabug gentoo-dev 2012-07-24 07:28:21 UTC
Almost-two-weeks timeout, closing. Feel free to re-open if needed, cheers.
Comment 8 jon 2012-07-24 16:13:30 UTC
(In reply to comment #7)
> Almost-two-weeks timeout, closing. Feel free to re-open if needed, cheers.

I was able to put the "smtp_alert" in our configs late last week. Yes the notices are getting sent. Sorry for wasting your time. Thanks for your help.
Comment 9 Ultrabug gentoo-dev 2012-07-24 16:16:35 UTC
No problemo, it's cool to know it helped :) cheers.