L3: make l3-agent handle changes to router port

Bug #1042045 reported by dan wendlandt
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Expired
Low
Unassigned

Bug Description

currently, the tenant could choose to change the mac address, or even the IP address of a port that is being used as a router port.

however, the l3-agent will not detect this change or update its behavior without a restart.

Tags: l3-ipam-dhcp
dan wendlandt (danwent)
Changed in quantum:
importance: Undecided → Low
Thierry Carrez (ttx)
Changed in quantum:
status: New → Confirmed
Sandhya Dasu (sadasu)
Changed in quantum:
assignee: nobody → Sandhya Dasu (sadasu)
tags: added: l3-ipam-dhcp
Revision history for this message
Sandhya Dasu (sadasu) wrote :

Working on a solution that has the following pieces:
1. L2 method to update IP address of a port exists. Adding a L2 method to modify mac address of port.
2. Adding a update_router_interface method to L3_NAT_db_mixin
3. Reusing the routers_updated() method of L3AgentNotifyApi to inform l3_agent of the changes to the router port.

Please let me know if on the right track.

Revision history for this message
dan wendlandt (danwent) wrote :

Adding mark to the bug, as he is the head of this sub-team.

Revision history for this message
Mark McClain (markmcclain) wrote :

I think what you are proposing is partly a new feature (allowing changes to the MAC address) and a bug (IP address address does not change when the fixed_ip is updated).

MAC Address Feature.
The Quantum API does not allow the mac address to be changed after the port is created. We'd have to update the API to allow mac address changes this could cause problems with some of the plugin vendors as we'd be changing the API behavior. The proper thing to do is to propose a blueprint and let the community discuss it.

Fixed IP Update Bug:
The L3 agent works under the assumption that fixed ips do not change, so it only detects the differences in the set of port ids attached to a logical router to add/delete interfaces. Fixing this will be a bit tricky because update_port() is not part of the l3_db mixin. The way around it is for the L3 Agent to listen for update port notifications and check to see if it the port is owned by one the logical routers it manages. Notifications will make the plugin implementation easier because update_port() won't have to be concerned with the special cases of port updating. Alternatively, we could create a decorator that plugin implementors could use to wrap update_port() which would sent the router_updated() message The downside is that the routers_updated() message is kind of expensive to build and we're already in possession of the key data need to modify the port's L3 settings.

There is another issue when the gateway IP address on a subnet changes. Do we change the IP address on the router interface when someone updates the gateway IP? We currently do not have a way to determine whether the IP address was manually created by the tenant or chosen by the L3 mixin.

Revision history for this message
Sandhya Dasu (sadasu) wrote :

MAC Address Feature: Opening a new blueprint for that.

Fixed IP update: For Ip addresses associated with an instance, the "quantum port-update" command succeeds but adds the "updated" IP address to the existing IP address to the same port ID. Is this expected?

Fixed IP update for gateway port: This operation is does not succeed today. The "quantum port-update" command returns "Invalid input for operation: No allocation pool found for ip address:<gateway IP>." This seems like the correct behavior. Do we want to change it?

Revision history for this message
Sandhya Dasu (sadasu) wrote :

Just saw the _sync_routers_task() periodic task. This periodic task should take care of updating the latest port info on the router. Does it make the current bug invalid?

Revision history for this message
Jian Wen (wenjianhn) wrote :

Actually, it's _rpc_loop that takes care of routers that has been updated.

Changed in neutron:
status: Confirmed → Incomplete
Changed in neutron:
assignee: Sandhya Dasu (sadasu) → nobody
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for neutron because there has been no activity for 60 days.]

Changed in neutron:
status: Incomplete → Expired
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.