started a patch with tests which verify the correct values of the constants.
It does not solve the problem but it does provide a unittest to verify a fix.
If you put an "import pdb, pdb.set_trace()" inside of common.neutron.constants, the correct values are assigned to the constants,
however the import is NOT happening a the line "from neutron.common import constant as l3_const" in neutron/db/l3_dvr_db.py L28. It is happening much earlier, but once L28 is reached in l3_dvr_db.py, the value of the constant is not correct any more.
As mentioned above, the problem can be seen by simply pulling the patch above (303662)
adding the following on l3_dvr_db.py before L28:
import pdb
pdb.set_trace()
And then running the tests with:
.../tests/unit/db$ py.test ./test_l3_hamode_db.py::L3HATestCase::test_verify_constant_router_interface_owners
and stepping through the code. You should see something like:
(Pdb) n
> /opt/neutron/neutron/db/l3_dvr_db.py(31)<module>()
-> from neutron.common import exceptions as n_exc
(Pdb) l3_const
<neutron.common._deprecate._DeprecateSubset object at 0x7fb28cffe790>
(Pdb) l3_const.ROUTER_INTERFACE_OWNERS
('network:router_interface', 'network:router_interface_distributed')
(Pdb)
started a patch with tests which verify the correct values of the constants.
It does not solve the problem but it does provide a unittest to verify a fix.
https:/ /review. openstack. org/#/c/ 303662/
This seems to be an import problem somewhere.
If you put an "import pdb, pdb.set_trace()" inside of common. neutron. constants, the correct values are assigned to the constants, db/l3_dvr_ db.py L28. It is happening much earlier, but once L28 is reached in l3_dvr_db.py, the value of the constant is not correct any more.
however the import is NOT happening a the line "from neutron.common import constant as l3_const" in neutron/
As mentioned above, the problem can be seen by simply pulling the patch above (303662)
adding the following on l3_dvr_db.py before L28:
import pdb
pdb.set_trace()
And then running the tests with: l3_hamode_ db.py:: L3HATestCase: :test_verify_ constant_ router_ interface_ owners
.../tests/unit/db$ py.test ./test_
and stepping through the code. You should see something like: neutron/ db/l3_dvr_ db.py(31) <module> () common. _deprecate. _DeprecateSubse t object at 0x7fb28cffe790> ROUTER_ INTERFACE_ OWNERS router_ interface' , 'network: router_ interface_ distributed' )
(Pdb) n
> /opt/neutron/
-> from neutron.common import exceptions as n_exc
(Pdb) l3_const
<neutron.
(Pdb) l3_const.
('network:
(Pdb)
NO ha_router_ replicated_ interface