Comment 3 for bug 1467531

Revision history for this message
Sridhar Gaddam (sridhargaddam) wrote :

@Assaf, I encountered this issue while testing the L3 HA setup with keepalived version less than 1.2.10
Basically, I have seen this issue while testing IPv6 scenarios.
I do not have the setup now to share the exact version of keepalived as I've seen this issue sometime back.

However, using the following commands we can reproduce the setup.
~# ip -6 route add default dev qg-6028c86a-25 metric 1
~# ip -6 route
fd00::/64 dev qg-6028c86a-25 proto kernel metric 256
fd01:1::/64 dev qr-9dd2fd9f-37 proto kernel metric 256
fe80::/64 dev qg-6028c86a-25 proto kernel metric 256
fe80::/64 dev qr-9dd2fd9f-37 proto kernel metric 256
default dev qg-6028c86a-25 metric 1
~#

In such a situation, if we try to read the default gateway using ip_lib, we get the following output
gateway_dev.route.get_gateway(ip_version=6)
{'metric': 1, 'gateway': '1'}

Note: Just to cross-check, I wanted to see what python netifaces package [1]
returns in such situations. I could see that it returns the output properly
(i.e., empty gateway_ip).
[1] - https://pypi.python.org/pypi/netifaces