Fail to remove l2gw connection When Ucast_Macs_Remote table have multi records with the same mac and same logical switch.

Bug #1884176 reported by fanghuilin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
networking-l2gw
In Progress
Undecided
fanghuilin

Bug Description

Fail to remove l2gw connection When Ucast_Macs_Remote table have multi records with the same mac and same logical switch. When exist port has allow address pair config before create l2gw connection, it will happen this failure.

Step 1: Create two ports, set one port with allow address pair of another port.

openstack port create --network 318ee112-4254-4139-abed-b51125a3fe29 --fixed-ip ip-address=172.31.10.120 --device-owner test svciptest

# 172.31.10.206 set it's allow address pair with 172.31.10.120
openstack port set --allowed-address ip-address=172.31.10.120 71835b46-dcf8-48c6-9539-a1d5a39d20c7

Step 2: Create a l2gw connection, then I can see there will have multi records with the same mac and same logical switch in Ucast_Macs_Remote table.

openstack l2gw connection create --default-segmentation-id 100 gw1 fhl-self-network

Step 3: Look at here, 172.31.10.206 and 172.31.10.120 will have the same mac of fa:16:3e:64:bf:d2

Ucast_Macs_Remote table
MAC _uuid ipaddr locator logical_switch
------------------- ------------------------------------ --------------- ------------------------------------ ------------------------------------
"6c:92:bf:91:87:3d" 7de6c64d-4e17-4e1f-8144-c9930b5f8913 "10.10.0.163" 944b77cd-4921-4b8b-8db3-22db4ffb8a71 197c1d04-612f-4d7f-9128-06ee0cd35fd1
"fa:16:3e:0f:1a:f4" 8aab4bbb-df94-47ad-b3ad-47265127eec8 "172.31.10.3" 944b77cd-4921-4b8b-8db3-22db4ffb8a71 b17aab90-6871-44eb-85ac-7e60bbdcc6d5
"fa:16:3e:1d:2a:58" d524971e-788f-40aa-aa6a-33adc44b7bd8 "172.31.10.1" e2457b8a-b46a-4964-b279-546a75ef5eec b17aab90-6871-44eb-85ac-7e60bbdcc6d5
"fa:16:3e:22:bd:9d" 70146bc5-8ea4-411a-996d-0511b811e9c7 "172.31.10.249" 32fe849e-4822-4452-bc0a-dff60ee42a0e b17aab90-6871-44eb-85ac-7e60bbdcc6d5
"fa:16:3e:34:52:48" 7e90082e-6961-4d6b-9e4a-f2ab0cc136b6 "172.31.10.5" ec8a0934-c8d6-43a8-adf9-be554453bd20 b17aab90-6871-44eb-85ac-7e60bbdcc6d5
"fa:16:3e:4a:f0:14" 5ed49c2e-552d-4e84-937e-e866fb8eeaef "172.31.10.120" ec8a0934-c8d6-43a8-adf9-be554453bd20 b17aab90-6871-44eb-85ac-7e60bbdcc6d5
"fa:16:3e:64:bf:d2" 13d4bed0-984f-4710-a3ba-288558abba4e "172.31.10.120" 3f4357c1-4d40-4271-bae5-8df5002c5c34 b17aab90-6871-44eb-85ac-7e60bbdcc6d5
"fa:16:3e:64:bf:d2" ab289528-737c-475d-81cb-6bf3eb1674e1 "172.31.10.206" 3f4357c1-4d40-4271-bae5-8df5002c5c34 b17aab90-6871-44eb-85ac-7e60bbdcc6d5
"fa:16:3e:89:a4:17" 9a1823e3-8982-41b5-b9ad-f906d69ac8d3 "172.31.10.2" e2457b8a-b46a-4964-b279-546a75ef5eec b17aab90-6871-44eb-85ac-7e60bbdcc6d5
"fa:16:3e:b0:b1:42" f4a5e0d6-ccdc-4fcb-8007-7eb01f878c6a "172.31.10.111" 944b77cd-4921-4b8b-8db3-22db4ffb8a71 b17aab90-6871-44eb-85ac-7e60bbdcc6d5
"fa:16:3e:b1:8f:bb" 5e1d0233-6327-4282-bac6-aad58c2bb7c8 "172.31.10.75" 32fe849e-4822-4452-bc0a-dff60ee42a0e b17aab90-6871-44eb-85ac-7e60bbdcc6d5
"fa:16:3e:ed:10:15" 7a51d481-c1c1-4ba6-845b-183d518bc8e0 "172.31.10.6" 32fe849e-4822-4452-bc0a-dff60ee42a0e b17aab90-6871-44eb-85ac-7e60bbdcc6d5
"fa:16:3e:f1:1a:ed" 6eb28a15-cfe2-4a27-9830-34ac2330adc6 "172.31.10.101" 3f4357c1-4d40-4271-bae5-8df5002c5c34 b17aab90-6871-44eb-85ac-7e60bbdcc6d5
"fa:16:3e:f3:56:97" ebe3a8ed-9f6e-47c4-bb55-016912bd4995 "172.31.10.192" 3f4357c1-4d40-4271-bae5-8df5002c5c34 b17aab90-6871-44eb-85ac-7e60bbdcc6d5
"fa:16:3e:f4:77:01" 5ef69816-4be3-4172-a67a-1d747bff7fb0 "172.31.10.4" 3f4357c1-4d40-4271-bae5-8df5002c5c34 b17aab90-6871-44eb-85ac-7e60bbdcc6d5

Step 4: Remove l2gw connection, the command will fail.

# openstack l2gw connection delete 3d0ac3fa-e868-45bb-b900-4e25af9da1a2

Failed to delete L2 Gateway Connection with name or ID '3d0ac3fa-e868-45bb-b900-4e25af9da1a2': Request Failed: internal server error while processing your request.
Neutron server returns request_ids: ['req-add638c3-69b6-4b52-84f6-aa0fb13d8130']
Failed to delete 1 of 1 L2 Gateway Connection.

2020-06-18 18:49:18.256 178014 ERROR neutron.api.v2.resource [req-add638c3-69b6-4b52-84f6-aa0fb13d8130 a7ad28c934a84cdca96ba47623110949 02c0f9589cca400abd623868516c209b - default default] delete failed: No details.: MultipleResultsFound: Multiple rows were found for one()

Changed in networking-l2gw:
status: New → In Progress
assignee: nobody → fanghuilin (fanghuilin1987)
Revision history for this message
Lajos Katona (lajos-katona) wrote :

Thanks for the bug report, I have some time this week to verify your reproduction steps

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.