Comment 1 for bug 1929821

Revision history for this message
Rodolfo Alonso (rodolfo-alonso-hernandez) wrote :

Hello:

Actually reviewing patch [1] I think we can improve a couple of things:

1) How we load the FIP information from the FipRulePriorityAllocator file (the subject of this bug).
In case of not having one of the FIP priorities in the state file, we should try to find it directly on the "ip rule" namespace table, searching for the fixed IP address (if present, as Slawek said). All FIP rules are stored in table FIP_RT_TBL = 16. This is the output of ip_lib.list_ip_rules: http://paste.openstack.org/show/806327/
This is just a matter of finding the IP address and assigning the priority already given. Problem: we cannot allocate a FIP in "self._rule_priorities" with a specific priority. We'll need to remove the rule in the "ip rules" table, allocate it again and write the rule with the new priority.
That will make [2] impossible to happen (I don't image when this could happen).

2) Once we finished reading the FIP list, we'll have "self._rule_priorities" updated. With this information, we can remove any rule present in table FIP_RT_TBL = 16 that is not in "self._rule_priorities". That will clean up any unnecessary "ip rule" present in this table.

Regards.

[1]https://review.opendev.org/q/If656a703c996ccc7719b1b09d793c5bbdfd6f3c1
[2]https://github.com/openstack/neutron/blob/63d8788d0f30aeedd54447e5c7ae7380973bf21a/neutron/agent/l3/dvr_local_router.py#L185-L188