<div dir="ltr">also fwiw I run ansible against the container and customize it so my /etc/network/interfaces looks like this:<div><br></div><div><div>administrator@lxc:~$ lxc exec test cat /etc/network/interfaces</div><div># This file describes the network interfaces available on your system</div><div># and how to activate them. For more information, see interfaces(5).</div><div><br></div><div># The loopback network interface</div><div>auto lo</div><div>iface lo inet loopback</div><div><br></div><div>auto eth0</div><div>iface eth0 inet dhcp</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Sun, Mar 26, 2017 at 5:09 PM Spike <<a href="mailto:spike@drba.org">spike@drba.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Stephane,<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">this is my default profile, don't think I have that key at all. I don't really use profiles, all my interfaces are setup with ansible and I specify devices there.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg"><div class="gmail_msg">config: {}</div><div class="gmail_msg">description: Default LXD profile</div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">devices:</div><div class="gmail_msg"> root:</div><div class="gmail_msg"> path: /</div><div class="gmail_msg"> pool: default</div><div class="gmail_msg"> type: disk</div></div></div><div dir="ltr" class="gmail_msg"><div class="gmail_msg"><div class="gmail_msg">name: default</div><div class="gmail_msg">used_by:</div><div class="gmail_msg">- /1.0/containers/log</div></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">also this is the same config I have on all my other working nodes.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">thanks,</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Spike</div><div class="gmail_msg"><br class="gmail_msg"></div></div><br class="gmail_msg"><div class="gmail_quote gmail_msg"><div dir="ltr" class="gmail_msg">On Sun, Mar 26, 2017 at 4:56 PM Stéphane Graber <<a href="mailto:stgraber@ubuntu.com" class="gmail_msg" target="_blank">stgraber@ubuntu.com</a>> wrote:<br class="gmail_msg"></div><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">lxc profile show default<br class="gmail_msg">
<br class="gmail_msg">
Chances are you have the config key which instructs LXD to disable DHCP<br class="gmail_msg">
in the containers and causes /etc/network/interfaces in the containers<br class="gmail_msg">
to say "iface eth0 inet manual" as a result.<br class="gmail_msg">
<br class="gmail_msg">
On Sun, Mar 26, 2017 at 10:18:31PM +0000, Spike wrote:<br class="gmail_msg">
> so more info. I actually tried to wipe everything and install from the lts<br class="gmail_msg">
> ppa, but got the same behavior, so it's not 2.12 (the lts ppa has 2.0.9).<br class="gmail_msg">
> The other thing worth nothing is that static assignment works, so this<br class="gmail_msg">
> doesn't seem a problem with the bridge (fwiw there are 4 eth bonded and the<br class="gmail_msg">
> bridge is on the bond):<br class="gmail_msg">
><br class="gmail_msg">
> +--------+----------+---------+---------+<br class="gmail_msg">
> | NAME | TYPE | MANAGED | USED BY |<br class="gmail_msg">
> +--------+----------+---------+---------+<br class="gmail_msg">
> | bond0 | bond | NO | 0 |<br class="gmail_msg">
> +--------+----------+---------+---------+<br class="gmail_msg">
> | eth0 | physical | NO | 0 |<br class="gmail_msg">
> +--------+----------+---------+---------+<br class="gmail_msg">
> | eth1 | physical | NO | 0 |<br class="gmail_msg">
> +--------+----------+---------+---------+<br class="gmail_msg">
> | eth2 | physical | NO | 0 |<br class="gmail_msg">
> +--------+----------+---------+---------+<br class="gmail_msg">
> | eth3 | physical | NO | 0 |<br class="gmail_msg">
> +--------+----------+---------+---------+<br class="gmail_msg">
> | lxdbr0 | bridge | NO | 1 |<br class="gmail_msg">
> +--------+----------+---------+---------+<br class="gmail_msg">
><br class="gmail_msg">
> ## the container:<br class="gmail_msg">
> architecture: x86_64<br class="gmail_msg">
> config:<br class="gmail_msg">
> volatile.base_image:<br class="gmail_msg">
> 2cab90c0c342346ea154bc2e8cacdae752a70747a755ce1f2970c9a9ebb5fe8c<br class="gmail_msg">
> volatile.eth0.hwaddr: 00:16:3e:bb:05:c5<br class="gmail_msg">
> volatile.idmap.base: "0"<br class="gmail_msg">
> volatile.idmap.next:<br class="gmail_msg">
> '[{"Isuid":true,"Isgid":false,"Hostid":100000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":100000,"Nsid":0,"Maprange":65536}]'<br class="gmail_msg">
> volatile.last_state.idmap:<br class="gmail_msg">
> '[{"Isuid":true,"Isgid":false,"Hostid":100000,"Nsid":0,"Maprange":65536},{"Isuid":false,"Isgid":true,"Hostid":100000,"Nsid":0,"Maprange":65536}]'<br class="gmail_msg">
> volatile.last_state.power: RUNNING<br class="gmail_msg">
> devices:<br class="gmail_msg">
> root:<br class="gmail_msg">
> path: /<br class="gmail_msg">
> pool: default<br class="gmail_msg">
> type: disk<br class="gmail_msg">
> ephemeral: false<br class="gmail_msg">
> profiles:<br class="gmail_msg">
> - default<br class="gmail_msg">
><br class="gmail_msg">
> the image is a fresh download of xenial from the ubuntu mirror.<br class="gmail_msg">
><br class="gmail_msg">
> again static assignments works, the problem is exclusively with dhcp.<br class="gmail_msg">
><br class="gmail_msg">
> thank you for any input,<br class="gmail_msg">
><br class="gmail_msg">
> Spike<br class="gmail_msg">
><br class="gmail_msg">
> On Sun, Mar 26, 2017 at 1:54 PM Spike <<a href="mailto:spike@drba.org" class="gmail_msg" target="_blank">spike@drba.org</a>> wrote:<br class="gmail_msg">
><br class="gmail_msg">
> Hi,<br class="gmail_msg">
><br class="gmail_msg">
> can't seem to get dhcp to work anymore on containers and I don't get why. I<br class="gmail_msg">
> have 3 servers, all 3 set up the same way (from ansible). on the third<br class="gmail_msg">
> which I just rebuilt lxc gets no network. Instead on the host's logs I get<br class="gmail_msg">
> this:<br class="gmail_msg">
><br class="gmail_msg">
> audit: type=1400 audit(1490560798.485:349): apparmor="DENIED"<br class="gmail_msg">
> operation="file_perm" namespace="root//lxd-log_<var-lib-lxd>"<br class="gmail_msg">
> profile="/sbin/dhclient" name="/apparmor/.null" pid=8928 comm="dhclient"<br class="gmail_msg">
> requested_mask="w" denied_mask="w" fsuid=100000 ouid=0<br class="gmail_msg">
><br class="gmail_msg">
> lxc config set my-container raw.lxc lxc.aa_profile=unconfined did not help.<br class="gmail_msg">
> It seems related to this bug, but not sure:<br class="gmail_msg">
><br class="gmail_msg">
> <a href="https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1654624" rel="noreferrer" class="gmail_msg" target="_blank">https://bugs.launchpad.net/ubuntu/+source/isc-dhcp/+bug/1654624</a><br class="gmail_msg">
><br class="gmail_msg">
> the only difference I can see between the host that doesn't work and the<br class="gmail_msg">
> one that does is the version of LXD, 2.12 on the host that doesn't work and<br class="gmail_msg">
> 2.11 on the others (installed from ppa on ubuntu xenial).<br class="gmail_msg">
><br class="gmail_msg">
> any thoughts?<br class="gmail_msg">
><br class="gmail_msg">
> thanks,<br class="gmail_msg">
><br class="gmail_msg">
> Spike<br class="gmail_msg">
<br class="gmail_msg">
> _______________________________________________<br class="gmail_msg">
> lxc-users mailing list<br class="gmail_msg">
> <a href="mailto:lxc-users@lists.linuxcontainers.org" class="gmail_msg" target="_blank">lxc-users@lists.linuxcontainers.org</a><br class="gmail_msg">
> <a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a><br class="gmail_msg">
<br class="gmail_msg">
<br class="gmail_msg">
--<br class="gmail_msg">
Stéphane Graber<br class="gmail_msg">
Ubuntu developer<br class="gmail_msg">
<a href="http://www.ubuntu.com" rel="noreferrer" class="gmail_msg" target="_blank">http://www.ubuntu.com</a><br class="gmail_msg">
_______________________________________________<br class="gmail_msg">
lxc-users mailing list<br class="gmail_msg">
<a href="mailto:lxc-users@lists.linuxcontainers.org" class="gmail_msg" target="_blank">lxc-users@lists.linuxcontainers.org</a><br class="gmail_msg">
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a></blockquote></div></blockquote></div>