Return-Path: X-Original-To: apmail-cloudstack-issues-archive@www.apache.org Delivered-To: apmail-cloudstack-issues-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D599311877 for ; Fri, 22 Aug 2014 05:51:11 +0000 (UTC) Received: (qmail 79534 invoked by uid 500); 22 Aug 2014 05:51:11 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 79422 invoked by uid 500); 22 Aug 2014 05:51:11 -0000 Mailing-List: contact issues-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 issues@cloudstack.apache.org Received: (qmail 79170 invoked by uid 500); 22 Aug 2014 05:51:11 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 79162 invoked by uid 99); 22 Aug 2014 05:51:11 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 22 Aug 2014 05:51:11 +0000 Date: Fri, 22 Aug 2014 05:51:11 +0000 (UTC) From: "ASF subversion and git services (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-5986) dnsmasq racy condition result in dnsmasq failed to handout IP address MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/CLOUDSTACK-5986?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14106502#comment-14106502 ] ASF subversion and git services commented on CLOUDSTACK-5986: ------------------------------------------------------------- Commit c4a32d94165bd0b43b777fad749cf071c270cd23 in cloudstack's branch refs/heads/master from sanjeev [ https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;h=c4a32d9 ] CLOUDSTACK-5986: Test script for verifying fix CS-5986 for vpc networks Signed-off-by: sanjeev Made changes to test script as per the review comments in Review Request 23928 > dnsmasq racy condition result in dnsmasq failed to handout IP address > --------------------------------------------------------------------- > > Key: CLOUDSTACK-5986 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-5986 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Components: Virtual Router > Affects Versions: 4.2.0, 4.2.1 > Reporter: Sheng Yang > Assignee: Sheng Yang > Priority: Critical > Fix For: 4.2.1, 4.3.0 > > > In the past, dnsmasq.leases is managed by cloudstack, and would be updated after new entry is added(and the entry with same IP or host would be removed). > In 4.2, we introduced dhcp_release try to speed up the dnsmasq reload process, thus result in this issue. > So in this scenario: > 1. VM1 would create entry: "mac A, IP A, host A" > 2. VM2 would create entry: "mac B, IP B, host B" > 3. VM1 destroyed and VM 2 destroyed, no change to lease file, two records still existed. > 4. VM1 created with IP B: "mac C, IP B, host A". > At this time, lease file would only contain: "mac C, IP B, host A", because the original entries would be removed by either IP match or host name match. > In fact dnsmasq still holds lease of IP A with mac A in memory, but record is already removed from lease file by cloudstack. The lease file is out of sync now. > 5. VM2 recreated with IP A, dhcp_release would be used to release the lease. But there is no "mac A, IP A" record in the lease file, so dhcp_release failed. > So result in dnsmasq cannot handle out the IP A to new mac D, because dnsmasq was still holding lease for IP A with mac A and haven't been released yet. > So it only happened when user create and destroy different VMs which share the same name but get different IPs. -- This message was sent by Atlassian JIRA (v6.2#6252)