From this patch: https://review.openstack.org/#/c/341427/
Sometimes, port doesn't revert device_owner to previous value in concurrent requests case.
$ neutron port-create --name port1 net1 | Overlapped CIDR
$ neutron port-create --name port2 net2 |
mysql> select name, device_id, device_owner from ports;
+-------+-------------------------------------------------------------------------------+--------------------------+
| name--| device_id ------------------------------------------------------------------- | device_owner ----------- |
+-------+-------------------------------------------------------------------------------+--------------------------+
| port1 | ----------------------------------------------------------------------------- | ------------------------ |
| port2 | ----------------------------------------------------------------------------- | ------------------------ |
+-------+-------------------------------------------------------------------------------+--------------------------+
$ neutron router-interface-add router-test port=port1 & neutron router-interface-add router-test port=port2
Added interface 68c26144-4ae5-4316-a631-93d5e3a44fd8 to router router-test.
Bad router request: Cidr 192.166.0.0/16 of subnet 87d56713-e6f0-47ee-918d-759cb69b372d overlaps with cidr 192.166.100.0/24 of subnet 94cdfe4c-0e8e-40af-93fe-e8dcc2cb7484.
WE EXPECTED IN DATABASE:
mysql> select name, device_id, device_owner from ports;
+-------+-------------------------------------------------------------------------------+--------------------------+
| name--| device_id-------------------------------------------------------------------- | device_owner ----------- |
+-------+-------------------------------------------------------------------------------+--------------------------+
| port1 | f872184e-031e-43ae-9bc7-e1f05137e09e ---------------------------------------- | network:router_interface |
| port2 | ----------------------------------------------------------------------------- | ------------------------ |
+-------+-------------------------------------------------------------------------------+--------------------------+
BUT, CURRENT RESULT HERE:
mysql> select name, device_id, device_owner from ports;
+-------+-------------------------------------------------------------------------------+--------------------------+
| name--| device_id ------------------------------------------------------------------- | device_owner ----------- |
+-------+-------------------------------------------------------------------------------+--------------------------+
| port1 | f872184e-031e-43ae-9bc7-e1f05137e09e ---------------------------------------- | network:router_interface |
| port2 | ----------------------------------------------------------------------------- | network:router_interface |
+-------+-------------------------------------------------------------------------------+--------------------------+
Review: https:/ /review. openstack. org/#/c/ 367744/