DHCP host_routes should be Neutron Segment aware

Bug #1669594 reported by Harald Jensås
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Unassigned

Bug Description

The following code in neutron/agent/linux/dhcp.py will create on-link/link-local routes to all subnets in a network.

 host_routes.extend(["%s,0.0.0.0" % (s.cidr) for s in
                                    self.network.subnets
                                    if (s.ip_version == 4 and
                                        s.cidr != subnet.cidr)])

White the introduction of Neutron segments, this needs to be update so that host_routes for on-link destinations are only created if l2-adjacency is True.

We should also create host_routes for all subnets whithin the same segment, as I understand it l2-adjacency is guaranteed within each segment. And Segment can have multiple Subnets.

ref: http://specs.openstack.org/openstack/neutron-specs/specs/newton/routed-networks.html

Tags: l3-ipam-dhcp
tags: added: l3-ipam-dhcp
Changed in neutron:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
Harald Jensås (harald-jensas) wrote :

I wonder if the DHCP agent is the correct place to implement them. Hidden from the end user. I don't like it.

Would it not be better to add them as "host-routes" on the subnet in neutron?

Revision history for this message
Kevin Benton (kevinbenton) wrote :

@Harald, possibly, but we already have this behavior that we should fix before we figure out if it should be represented in the API.

Revision history for this message
Harald Jensås (harald-jensas) wrote :

This change closes this issue.

https://review.openstack.org/#/c/438171/

Changed in neutron:
status: Confirmed → Fix Committed
Changed in neutron:
status: Fix Committed → Fix Released
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.