Assign gateway IP to LB VIP would disrupt traffic
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
neutron |
Fix Released
|
Undecided
|
Pauline Yeung |
Bug Description
A neutron network directly connected to a hardware router will have a gateway IP which does not have a neutron port. While gateway of a neutron network connected to a neutron router has a neutron port. In our production, there were multiple incidences when user successfully configured network gateway IP not associated with a neutron port as a load balancer VIP. In such scenario, traffic from VM destined outside the network may go to the LB VIP instead. And WAN traffic may not be able to reach VM in this network.
Neutron server should not allow clients to configure a gateway IP as LB VIP, even if this gateway IP is not associated with a neutron port.
The following steps in devstack simulate our production scenario which gateway of a neutron network does not have a port, using
ubuntu 14.04
devstack master e6165e80bab0c06
neutron master 49234a824c16164
python-
$ neutron net-create net-test
Created a new network:
+------
| Field | Value |
+------
| admin_state_up | True |
| id | 5463f934-
| name | net-test |
:
$ neutron subnet-create --name subnet-test net-test --enable_dhcp=True --gateway=
Created a new subnet:
+------
| Field | Value |
+------
| allocation_pools | {"start": "10.33.101.130", "end": "10.33.101.254"} |
| cidr | 10.33.101.128/25 |
| dns_nameservers | |
| enable_dhcp | True |
| gateway_ip | 10.33.101.129 |
| host_routes | |
| id | fc1f55de-
:
$ nova boot --image cc58808c-
$ nova boot --image cc58808c-
$ nova list
+------
| ID | Name | Status | Task State | Power State | Networks |
+------
| 6495b5e4-
| 274c0da6-
+------
$ neutron lb-pool-create --lb-method ROUND_ROBIN --name lb-test --protocol TCP --subnet-id fc1f55de-
$ neutron lb-member-create --address 10.33.101.130 --protocol-port 80 lb-test
$ neutron lb-member-create --address 10.33.101.132 --protocol-port 80 lb-test
$ neutron lb-vip-create --name vip-test --address 10.33.101.129 --protocol-port 80 --protocol TCP --subnet-id fc1f55de-
$ neutron lb-vip-list
+------
| id | name | address | protocol | admin_state_up | status |
+------
| 95dbf2b6-
+------
For neutron network which gateway IP is associated with a neutron port, neutron raises IpAddressInUse exception, and does not allow user to configure gateway IP as LB VIP, as this gateway IP is already used by another port.
$ neutron lb-vip-create --name vip-test --address 192.168.55.1 --protocol-port 80 --protocol TCP --subnet-id e609183f-
Unable to complete operation for network 5c614a70-
neutron/
391 def _test_fixed_
392 device_owner):
:
432 if 'ip_address' in fixed:
433 # Ensure that the IP's are unique
434 if not NeutronDbPlugin
435 subnet_id,
436 fixed['
437 raise n_exc.IpAddress
438 ip_address=
Changed in neutron: | |
milestone: | none → kilo-2 |
status: | Fix Committed → Fix Released |
Changed in neutron: | |
milestone: | kilo-2 → 2015.1.0 |
Will check in a fix.