dhcp_lease_time is not used in dnsmasq call

Bug #894218 reported by halfss
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Joe Gordon

Bug Description

when i use DHCPflat mode,the instance to get ip in fews times
in the log of nova-network.log like this:

2011-11-23 13:33:30,840 DEBUG nova.network.manager [8d6b0be9-1ae7-4f69-a10c-c4d6a42ebc55 None None] Leased IP |10.0.0.22| from (pid=12204)
lease_fixed_ip /usr/lib/python2.7/dist-packages/nova/network/manager.py:642

2011-11-23 13:34:14,850 DEBUG nova.network.manager [cf1929d3-03c5-427f-b41b-beef610b0db2 None None] Leased IP |10.0.0.22| from (pid=12204)

lease_fixed_ip /usr/lib/python2.7/dist-packages/nova/network/manager.py:642

when i change the flag "dhcp_lease_time" in the "network/linux_net.py "
 58 flags.DEFINE_integer('dhcp_lease_time', 12000000,
 59 'Lifetime of a DHCP lease')

it's still 120s
dnsmasq --strict-order --bind-interfaces --conf-file= --domain=novalocal --pid-file=/var/lib/nova/networks/nova-br1.pid --listen-

address=10.0.0.3 --except-interface=lo --dhcp-range=10.0.0.2,static,120s --dhcp-lease-max=512 --dhcp-

hostsfile=/var/lib/nova/networks/nova-br1.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro

so i change this(in network/linux_net.py ):
- 626 '--dhcp-range=%s,static,120s' % network_ref['dhcp_start'],
+626 '--dhcp-range=%s,static,%d' % (network_ref['dhcp_start'],FLAGS.dhcp_lease_time),

it's work well

dnsmasq --strict-order --bind-interfaces --conf-file= --domain=novalocal --pid-file=/var/lib/nova/networks/nova-br10.pid --listen-address=192.168.0.6 --except-interface=lo --dhcp-range=192.168.0.2,static,12000000 --dhcp-lease-max=256 --dhcp-hostsfile=/var/lib/nova/networks/nova-br10.conf --dhcp-script=/usr/bin/nova-dhcpbridge --leasefile-ro
root 12620 0.0 0.0 7932 1056 pts/2 S+ 00:43 0:00 grep --color=auto dns

Thierry Carrez (ttx)
summary: - the instance'ip lease time in DHCPflat mode
+ dhcp_lease_time is not used in dnsmasq call
Changed in nova:
importance: Undecided → Medium
status: New → Confirmed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

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

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

Reviewed: https://review.openstack.org/2681
Committed: http://github.com/openstack/nova/commit/3290b24a0d992e258d38e290ba36cbf2f547fa3c
Submitter: Jenkins
Branch: master

commit 3290b24a0d992e258d38e290ba36cbf2f547fa3c
Author: Joe Gordon <email address hidden>
Date: Thu Dec 29 14:33:59 2011 -0800

    use dhcp_lease_time for dnsmasq. Fix bug 894218

    Change-Id: Ib5e1a847e2b422ca03a6a08cf5cc2699c2b4b8cd

Changed in nova:
status: In Progress → Fix Committed
Joe Gordon (jogo)
Changed in nova:
assignee: nobody → Joe Gordon (joe-gordon0)
Thierry Carrez (ttx)
Changed in nova:
milestone: none → essex-3
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: essex-3 → 2012.1
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.