This patch implements a more resilient approach to handle the case
where Neutron API workers are killed and restarted. Instead of marking
all nodes for that host as offline, this patch tries to remove the
worker that was killed from the Hash Ring leaving all others nodes for
that host online.
In case the we fail to remove the node and another entry is added upon the
restart of the worker this patch also logs a clear critical log message to
alert the operator that there are more Hash Ring nodes than API workers
(it's expect to be the same) and that OVSDB events could go missing if
they are routed to the previous node that failed to be removed from the
ring.
Closes-Bug: #2024205
Change-Id: I4b7376cf7df45fcc6e487970b068d06b4e74e319
Signed-off-by: Lucas Alvares Gomes <email address hidden>
(cherry picked from commit 9e8e3a7867b689ca1bd462ddff294db030032350)
Reviewed: https:/ /review. opendev. org/c/openstack /neutron/ +/890393 /opendev. org/openstack/ neutron/ commit/ ebd19805b840f59 1fd47be452d5414 07efc428b2
Committed: https:/
Submitter: "Zuul (22348)"
Branch: stable/zed
commit ebd19805b840f59 1fd47be452d5414 07efc428b2
Author: Lucas Alvares Gomes <email address hidden>
Date: Fri Jun 16 13:44:07 2023 +0100
[OVN] Hash Ring: Better handle Neutron worker failures
This patch implements a more resilient approach to handle the case
where Neutron API workers are killed and restarted. Instead of marking
all nodes for that host as offline, this patch tries to remove the
worker that was killed from the Hash Ring leaving all others nodes for
that host online.
In case the we fail to remove the node and another entry is added upon the
restart of the worker this patch also logs a clear critical log message to
alert the operator that there are more Hash Ring nodes than API workers
(it's expect to be the same) and that OVSDB events could go missing if
they are routed to the previous node that failed to be removed from the
ring.
Closes-Bug: #2024205 cc6e487970b068d 06b4e74e319 a1bd462ddff294d b030032350)
Change-Id: I4b7376cf7df45f
Signed-off-by: Lucas Alvares Gomes <email address hidden>
(cherry picked from commit 9e8e3a7867b689c