[OVN] ovn_hash_ring table cleanup
Bug #2033281 reported by
Max
This bug affects 4 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Medium
|
Lucas Alvares Gomes |
Bug Description
The ovn hash ring implementation is currently based on the hostname.
Does it make sense to implement a periodic cleanup job? E.g. clean offline nodes which are older than 7 days or so.
In our environment, the ovn_hash_ring table grows a lot because our API runs containerized with random hostnames (e.g. neutron-
MariaDB [neutron]> select count(*) from ovn_hash_ring;
+----------+
| count(*) |
+----------+
| 80957 |
+----------+
1 row in set (0.003 sec)
Changed in neutron: | |
assignee: | nobody → Lucas Alvares Gomes (lucasagomes) |
importance: | Undecided → Medium |
tags: | added: ovn |
To post a comment you must log in.
Hello Max:
What version of Neutron API are you using?
Since [1], the Neutron API deletes the "ovn_hash_ring" associated register when the Neutron API is stopped [2]. Please check that you have this in your code. If you have this patch in your code, please check that you stop the container gracefully, allowing the signal. signal( signal. SIGTERM) method to remove the DB register.
The same method is also removing the associated nodes during the transient start period. But according to your report, you are using different random hostnames (that initially was not considered).
Lucas is also going to propose a maintenance task to perform a periodic clean-up, considering the case you are proposing.
Regards.
[1]https:/ /review. opendev. org/q/I4b7376cf 7df45fcc6e48797 0b068d06b4e74e3 19 /review. opendev. org/c/openstack /neutron/ +/886279/ 2/neutron/ plugins/ ml2/drivers/ ovn/mech_ driver/ mech_driver. py#299
[2]https:/