yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #87634
[Bug 1947993] Re: Non HA router - missing iptables rule for redirect metadata queries to haproxy
Reviewed: https://review.opendev.org/c/openstack/neutron/+/814892
Committed: https://opendev.org/openstack/neutron/commit/41159bd9a4178a5f8a4fdc90b034c48fa9880cac
Submitter: "Zuul (22348)"
Branch: master
commit 41159bd9a4178a5f8a4fdc90b034c48fa9880cac
Author: Slawek Kaplonski <skaplons@xxxxxxxxxx>
Date: Thu Oct 21 12:06:25 2021 +0200
Cleanup router for which processing added router failed
In the _process_added_router() method of the L3 agent, if processing
router will fail, router_info should be cleaned to e.g. be removed from
the router cache so it will not be treated as updated router in next
iteration of the agent.
Closes-Bug: #1947993
Change-Id: Ic0bc3d951d32efadc116708bfe518a711730429d
** Changed in: neutron
Status: In Progress => Fix Released
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/1947993
Title:
Non HA router - missing iptables rule for redirect metadata queries to
haproxy
Status in neutron:
Fix Released
Bug description:
In case of the non-HA routers (dvr and legacy) neutron-l3-agent sends
notifications AFTER_CREATE and AFTER_UPDATE of the router. Metadata
driver is subscribed to those notifications to prepare haproxy in the
router's namespace:
https://github.com/openstack/neutron/blob/8353c2adba08f9e7d5ed61589daef81aaf275fb3/neutron/agent/metadata/driver.py#L281
and
https://github.com/openstack/neutron/blob/8353c2adba08f9e7d5ed61589daef81aaf275fb3/neutron/agent/metadata/driver.py#L294
The difference between those 2 functions is that in after_router_added there is called apply_metadata_nat_rules() to configure nat rules in the iptables in qrouter namespace.
In after_router_update function nat rules aren't created.
And that can cause issue when processing router in _process_added_router() will fail: https://github.com/openstack/neutron/blob/8353c2adba08f9e7d5ed61589daef81aaf275fb3/neutron/agent/l3/agent.py#L626 thus notification AFTER_CREATE router will not be called and nat rules will not be created.
Router will be processed again in next iteration by L3 agent, but this time router_info is already in the agent's router_info cache so it will be treated as updated router. Because of that haproxy will be started but NAT rules will never be created and metadata for instances will not be available.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1947993/+subscriptions
References