Re: [Keepalived-devel] unset auth_pass and invalid auth_type is ok?
Status: Beta
Brought to you by:
acassen
|
From: Quentin A. <qu...@ar...> - 2018-09-11 12:49:47
|
On Tue, 2018-09-11 at 13:39 +0200, Alexander Kolodziej wrote:
> Hello!
>
> I discovered that i had
>
> authentication {
> auth_type <password>
> auth_pass
> }
>
> instead of
>
> authentication {
> auth_type PASS
> auth_pass <password>
> }
>
> on a backup/slave server. The syslog had lots of these
>
> Keepalived_vrrp[47370]: receive an invalid passwd!
> Keepalived_vrrp[47370]: bogus VRRP packet received on eth0 !!!
> Keepalived_vrrp[47370]: VRRP_Instance(customer) ignoring received
> advertisment...
>
> Since the auth_type value is nonsense, and auth_pass unset, i would
> expect keepalived to go into faulty state,
> but it didnt. It just remained in backup-state.
>
> Shouldnt it? :)
>
> wbr / Alex
>
> ps. state=backup in the conf, and also nopreempt is set.
Alex,
>From looking at the code, you should have had a log message:
unknown authentication type
when keepalived parsed the configuration at startup (see
vrrp_auth_type_handler() in vrrp_parser.c). This check was added in
v1.2.20, which is very old now.
Unfortunately you don't say what version of keepalived you are using;
for quite some time now (I can't remember which version) keepalived has
detected and logged missing parameters, and then terminated. With
keepalived v2.0.2 I get the following in the logs:
> Tue Sep 11 13:24:21 2018: (VI_1) unknown authentication type
> '<password>'
> Tue Sep 11 13:24:21 2018: *** Configuration line starting `auth_pass`
> is missing a parameter after keyword `auth_pass` at word position 2
and keepalived exits.
In the current version it adds the line number where the configuration
error lies:
> Tue Sep 11 13:38:21 2018: (Line 31) (VI_1) unknown authentication
> type '<password>'
> Tue Sep 11 13:38:21 2018: (Line 32) *** Configuration line starting
> `auth_pass` is missing a parameter after keyword `auth_pass` at word
> position 2
In both cases, in the log of the parent process there is an entry:
> Tue Sep 11 13:38:21 2018: Keepalived_vrrp exited with permanent error
> CONFIG. Terminating
I hope that helps,
Quentin Armitage
|