<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Created <a class="moz-txt-link-freetext" href="https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1079794">https://bugs.launchpad.net/ubuntu/+source/lxc/+bug/1079794</a><br>
<br>
<div class="moz-cite-prefix">On 16/11/12 16:43, Stéphane Graber
wrote:<br>
</div>
<blockquote cite="mid:50A66D18.5080203@ubuntu.com" type="cite">
<pre wrap="">On 11/16/2012 11:32 AM, Rintcius Blok wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Yes sure. This is in a container called b.lxc:
ubuntu@b:~$ cat /etc/hosts
127.0.0.1 localhost
# 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
ff02::3 ip6-allhosts
ubuntu@b:~$ cat /etc/hostname
b.lxc
</pre>
</blockquote>
<pre wrap="">
Ok, so the problem is that you don't have an entry for b.lxc in your
/etc/hosts.
Add an extra line (below the localhost one):
127.0.1.1 b.lxc
This should then silence sudo.
I remember writing code that does that in the ubuntu template, maybe the
ubuntucloud template is missing that code somehow or the sed magic fails
for hostnames containing a dot. Would have to check...
Can you file a bug about it at?
<a class="moz-txt-link-freetext" href="https://launchpad.net/ubuntu/+source/lxc/+filebug">https://launchpad.net/ubuntu/+source/lxc/+filebug</a>
Thanks
</pre>
<blockquote type="cite">
<pre wrap="">On 16/11/12 14:41, Stéphane Graber wrote:
</pre>
<blockquote type="cite">
<pre wrap="">On 11/16/2012 09:26 AM, Serge Hallyn wrote:
</pre>
<blockquote type="cite">
<pre wrap="">Quoting Rintcius Blok (<a class="moz-txt-link-abbreviated" href="mailto:rintcius@gmail.com">rintcius@gmail.com</a>):
</pre>
<blockquote type="cite">
<pre wrap="">Hi,
I am getting messages like this with every "sudo" I do in the container:
"sudo: unable to resolve host test.lxc"
It happens with every container I create on 12.10 (with 12.10 container).
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
It is easy to solve for me: just add the container name to /etc/hosts.
But I was wondering whether it would make sense to add it in a generic way?
</pre>
</blockquote>
<pre wrap="">Hm, I don't get this, either on 12.04 or 12.10.
-serge
</pre>
</blockquote>
<pre wrap="">Can you attach the content of /etc/hosts and /etc/hostname in the container?
------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
<a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/zoho_dev2dev_nov">http://p.sf.net/sfu/zoho_dev2dev_nov</a>
_______________________________________________
Lxc-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Lxc-users@lists.sourceforge.net">Lxc-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/lxc-users">https://lists.sourceforge.net/lists/listinfo/lxc-users</a>
</pre>
</blockquote>
<pre wrap="">
</pre>
</blockquote>
<pre wrap="">
</pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
<a class="moz-txt-link-freetext" href="http://p.sf.net/sfu/zoho_dev2dev_nov">http://p.sf.net/sfu/zoho_dev2dev_nov</a></pre>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Lxc-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Lxc-users@lists.sourceforge.net">Lxc-users@lists.sourceforge.net</a>
<a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/lxc-users">https://lists.sourceforge.net/lists/listinfo/lxc-users</a>
</pre>
</blockquote>
<br>
</body>
</html>