cloudstack-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hugo Trippaers <HTrippa...@schubergphilis.com>
Subject RE: Virtual Router: DHCP and 2-second DNS outages
Date Thu, 02 May 2013 12:22:28 GMT
I changed the system to hup a while back. I was having the same problems. At that time I never
ran into the leases problem, but recently I did have problem with it as well.

The workaround I'm testing right now is to set a restart flag is the ip or mac was found in
the leases file and do a restart instead of a HUP if that flag is set. Not the neatest of
solutions but it work fine. Now I only get the occasional error because of the DNS timeout
instead of a constant problem.

Dennis' solution looks a lot nicer.

Cheers,

Hugo

> -----Original Message-----
> From: Marcus Sorensen [mailto:shadowsor@gmail.com]
> Sent: Wednesday, May 01, 2013 10:51 PM
> To: dev@cloudstack.apache.org
> Subject: Re: Virtual Router: DHCP and 2-second DNS outages
> 
> What is scripts/network/exdhcp/dnsmasq_edithosts.sh ?
> 
> I noticed that master is already patched to hup, but it's missing the
> dhcp_release that dennis just put in a review for.
> 
> 
> On Wed, May 1, 2013 at 1:43 PM, Marcus Sorensen <shadowsor@gmail.com>
> wrote:
> 
> > oops, minus my two 'echo' debugging lines in there
> >
> >
> >
> > On Wed, May 1, 2013 at 1:41 PM, Marcus Sorensen
> <shadowsor@gmail.com>wrote:
> >
> >> I'm not sure how we'd handle older versions if they don't have the
> >> dhcp_release util, but how about this going forward?
> >>
> >> diff --git a/patches/systemvm/debian/config/root/edithosts.sh
> >> b/patches/systemvm/debian/config/root/edithosts.sh
> >> index 9f21f20..f6e09d6 100755
> >> --- a/patches/systemvm/debian/config/root/edithosts.sh
> >> +++ b/patches/systemvm/debian/config/root/edithosts.sh
> >> @@ -71,6 +71,7 @@ DHCP_HOSTS=/etc/dhcphosts.txt
> >> DHCP_OPTS=/etc/dhcpopts.txt
> DHCP_LEASES=/var/lib/misc/dnsmasq.leases
> >>  HOSTS=/etc/hosts
> >> +ROUTER_VERSION=$(cat /etc/debian_version | cut -d. -f1)
> >>
> >>  source /root/func.sh
> >>
> >> @@ -99,6 +100,14 @@ wait_for_dnsmasq () {
> >>
> >>  logger -t cloud "edithosts: update $1 $2 $3 to hosts"
> >>
> >> +if [ $ROUTER_VERSION -gt 6 ]
> >> +then
> >> +  #release previous dhcp lease if present
> >> +  echo releasing $ipv4
> >> +  dhcp_release lo $ipv4 $(grep $ipv4 $DHCP_LEASES | awk '{print
> >> +$2}')
> >> >/dev/null 2>&1
> >> +  echo released $ipv4
> >> +fi
> >> +
> >>  [ ! -f $DHCP_HOSTS ] && touch $DHCP_HOSTS  [ ! -f $DHCP_OPTS ] &&
> >> touch $DHCP_OPTS  [ ! -f $DHCP_LEASES ] && touch $DHCP_LEASES @@
> >> -200,7 +209,12 @@ fi  pid=$(pidof dnsmasq)  if [ "$pid" != "" ]  then
> >> -  service dnsmasq restart
> >> +  if [ $ROUTER_VERSION -gt 6 ]
> >> +  then
> >> +    kill -s 1 $pid
> >> +  else
> >> +    service dnsmasq restart
> >> +  fi
> >>  else
> >>    if [ $no_redundant -eq 1 ]
> >>    then
> >>
> >>
> >>
> >>
> >> On Wed, May 1, 2013 at 12:33 PM, Chip Childers
> >> <chip.childers@sungard.com
> >> > wrote:
> >>
> >>> On Wed, May 01, 2013 at 12:29:32PM -0600, Marcus Sorensen wrote:
> >>> > How do we go about requesting that dnsmasq-utils be installed on
> >>> > the
> >>> new
> >>> > system VM?
> >>>
> >>> The code to create system VMs is in the repo now.  You should be
> >>> able to just make the change and / or submit a patch suggesting the
> change.
> >>>
> >>> See:
> >>>
> >>> tools/appliance/definitions
> >>>
> >>
> >>
> >

Mime
View raw message