Uploaded image for project: 'OpenVZ'
  1. OpenVZ
  2. OVZ-3917

loopback address is listed twice in VE's /etc/hosts

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Duplicate
    • Fix Version/s: OpenVZ-legacy
    • Component/s: Containers::Userspace
    • Security Level: Public
    • Environment:
      Operating System: Other
      Platform: Other

      Description

      1. Create & start VE:
      [root@ts27 vzt-vzctl]# vzctl create 200
      Creating VE private area (fedora-core-5-i386-default)
      Performing postcreate actions
      VE private area was created
      [root@ts27 vzt-vzctl]# vzctl start 200
      Starting VE ...
      VE is mounted
      Setting CPU units: 1000
      Configure meminfo: 65536
      VE start in progress...
      [root@ts27 vzt-vzctl]#

      2. Check /etc/hosts inside VE:
      [root@ts27 vzt-vzctl]# vzctl exec 200 cat /etc/hosts
      127.0.0.1 localhost.localdomain localhost
      [root@ts27 vzt-vzctl]#

      3. Set some hostname for VE:
      [root@ts27 vzt-vzctl]# vzctl set 200 --hostname ve200 --save
      Set hostname: ve200
      Saved parameters for VE 200
      [root@ts27 vzt-vzctl]#

      4. Check hostname again:
      [root@ts27 vzt-vzctl]# vzctl exec 200 cat /etc/hosts
      127.0.0.1 localhost.localdomain localhost
      # Auto-generated hostname. Please do not remove this comment.
      127.0.0.1 ve200
      [root@ts27 vzt-vzctl]#

      According to hosts(5) man page, 'For each host a single line should be present'.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              igor Igor Sukhih
              Reporter:
              klm@openvz.org Eugene Kolomeetz
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: