<p>There's a flag 'dhcp_lease_time' (in secs) that can be set in nova.conf.  DHCP clients typically re-up every (dhcp_lease_time/2) seconds, but this varies based on client. Additionally some dhcp clients are not persistent, meaning if there's ever a network hiccup and they don't get a dhcp ACK they will give up and stop checking in, thus losing their lease and fall off the network.  </p>

<p>On RHEL/CentOS/Fedora this is fixed by setting PERSISTENT_DHCLIENT=1 in your ifcfg-eth0 file.  Not sure about Ubuntu.</p>
<p>Nate</p>
<div class="gmail_quote">On Jun 14, 2012 7:02 PM, "Christian Parpart" <<a href="mailto:trapni@gmail.com">trapni@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hey,<div><br></div><div>thanks for your reply. Unfortunately there was no process restart in nova-network nor in dnsmasq,</div><div>both processes seem to have been up for about 2 and 3 days.</div><div><br></div><div>However, why is the default dhcp_lease_time value equal 120s? Not having this one overridden</div>

<div>causes the clients to actually re-acquire a new DHCP lease every 42 seconds (at least on my nodes),</div><div>which is completely ridiculous.</div><div>OTOH, I took a look at the sources (linux_net.py) and found out, why the max_lease_time is</div>

<div>set to 2048, because that is the size of my network.</div><div>So why is the max lease time the size of my network?</div><div>I've written a tiny patch to allow overriding this value in nova.conf, and will submit it to launchpad</div>

<div>soon - and hope it'll be accepted and then also applied to essex, since this is a very straight forward</div><div>few-liner helpful thing.</div><div><br></div><div>Nevertheless, that does not clarify on why now I had 2 (well, 3 actually) instances getting</div>

<div>no DHCP replies/offers after some hours/days anymore.</div><div><br></div><div>The one host that caused issues today (a few hours ago), I fixed it by hard rebooting the instance,</div><div>however, just about 40 minutes later, it again forgot its IP, so one might say, that it</div>

<div>maybe did not get any reply from the dhcp server (dnsmasq) almost right after it got</div><div>a lease on instance boot.</div><div><br></div><div>So long,</div><div>Christian.</div><div><br><div class="gmail_quote">
On Thu, Jun 14, 2012 at 10:55 PM, Nathanael Burton <span dir="ltr"><<a href="mailto:nathanael.i.burton@gmail.com" target="_blank">nathanael.i.burton@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p>Has nova-network been restarted? There was an issue where nova-network was signalling dnsmasq which would cause dnsmasq to stop responding to requests yet appear to be running fine. </p>


<p>You can see if killing dnsmasq, restarting nova-network, and rebooting an instance allows it to get a dhcp address again ...</p>
<p>Nate </p>
<div class="gmail_quote"><div><div>On Jun 14, 2012 4:46 PM, "Christian Parpart" <<a href="mailto:trapni@gmail.com" target="_blank">trapni@gmail.com</a>> wrote:<br type="attribution"></div></div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
Hey all,<div><br></div><div>I feel really sad with saying this, now, that we have quite a few instances in producgtion</div><div>since about 5 days at least, I now have encountered the second instance loosing its</div><div>



IP address due to "No DHCPOFFER" (as of syslog in the instance).</div><div><br></div><div>I checked the logs in the central nova-network and gateway node and found</div><div>dnsmasq still to reply on requests from all the other instances and it even</div>



<div>got the request from the instance in question and even sent an OFFER, as of what</div><div>I can tell by now (i'm investigating / posting logs asap), but while it seemed</div><div>that the dnsmasq sends an offer, the instances says it didn't receive one - wtf?</div>



<div><br></div><div>Please tell me what I can do to actually *fix* this issue, since this is by far very fatal.</div><div><br></div><div>One chance I'd see (as a workaround) is, to let created instanced retrieve</div>



<div>its IP via dhcp, but then reconfigure /etc/network/instances to continue with</div><div>static networking setup. However, I'd just like the dhcp thingy to get fixed.</div><div><br></div><div>I'm very open to any kind of helping comments, :)</div>



<div><br></div><div>So long,</div><div>Christian.</div><div><br></div>
<br></div></div>_______________________________________________<br>
Mailing list: <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
Post to     : <a href="mailto:openstack@lists.launchpad.net" target="_blank">openstack@lists.launchpad.net</a><br>
Unsubscribe : <a href="https://launchpad.net/~openstack" target="_blank">https://launchpad.net/~openstack</a><br>
More help   : <a href="https://help.launchpad.net/ListHelp" target="_blank">https://help.launchpad.net/ListHelp</a><br>
<br></blockquote></div>
</blockquote></div><br></div>
</blockquote></div>