Re: unset auth_pass and invalid auth_type is ok?
Quentin Armitage <[email protected]> Tue, 11 Sep 2018 13:49:19 +0100
| Newsgroups | gmane.linux.keepalived.devel |
|---|---|
| Organization | The Armitage family |
| Message-ID | <[email protected]> |
--===============4242443683889818999==
Content-Type: multipart/alternative; boundary="=-4nNEH+amUW4+GDUMLNo/"
--=-4nNEH+amUW4+GDUMLNo/
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: 7bit
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
--=-4nNEH+amUW4+GDUMLNo/
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
<html><head></head><body bgcolor=3D"#ffffff" text=3D"#2e3436" link=3D"#2a76=
c6" vlink=3D"#2e3436"><div>On Tue, 2018-09-11 at 13:39 +0200, Alexander Kol=
odziej wrote:</div><blockquote type=3D"cite" style=3D"margin:0 0 0 .8ex; bo=
rder-left:2px #729fcf solid;padding-left:1ex"><pre>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=20
advertisment...
Since the auth_type value is nonsense, and auth_pass unset, i would=20
expect keepalived to go into faulty state,
but it didnt. It just remained in backup-state.
Shouldnt it? :)
wbr / Alex
ps. state=3Dbackup in the conf, and also nopreempt is set.
</pre></blockquote><div><br></div><div>Alex,</div><div><br></div><div>From =
looking at the code, you should have had a log message:</div><div><i> unkn=
own authentication type</i></div><div>when keepalived parsed the configurat=
ion at startup (see vrrp_auth_type_handler() in vrrp_parser.c). This check =
was added in v1.2.20, which is very old now.</div><div><br></div><div>Unfor=
tunately 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 ge=
t the following in the logs:</div><blockquote type=3D"cite" style=3D"margin=
:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div>Tue Sep 1=
1 13:24:21 2018: (VI_1) unknown authentication type '<password>'</div=
><div>Tue Sep 11 13:24:21 2018: *** Configuration line starting `auth_pass`=
is missing a parameter after keyword `auth_pass` at word position 2</div><=
/blockquote><div>and keepalived exits.</div><div><br></div><div>In the curr=
ent version it adds the line number where the configuration error lies:</di=
v><blockquote type=3D"cite" style=3D"margin:0 0 0 .8ex; border-left:2px #72=
9fcf solid;padding-left:1ex"><div>Tue Sep 11 13:38:21 2018: (Line 31) (VI_1=
) unknown authentication type '<password>'</div><div>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</div></blockquote>=
<div><br></div><div>In both cases, in the log of the parent process there i=
s an entry:</div><blockquote type=3D"cite" style=3D"margin:0 0 0 .8ex; bord=
er-left:2px #729fcf solid;padding-left:1ex"><div>Tue Sep 11 13:38:21 2018: =
Keepalived_vrrp exited with permanent error CONFIG. Terminating</div></bloc=
kquote><div><br></div><div>I hope that helps,</div><div>Quentin Armitage</d=
iv><div><br></div><div><br></div><div><br></div><div><br></div></body></htm=
l>
--=-4nNEH+amUW4+GDUMLNo/--
--===============4242443683889818999==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--===============4242443683889818999==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Keepalived-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/keepalived-devel
--===============4242443683889818999==--