yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #51521
[Bug 1568197] Re: Problems with neutron.common.constants import break HA and DVRHA functionality
** 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/1568197
Title:
Problems with neutron.common.constants import break HA and DVRHA
functionality
Status in neutron:
Fix Released
Bug description:
Many files in the neutron project use this import:
from neutron.common import constants as l3_const
or some variation of it.
For some reason this import is not working correctly.
Particularly the following lines from ithe file neturon.common.constants seem to not take effect (or value of constant) gets reverted:
L24 - L 31:
# TODO(anilvenkata) Below constants should be added to neutron-lib
DEVICE_OWNER_HA_REPLICATED_INT = (lib_constants.DEVICE_OWNER_NETWORK_PREFIX +
"ha_router_replicated_interface")
ROUTER_INTERFACE_OWNERS = lib_constants.ROUTER_INTERFACE_OWNERS + \
(DEVICE_OWNER_HA_REPLICATED_INT,)
ROUTER_INTERFACE_OWNERS_SNAT = lib_constants.ROUTER_INTERFACE_OWNERS_SNAT + \
(DEVICE_OWNER_HA_REPLICATED_INT,)
The ROUTER_INTERFACE_OWNER and ROUTER_INTERFACE_OWNER_SNAT constants
do not seem to take the new values assigned to them: original-tuple +
DEVICE_OWNER_HA_REPLICATED_INT
In files which use the import mentioned above: "from neutron.common import constant" or a variation of it, the values
of ROUTER_INTERFACE_OWNERS and ROUTER_INTERFACE_OWNERS_SNAT do not contain the value "ha_router_replicated_interface"
This is causing problems with HA router and DVRHA routers because the
files neutron/db/l3_dvr_db.py and neutron/db/l3_hamode_db.py make use
of the constants neutron.common.constants.ROUTER_INTERFACE_OWNERS and
neutron.common.constants.ROUTER_INTERFACE_OWNERS_SNAT to figure out
what ports belong to a router.
Since the "ha_router_replicated_interface" is not listed in either one
of those variables, the neutron server (q-svc) does not include any
ports which are owned by ha_router_replicated_interface as part of
router updates.
To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/1568197/+subscriptions
References