yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #76058
[Bug 1797298] Re: Router gateway device are repeatedly configured When ha changed
Reviewed: https://review.openstack.org/609587
Committed: https://git.openstack.org/cgit/openstack/neutron/commit/?id=6541304d5e4103237135f7783c82458199d61bcb
Submitter: Zuul
Branch: master
commit 6541304d5e4103237135f7783c82458199d61bcb
Author: hujin <hujin@xxxxxxxxxx>
Date: Thu Oct 11 13:28:11 2018 +0800
filter "updated_at" and "revision_number" in _gateway_ports_equal
When the HA attribute of the router changes, the code determines
whether the gateway in memory is consistent with the gateway
in the database to decide whether it needs to be reconfigured.
But there are problems with the judging conditions.
After the HA attribute of the router changes, the relevant parameters
of gateway port will be updated by ML2 agent,
including "binding:host_id"、"updated_at" and "revison_number".
Method "_gateway_ports_equal" removes
only the "binding:host_id" property of the port,
resulting in unequal results for each decision
Change-Id: I19e024ff360611d191da2bd3bff1b86abe1a8ea1
Closes-Bug: 1797298
** 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/1797298
Title:
Router gateway device are repeatedly configured When ha changed
Status in neutron:
Fix Released
Bug description:
When the router ha changed, the code determines whether the gateway in
memory is consistent with the gateway in the database to decide
whether it needs to be reconfigured. But there are problems with the
judging conditions.
After router HA changed, the relevant parameters of gateway port will
be updated by ML2 agent, including binding_host and updated_at.
The code of ha_router, method _gateway_ports_equal removes only the
binding_host property of the port, resulting in unequal results for
each decision
@staticmethod
def _gateway_ports_equal(port1, port2):
def _get_filtered_dict(d, ignore):
return {k: v for k, v in d.items() if k not in ignore}
keys_to_ignore = set([portbindings.HOST_ID])
port1_filtered = _get_filtered_dict(port1, keys_to_ignore)
port2_filtered = _get_filtered_dict(port2, keys_to_ignore)
return port1_filtered == port2_filtered
So every time ha switches, the gateway is reconfigured.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1797298/+subscriptions
References