Return-Path: X-Original-To: apmail-cloudstack-dev-archive@www.apache.org Delivered-To: apmail-cloudstack-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id AF55710A3C for ; Wed, 1 May 2013 19:42:25 +0000 (UTC) Received: (qmail 70267 invoked by uid 500); 1 May 2013 19:42:25 -0000 Delivered-To: apmail-cloudstack-dev-archive@cloudstack.apache.org Received: (qmail 70235 invoked by uid 500); 1 May 2013 19:42:25 -0000 Mailing-List: contact dev-help@cloudstack.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cloudstack.apache.org Delivered-To: mailing list dev@cloudstack.apache.org Received: (qmail 70227 invoked by uid 99); 1 May 2013 19:42:25 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 May 2013 19:42:25 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of shadowsor@gmail.com designates 209.85.128.175 as permitted sender) Received: from [209.85.128.175] (HELO mail-ve0-f175.google.com) (209.85.128.175) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 May 2013 19:42:19 +0000 Received: by mail-ve0-f175.google.com with SMTP id m1so1450107ves.6 for ; Wed, 01 May 2013 12:41:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=69Fhooe9MIuUdJX8odS8QAshJDYxMBWEFlooHQZc6Bc=; b=mwHCKj9AABUM8D5BNzDreUBX5kbvT3zjMkfntopW4C6OW6B4UL5gpTDlmIFFMKm0kS Z7nUkCPZbLT+joLea8mpbXFjutBZKd7WaSvCTEMDaMRBzkockP/JOIKQpNngKlwEmnTP aWSOrJ1ysEtiXfYkOGTmATHpmOiXhLN+x7hHShYplFH/r/C7nbuyxKQUvLyOs0TbSxAY 42KDTqNXEhet4MTrneJPOKG7x146Nz04OaI9YY+3toJctOetcpe47No0uB2VKwXSKCjE iSrYJ+FICsJLvOW9b8nGG8MeyO11at8+8llkeVliTJLTuIv0u+1j3zlBHNrQRkMFsPTx Scpw== MIME-Version: 1.0 X-Received: by 10.58.15.193 with SMTP id z1mr1222280vec.40.1367437318782; Wed, 01 May 2013 12:41:58 -0700 (PDT) Received: by 10.52.103.106 with HTTP; Wed, 1 May 2013 12:41:58 -0700 (PDT) In-Reply-To: <20130501183347.GH72716@USLT-205755.sungardas.corp> References: <040f01ce45f1$b4550a30$1cff1e90$@gmail.com> <20130501183347.GH72716@USLT-205755.sungardas.corp> Date: Wed, 1 May 2013 13:41:58 -0600 Message-ID: Subject: Re: Virtual Router: DHCP and 2-second DNS outages From: Marcus Sorensen To: "dev@cloudstack.apache.org" Content-Type: multipart/alternative; boundary=047d7b5d9589a38d4804dbad4fdc X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5d9589a38d4804dbad4fdc Content-Type: text/plain; charset=ISO-8859-1 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 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 > --047d7b5d9589a38d4804dbad4fdc--