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 2A0FF10CDA for ; Fri, 28 Nov 2014 10:54:14 +0000 (UTC) Received: (qmail 39031 invoked by uid 500); 28 Nov 2014 10:54:14 -0000 Delivered-To: apmail-cloudstack-issues-archive@cloudstack.apache.org Received: (qmail 39003 invoked by uid 500); 28 Nov 2014 10:54:13 -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 38994 invoked by uid 500); 28 Nov 2014 10:54:13 -0000 Delivered-To: apmail-incubator-cloudstack-issues@incubator.apache.org Received: (qmail 38991 invoked by uid 99); 28 Nov 2014 10:54:13 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 28 Nov 2014 10:54:13 +0000 Date: Fri, 28 Nov 2014 10:54:13 +0000 (UTC) From: "Paul Angus (JIRA)" To: cloudstack-issues@incubator.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (CLOUDSTACK-7974) deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router 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-7974?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14228235#comment-14228235 ] Paul Angus commented on CLOUDSTACK-7974: ---------------------------------------- Using 4.3.0: Today I destroyed some VMs and re-added a few with the same host name. I had some connectivity issues within the network to the hostname being alternately returned with the new and old IP addresses. Checking /etc/hosts on the VR I found a load of old entries including the hostname of my new instance twice, once with the old IP and once with the new IP. I removed the old entries but the problem persisted. So i restarted the VR and the issue cleared. > deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router > -------------------------------------------------------------------------------------------- > > Key: CLOUDSTACK-7974 > URL: https://issues.apache.org/jira/browse/CLOUDSTACK-7974 > Project: CloudStack > Issue Type: Bug > Security Level: Public(Anyone can view this level - this is the default.) > Components: Virtual Router > Affects Versions: 4.3.0 > Reporter: Yiping Zhang > Fix For: 4.5.0, 4.6.0, 4.4.2, 4.4.3, 4.3.2 > > > We have noticed that entries for hosts which have been destroyed for a long time still exist in both /etc/dhcphosts.txt and /etc/hosts files on our Virtual Routers. > To reproduce this bug, just create an instance, note down its MAC and IP address, then destroy the instance from web UI. Now check virtual router, and you will find that the entries still exist in /etc/dhcphosts.txt and /etc/hosts files. > I did a bit more digging on virtual router, and immediately noticed the following: > 1. /root/edithosts.sh script is only called when an instance is created, but not when an instance is destroyed. > 2. After reading /root/edithosts.sh script, I am pretty certain that the function of this script is to add info about newly created instances into /etc/hosts and /etc/dhcphosts.txt files. So the script should really be renamed as /root/addhosts.sh to reflect its true function. > 3. there is no script to properly delete entries from /etc/hosts and /etc/dhcphosts.txt file when instances are destroyed -- This message was sent by Atlassian JIRA (v6.3.4#6332)