sudo: unable to resolve host.. when creating ubuntu-cloud container

Bug #1079794 reported by rintcius
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
lxc (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I am getting messages like this with every "sudo" I do in a fresh container:

"sudo: unable to resolve host test.lxc"

It happens with every container I create on 12.10 with 12.10 container and ubuntu-cloud template.

Reproduction:

lxc-create -t ubuntu-cloud -n test.lxc -- --auth-key
$HOME/.ssh/id_rsa.pub --userdata /root/my-userdata

with a simple userdata file like this:

#!/bin/sh
ifconfig eth0 > /ifconfig-eth0

See discussion details on this thread: http://sourceforge.net/mailarchive/message.php?msg_id=30105268

Note that there is an easy workaround by adding the container name to /etc/hosts yourself.

====
$ apt-cache policy lxc
lxc:
  Installed: 0.8.0~rc1-4ubuntu38
  Candidate: 0.8.0~rc1-4ubuntu38
$ lsb_release -rd
Description: Ubuntu 12.10
Release: 12.10

Changed in lxc (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Ben Howard (utlemming)
Revision history for this message
Serge Hallyn (serge-hallyn) wrote :

I don't see this. I wonder why you were getting '.lxc' as your domain name. I can't reproduce that right now.

Regardless, note that on a modern saucy system this should be solved automatically when you set LXC_DOMAIN=lxc in /etc/default/lxc-net.

Changed in lxc (Ubuntu):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.