Multiple floating IPs from the same external network are associated to one port when commands are executed at the same time
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Low
|
Lujin Luo |
Bug Description
I have three controller nodes and the Neutron servers on these controllers are set behind Pacemaker and HAProxy to realize active/active HA using DevStack. MariaDB Galera cluster is used as my database backend. I am using the latest codes.
If I have multiple commands to create floating IPs and associate them to the same port at the same time, all of the commands would return success and end up with multiple floating IPs from the same external network associated to the same port.
How to reproduce:
Step 1: Create a network
$ neutron net-create net1
Step 2: Create a subnet on the network
$ neutron subnet-create --name subnet1 net1 192.168.100.0/24
Step 3: Create a port on the network
$ neutron port-create net1
Step 4: Create a router
$ neutron router-create router-
Step 5: Add the subnet as its interface
$ neutron router-
Step 5: Create an external network
$ neutron net-create ext-net --router:external True
Step 6: Add a subnet on the external network
$ neutron subnet-create --name ext-subnet ext-net 192.168.122.0/24
Step 7: Set the external network as the router's default gateway
$ neutron router-gateway-set router-
Step 8: Run the three commands at the same time to create floating IPs
On controller1:
$ neutron floatingip-create ext-net --port-id b53d0826-
On controller2:
$ neutron floatingip-create ext-net --port-id b53d0826-
On controller3:
$ neutron floatingip-create ext-net --port-id b53d0826-
where, port_id b53d0826-
The result would be three floating IPs associated to the same port, as shown in http://
The expected error message (say, we run the second command after the first one succeeds) would be
Cannot associate floating IP 192.168.122.20 (bd4d47a5-
Since one port with one fixed_ip is not allowed to have multiple floating IPs from the same external network.
In the above procedure, I set port_id when creating these three floating IPs. Same bug occurred when I updated three existing floating IPs to be associated with the same port at the same time.
I assume this bug happens because multiple APIs are executed concurrently and the validation check on every API succeeds [1].
[1] https:/
-------
The clearer bug description should be to mitigate one fixed_ip_address on one port to be associated with multiple floating_
This implies the following 2 use cases are allowed/supported in Neutron:
1. one port_id with different fixed_ip_
2. same fixed_ip_address can associate to same floating_
Changed in neutron: | |
assignee: | nobody → Lujin Luo (luo-lujin) |
tags: | added: l3-ipam-dhcp |
Changed in neutron: | |
importance: | Undecided → High |
Changed in neutron: | |
importance: | High → Low |
description: | updated |
Changed in neutron: | |
milestone: | none → newton-rc1 |
Fix proposed to branch: master /review. openstack. org/276018
Review: https:/