Comment 7 for bug 2004004

Revision history for this message
Florian Engelmann (engelmann) wrote :

Hello Rodolfo,

the change we did to fix our situation was:

--- a/neutron/agent/linux/keepalived.py
+++ b/neutron/agent/linux/keepalived.py
@@ -144,7 +144,7 @@ class KeepalivedInstanceRoutes(object):

     @property
     def routes(self):
- return self.gateway_routes + self.extra_routes + self.extra_subnets
+ return self.extra_subnets + self.gateway_routes + self.extra_routes

     def __len__(self):
         return len(self.routes)
--
2.34.1

So the extra subnet is set before the default route (with the GW out of CIDR of the "normal" subnet) is set.

Example result:
before:
    virtual_routes {
        0.0.0.0/0 via 100.100.100.33 dev qg-7b9963a7-72
        100.100.100.32/29 dev qg-7b9963a7-72 scope link
    }

after patch:

    virtual_routes {
        100.100.100.32/29 dev qg-7b9963a7-72 scope link
        0.0.0.0/0 via 100.100.100.33 dev qg-7b9963a7-72
    }

All the best,
Florian