DHCP Agent not assigning IP if more than one subnet exists on network

Bug #1045828 reported by Gary Kotton
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
neutron
Fix Released
High
Mark McClain

Bug Description

If more than one subnet is assigned to a network then the VM's running on that network do not receive IP addresses.

Reproduction:
1. create network
2. create subnet 192.168.7.0/24
3. create subnet 192.168.8.0/24
4. deploy VM nova boot --image cirros-0.3.0-x86_64-uec --flavor 1 --nic net-id=<netid> t3

The host file has:
fa:16:3e:1c:99:49,192-168-7-2.openstacklocal,192.168.7.2
fa:16:3e:1c:99:49,192-168-8-2.openstacklocal,192.168.8.2
fa:16:3e:0f:fa:bd,192-168-8-3.openstacklocal,192.168.8.3
fa:16:3e:c1:69:26,192-168-8-4.openstacklocal,192.168.8.4
fa:16:3e:40:3d:9a,192-168-8-5.openstacklocal,192.168.8.5

2 problems:
1. VM's do not receive IP addresses
2. dnsmasq only has first IP (it is not updated if there are subnet changes)

nobody 26718 0.0 0.0 28812 1024 ? S 16:41 0:00 dnsmasq --no-hosts --no-resolv --strict-order --bind-interfaces --interface=tap847dc625-02 --except-interface=lo --domain=openstacklocal --pid-file=/opt/stack/data/dhcp/c5e157b8-6099-4582-a1e5-df6ba7529074/pid --dhcp-hostsfile=/opt/stack/data/dhcp/c5e157b8-6099-4582-a1e5-df6ba7529074/host --dhcp-optsfile=/opt/stack/data/dhcp/c5e157b8-6099-4582-a1e5-df6ba7529074/opts --dhcp-script=/opt/stack/quantum/bin/quantum-dhcp-agent-dnsmasq-lease-update --leasefile-ro --dhcp-range=set:tag1,192.168.7.0,static,120s

Not sure if this is the cause of the problem

Thanks
Gary

Changed in quantum:
status: New → Confirmed
assignee: nobody → Mark McClain (markmcclain)
Revision history for this message
Mark McClain (markmcclain) wrote :

I've confirmed this bug and have determined that the problem is related to --dhcp-range not updating when the subnets are modified.

The current work around is to kill dnsmasq and then restart the dhcp agent.

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

makes sense. targeting for RC1. Thanks for filing gary.

Changed in quantum:
milestone: none → folsom-rc1
importance: Undecided → High
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/12397

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/12397
Committed: http://github.com/openstack/quantum/commit/6fa761fd14f634d4194eaa8cd64dbfc1821aac30
Submitter: Jenkins
Branch: master

commit 6fa761fd14f634d4194eaa8cd64dbfc1821aac30
Author: Mark McClain <email address hidden>
Date: Wed Sep 5 00:52:21 2012 -0400

    restart dnsmasq when subnet cidr set changes

    fixes bug 1045828

    The original bug occurred because the set of subnet cidrs changed
    without a restart of dnsmasq. As a result, dnsmasq would not respond
    with offers for fixed_ips assigned in the unknown cidr ranges even when
    the underlying host file had properly updated.

    This patch addresses the bug by restarting dnsmasq when the set of
    subnet cidrs changes. When the set does not change, it will reload the
    options and allocations.

    Change-Id: I0e257208750703f4a32c51d1323786e76e676bb6

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.