keepalived and DNS

"Ryan O'Hara" <[email protected]>
Newsgroups gmane.linux.keepalived.devel
Message-ID <[email protected]>
I have a problem where keepalived is running in a network namespace
that does not have access to DNS. The end result is that we see some
flapping between master/backup state whenever a restart occurs. I
believe I know why.

On restart, keepalived will allocate new global data, which includes
the router ID and default "email_from" value. Both of there are
subject to DNS lookups since both will call get_local_name() which
in-turn calls getaddrinfo. If keepalived does not have access to DNS,
getaddrinfo will block and we see some flapping between master/backup
states. At least this is my theory.

My first inclination is to remove getaddrinfo completely. The result
would be that router_id would default to <uname> and the default
email_from would be root@<uname>. I don't think this would cause any
real problems, but wanted to pitch this idea before submitting the
patch.

Alternatively, it would be nice if keepalived did not set the default
the default email_from value unless SMTP notifications were
enabled. This appears to be a bit more tricky since we would need to
defer setting the default email_from until after the global parser had
finished parsing.

Thoughts? Looking for some feedback before I post a patch. Thanks.

Ryan


------------------------------------------------------------------------------
BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT
Develop your own process in accordance with the BPMN 2 standard
Learn Process modeling best practices with Bonita BPM through live exercises
http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_
source=Sourceforge_BPM_Camp_5_6_15&utm_medium=email&utm_campaign=VA_SF
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.