make sure that if a subnet has no gateway the router option is not sent in the dhcp offer.

Bug #1028647 reported by Nachi Ueno
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
neutron
Fix Released
Medium
Nachi Ueno

Bug Description

A slightly more detailed analysis (meaning I've actually looked at the code, and its history) suggests we go for two bugs.

This bugs might address the dhcp issue, as:

    def _output_opts_file(self):
        """Write a dnsmasq compatible options file."""
        # TODO (mark): add support for nameservers
        options = []
        for i, subnet in enumerate(self.network.subnets):
            if subnet.ip_version == 6:
                continue
            else:
                options.append((self._TAG_PREFIX % i,
                                'option',
                                'router',
                                subnet.gateway_ip))

        name = self.get_conf_file_name('opts')
        replace_file(name, '\n'.join(['tag:%s,%s:%s,%s' % o for o in options]))
        return name

Will always assign the dhcp router option no matter what is in the gateway_ip attribute.
For the API layer, we need a solution for specifying subnets without a default gateway. Nachi, could you please file another bug report for it?

Drived from https://bugs.launchpad.net/quantum/+bug/1025817

Nachi Ueno (nati-ueno)
Changed in quantum:
status: New → Confirmed
assignee: nobody → Nachi Ueno (nati-ueno)
dan wendlandt (danwent)
Changed in quantum:
milestone: none → folsom-rc1
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to quantum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/12085

Changed in quantum:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to quantum (master)

Reviewed: https://review.openstack.org/12085
Committed: http://github.com/openstack/quantum/commit/4b5a850a51ee1a8451a9c5e819fb5247bf4d46d0
Submitter: Jenkins
Branch: master

commit 4b5a850a51ee1a8451a9c5e819fb5247bf4d46d0
Author: Nachi Ueno <email address hidden>
Date: Wed Aug 29 00:02:49 2012 +0000

    Fix dhcp option distribution by dnsmasq

    Fixes bug 1022737 host route per subnet distribution
    Fixes bug 1028647 --no-gateway support on dhcp agent
    Fixes bug 1043022 dns distribution

    Change-Id: I567f1f8d1f5d386a253be1965d29f2533f7e88c8

Changed in quantum:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in quantum:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in quantum:
milestone: folsom-rc1 → 2012.2
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.