Can't add 2 router interfaces to the same network

Bug #1522773 reported by Antonio Ojea
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
midonet
Fix Committed
High
Brandon Berg
networking-midonet
Invalid
Undecided
Unassigned

Bug Description

The environment is openstack kilo + midonet 5.0.1rc0 + python-neutron-plugin-midonet-2015.1.0-1.el7.noarch

You can't to add a second router to a network ( to use extra-route)m it throws the following error

 neutron router-interface-add ojmgmt port=94040cf8-4f0b-42fd-9788-c5d2d261f6ed
{"message":"Operation failed because the Dhcp with ID f754ada3-1381-4ef4-8443-203a423d927c already references the Port with ID 27bd30a1-cbd6-4400-a50e-59f52f75ca9e via the field router_if_port_id. This field can accommodate only one reference.","code":409}

The port referenced only appears in midonet-cli

port 27bd30a1-cbd6-4400-a50e-59f52f75ca9e device f19863e5-d4b1-4439-9a9d-0377b3d0d1c7 state up plugged no mac fa:16:3e:d5:25:ff address 5.5.5.1 net 5.5.5.0/24 peer bb8d00af-02c9-4b19-ad4a-c4c2c96eaa6e

As you can see below the port is created and out of the range of the dhcp leases

venv-rally)root@sa-lab-08 ~(keystone_admin)$ neutron subnet-show f754ada3-1381-4ef4-8443-203a423d927c
+-------------------+-------------------------------------------+
| Field | Value |
+-------------------+-------------------------------------------+
| allocation_pools | {"start": "5.5.5.10", "end": "5.5.5.254"} |
| cidr | 5.5.5.0/24 |
| dns_nameservers | 8.8.8.8 |
| enable_dhcp | True |
| gateway_ip | 5.5.5.1 |
| host_routes | |
| id | f754ada3-1381-4ef4-8443-203a423d927c |
| ip_version | 4 |
| ipv6_address_mode | |
| ipv6_ra_mode | |
| name | oj-subnet |
| network_id | 20cf2457-c6b6-4f9c-9578-64a089b6e9ee |
| subnetpool_id | |
| tenant_id | 75acb75dde024e4bad3d98bc18952329 |
+-------------------+-------------------------------------------+

(venv-rally)root@sa-lab-08 ~(keystone_admin)$ neutron port-create oj-net --fixed-ip ip_address=5.5.5.5
Created a new port:
+-----------------------+--------------------------------------------------------------------------------+
| Field | Value |
+-----------------------+--------------------------------------------------------------------------------+
| admin_state_up | True |
| allowed_address_pairs | |
| binding:host_id | |
| binding:profile | |
| binding:vif_details | {"port_filter": true} |
| binding:vif_type | midonet |
| binding:vnic_type | normal |
| device_id | |
| device_owner | |
| fixed_ips | {"subnet_id": "f754ada3-1381-4ef4-8443-203a423d927c", "ip_address": "5.5.5.5"} |
| id | 94040cf8-4f0b-42fd-9788-c5d2d261f6ed |
| mac_address | fa:16:3e:1a:54:67 |
| name | |
| network_id | 20cf2457-c6b6-4f9c-9578-64a089b6e9ee |
| security_groups | e018054b-8e89-4c5c-913c-03cdf3c437bb |
| status | ACTIVE |
| tenant_id | 245d70d652504ba3aaa02f17209e5a25 |
+-----------------------+--------------------------------------------------------------------------------+

Antonio Ojea (aojea)
description: updated
Antonio Ojea (aojea)
description: updated
Revision history for this message
YAMAMOTO Takashi (yamamoto) wrote :

how did you create port 27bd30a1-cbd6-4400-a50e-59f52f75ca9e?

Changed in networking-midonet:
status: New → Incomplete
Revision history for this message
YAMAMOTO Takashi (yamamoto) wrote :

you did something like this?

neutron net-create a
neutron subnet-create a 1.0.0.0/8

neutron router-create b
neutron router-create c

neutron port-create --name d a
neutron port-create --name e a

neutron router-interface-add b port=d
neutron router-interface-add c port=e

Revision history for this message
Antonio Ojea (aojea) wrote :

You can reproduce it with horizon too creating a network, 2 routers and adding interfaces of both routers to the same network

 I guess the port 27bd30a1-cbd6-4400-a50e-59f52f75ca9e is related to midonet only, if you list the port interfaces from midonet you can see that the port has the address 5.5.5.1

port 27bd30a1-cbd6-4400-a50e-59f52f75ca9e device f19863e5-d4b1-4439-9a9d-0377b3d0d1c7 state up plugged no mac fa:16:3e:d5:25:ff address 5.5.5.1 net 5.5.5.0/24 peer bb8d00af-02c9-4b19-ad4a-c4c2c96eaa6e

However neutron hasn't any port with that UUID and the port that has the 5.5.5.1 is:

| bb8d00af-02c9-4b19-ad4a-c4c2c96eaa6e | | fa:16:3e:d5:25:ff | {"subnet_id": "f754ada3-1381-4ef4-8443-203a423d927c", "ip_address": "5.5.5.1"}

Revision history for this message
Michael Micucci (micucci-t) wrote :

I can reproduce via CLI as above, but instead of

neutron router-interface-add b port=d

I can do

neutron router-interface-add b subnet=a

and get the same results

This might be due to the midonet translation object having a single router_if_port_id field that is trying to be reset by the second call (this might not be necessary since this new interface won't be the default route, but instead it will have to be user-defined with extra routes).

Revision history for this message
YAMAMOTO Takashi (yamamoto) wrote :

i filed a bug in midonet jira as this doesn't seem to be a plugin issue.
https://midonet.atlassian.net/browse/MNA-1112

Revision history for this message
Ryu Ishimoto (ryu-midokura) wrote :

Since this is a midonet issue, let's close this and keep track of it on the JIRA ticket yamamoto created.

Revision history for this message
Ryu Ishimoto (ryu-midokura) wrote :

just realized that this is already set to 'incomplete' never mind.

Changed in midonet:
assignee: nobody → Brandon Berg (bberg-s)
milestone: none → 5.1
status: New → Fix Committed
Changed in networking-midonet:
status: Incomplete → Invalid
Changed in midonet:
importance: Undecided → High
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.