Uploaded image for project: 'CloudStack'
  1. CloudStack
  2. CLOUDSTACK-7974

deleted VM entries still exists in /etc/hosts and /etc/dhcphosts.txt files on virtual router

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 4.3.0
    • 4.5.0, 4.4.2, 4.4.3, 4.3.2, 4.6.0
    • Virtual Router
    • Security Level: Public (Anyone can view this level - this is the default.)
    • None

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              bhaisaab Rohit Yadav
              ypzhang Yiping Zhang
              Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: