Public bug reported:

The /etc/hosts file created by the lxc-ubuntu template is missing some
of the usual entries.

A standard /etc/hosts should look like this:
127.0.0.1       localhost
127.0.1.1       castiana castiana.lan.sherb.stgraber.net

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

But a standard /etc/hosts generated by LXC looks like:
127.0.0.1 localhost quantal


Testcase:
1) sudo rm -Rf /var/cache/lxc/precise
2) sudo lxc-create -n p1 -t ubuntu
3) cat /var/lib/lxc/p1/rootfs/etc/hosts

Here, 3) should list a standard /etc/hosts with both a 127.0.0.1 and
127.0.1.1 entry and the usual ip6- aliases

** Affects: lxc (Ubuntu)
     Importance: Undecided
         Status: Fix Released

** Affects: lxc (Ubuntu Precise)
     Importance: Undecided
     Assignee: Stéphane Graber (stgraber)
         Status: In Progress

** Also affects: lxc (Ubuntu Precise)
   Importance: Undecided
       Status: New

** Changed in: lxc (Ubuntu)
       Status: New => Fix Released

** Changed in: lxc (Ubuntu Precise)
       Status: New => In Progress

** Changed in: lxc (Ubuntu Precise)
     Assignee: (unassigned) => Stéphane Graber (stgraber)

** Description changed:

  The /etc/hosts file created by the lxc-ubuntu template is missing some
  of the usual entries.
  
  A standard /etc/hosts should look like this:
  127.0.0.1     localhost
  127.0.1.1     castiana castiana.lan.sherb.stgraber.net
  
  # The following lines are desirable for IPv6 capable hosts
  ::1     ip6-localhost ip6-loopback
  fe00::0 ip6-localnet
  ff00::0 ip6-mcastprefix
  ff02::1 ip6-allnodes
  ff02::2 ip6-allrouters
  
  But a standard /etc/hosts generated by LXC looks like:
  127.0.0.1 localhost quantal
+ 
+ 
+ Testcase:
+ 1) sudo rm -Rf /var/cache/lxc/precise
+ 2) sudo lxc-create -n p1 -t ubuntu
+ 3) cat /var/lib/lxc/p1/rootfs/etc/hosts
+ 
+ Here, 3) should list a standard /etc/hosts with both a 127.0.0.1 and
+ 127.0.1.1 entry and the usual ip6- aliases

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to lxc in Ubuntu.
https://bugs.launchpad.net/bugs/1004108

Title:
  /etc/hosts in conainer is missing the usual aliases

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1004108/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs

Reply via email to