Ask Your Question
0

how to set dhcp lease time for vms in neutron [closed]

asked 2014-01-30 21:03:44 -0500

Ed S gravatar image

I am using neutron using tenant subnets (fixed ips) with floating ips. Everything basically works, except when I do instance suspend/resume, which goes like this: remove floating ip, remove fixed ip from running instance, suspend, ..., at a later time resume, add fixed ip, add floating ip.

The issue arises when the original fixed ip on an instance is different from the new fixed ip after resuming. I discovered that the vm retains the previous fixed ip and doesn't release it. As expected, if I reboot the instance, the new ip is acquired. What is the best way to set the lease time for vms using the dhcp agent? I would want to set it to something short, say a few minutes. I assume it's in a config option in dhcp_agent.ini or dnsmasq-neutron.conf.

Thank you, Ed

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Ed S
close date 2014-01-30 22:46:35.307879

1 answer

Sort by ยป oldest newest most voted
1

answered 2014-01-30 22:45:48 -0500

Ed S gravatar image

I fixed the lease time by adding the following line in the dhcp_agent.ini on the system with the dhcp agent:

# sets the lease to 120 seconds
dhcp_lease_duration = 120
edit flag offensive delete link more

Comments

what service do I have to restart for this to take effect?

cyberoblivion gravatar imagecyberoblivion ( 2015-10-23 12:31:15 -0500 )edit

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2014-01-30 21:03:44 -0500

Seen: 2,522 times

Last updated: Jan 30 '14