<div dir="ltr">Hi Stephane -<div><br></div><div>lxd1, lxd2, and kangal are all on the same lan, and connectivity is good:</div><div><br></div><div><div>root@olympia:~# ssh kangal w</div><div>root@kangal's password: </div><div> 13:26:53 up 3 days, 14:50,  0 users,  load average: 0.29, 0.37, 0.37</div><div>USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT</div></div><div><br></div><div><div>root@ronnie:~# ssh kangal w</div><div>root@kangal's password: </div><div> 13:27:09 up 3 days, 14:51,  0 users,  load average: 0.29, 0.36, 0.37</div><div>USER     TTY      FROM             LOGIN@   IDLE   JCPU   PCPU WHAT</div></div><div><br></div><div>Regards,</div><div><br></div><div>Jake</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Aug 17, 2016 at 1:24 PM, Stéphane Graber <span dir="ltr"><<a href="mailto:stgraber@ubuntu.com" target="_blank">stgraber@ubuntu.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class=""><div class="h5">On Wed, Aug 17, 2016 at 01:14:43PM -0700, jjs - mainphrame wrote:<br>
> Greetings,<br>
><br>
> I'm running lxd version 2.0.3-0ubuntu1~ubuntu16.04.2<br>
><br>
> I'm trying to get lxd to correctly execute a move of a container from one<br>
> lxd host to another. I have two ubuntu 16.04 hosts, ronnie (designated as<br>
> lxd1) and olympia (designated as lxd2):<br>
><br>
> root@olympia:~# lxc remote list<br>
> +-----------------+-----------<wbr>------------------------------<wbr>-+---------------+--------+---<wbr>-----+<br>
> |      NAME       |                   URL                    |   PROTOCOL<br>
>  | PUBLIC | STATIC |<br>
> +-----------------+-----------<wbr>------------------------------<wbr>-+---------------+--------+---<wbr>-----+<br>
> | images          | <a href="https://images.linuxcontainers.org" rel="noreferrer" target="_blank">https://images.<wbr>linuxcontainers.org</a>       | lxd<br>
>   | YES    | NO     |<br>
> +-----------------+-----------<wbr>------------------------------<wbr>-+---------------+--------+---<wbr>-----+<br>
> | local (default) | unix://                                  | lxd<br>
>   | NO     | YES    |<br>
> +-----------------+-----------<wbr>------------------------------<wbr>-+---------------+--------+---<wbr>-----+<br>
> | lxd1            | <a href="https://192.168.111.20:8443" rel="noreferrer" target="_blank">https://192.168.111.20:8443</a>              | lxd<br>
>   | NO     | NO     |<br>
> +-----------------+-----------<wbr>------------------------------<wbr>-+---------------+--------+---<wbr>-----+<br>
> | ubuntu          | <a href="https://cloud-images.ubuntu.com/releases" rel="noreferrer" target="_blank">https://cloud-images.ubuntu.<wbr>com/releases</a> |<br>
> simplestreams | YES    | YES    |<br>
> +-----------------+-----------<wbr>------------------------------<wbr>-+---------------+--------+---<wbr>-----+<br>
> | ubuntu-daily    | <a href="https://cloud-images.ubuntu.com/daily" rel="noreferrer" target="_blank">https://cloud-images.ubuntu.<wbr>com/daily</a>    |<br>
> simplestreams | YES    | YES    |<br>
> +-----------------+-----------<wbr>------------------------------<wbr>-+---------------+--------+---<wbr>-----+<br>
><br>
> root@ronnie:~# lxc remote list<br>
> +-----------------+-----------<wbr>------------------------------<wbr>-+---------------+--------+---<wbr>-----+<br>
> |      NAME       |                   URL                    |   PROTOCOL<br>
>  | PUBLIC | STATIC |<br>
> +-----------------+-----------<wbr>------------------------------<wbr>-+---------------+--------+---<wbr>-----+<br>
> | images          | <a href="https://images.linuxcontainers.org" rel="noreferrer" target="_blank">https://images.<wbr>linuxcontainers.org</a>       | lxd<br>
>   | YES    | NO     |<br>
> +-----------------+-----------<wbr>------------------------------<wbr>-+---------------+--------+---<wbr>-----+<br>
> | local (default) | unix://                                  | lxd<br>
>   | NO     | YES    |<br>
> +-----------------+-----------<wbr>------------------------------<wbr>-+---------------+--------+---<wbr>-----+<br>
> | lxd2            | <a href="https://192.168.111.193:8443" rel="noreferrer" target="_blank">https://192.168.111.193:8443</a>             | lxd<br>
>   | NO     | NO     |<br>
> +-----------------+-----------<wbr>------------------------------<wbr>-+---------------+--------+---<wbr>-----+<br>
> | ubuntu          | <a href="https://cloud-images.ubuntu.com/releases" rel="noreferrer" target="_blank">https://cloud-images.ubuntu.<wbr>com/releases</a> |<br>
> simplestreams | YES    | YES    |<br>
> +-----------------+-----------<wbr>------------------------------<wbr>-+---------------+--------+---<wbr>-----+<br>
> | ubuntu-daily    | <a href="https://cloud-images.ubuntu.com/daily" rel="noreferrer" target="_blank">https://cloud-images.ubuntu.<wbr>com/daily</a>    |<br>
> simplestreams | YES    | YES    |<br>
> +-----------------+-----------<wbr>------------------------------<wbr>-+---------------+--------+---<wbr>-----+<br>
><br>
> You can see that the remotes are configured with their local lan addresses.<br>
> So far so good?<br>
><br>
><br>
><br>
> Here are the 2 containers currently on lxd2:<br>
> root@olympia:~# lxc list<br>
> +--------+---------+----------<wbr>-------------+------+---------<wbr>---+-----------+<br>
> |  NAME  |  STATE  |         IPV4          | IPV6 |    TYPE    | SNAPSHOTS |<br>
> +--------+---------+----------<wbr>-------------+------+---------<wbr>---+-----------+<br>
> | akita  | RUNNING | 192.168.111.22 (eth0) |      | PERSISTENT | 0         |<br>
> +--------+---------+----------<wbr>-------------+------+---------<wbr>---+-----------+<br>
> | kangal | RUNNING | 192.168.111.44 (eth0) |      | PERSISTENT | 0         |<br>
> +--------+---------+----------<wbr>-------------+------+---------<wbr>---+-----------+<br>
><br>
><br>
><br>
> Now, I try to move a container from lxd2 to lxd1:<br>
> root@olympia:~# lxc move kangal lxd1:<br>
> error: Error transferring container data: Unable to connect to:<br>
> <a href="http://192.168.1.8:8443" rel="noreferrer" target="_blank">192.168.1.8:8443</a><br>
<br>
</div></div>Is there any way for lxd1 to connect to kangal?<br>
<br>
The way LXD currently deals with cross-host communication is that the<br>
client has the source host issue a token which the client sends to the<br>
target along with instructions on how to connect to the source.<br>
<br>
The target then directly connects to the source to fetch the data<br>
(in this case, the container).<br>
<br>
This means that there must be a way for the target to connect to the<br>
source on the LXD port without being blocked by firewalls or going<br>
through NAT.<br>
<br>
<br>
Some more details can be found at<br>
<a href="https://www.stgraber.org/2016/04/12/lxd-2-0-remote-hosts-and-container-migration-612/" rel="noreferrer" target="_blank">https://www.stgraber.org/2016/<wbr>04/12/lxd-2-0-remote-hosts-<wbr>and-container-migration-612/</a><br>
in the "network requirements" and "how this all works" sections.<br>
<br>
<br>
The client is currently supposed to iterate through all the IPs that the<br>
source server advertises (see addresses field in "lxc info kangal"), the<br>
one that's in the error message is usually the last one of those.<br>
<br>
<br>
If core.https_address is set on the source host, then only that address<br>
will be attempted since it's the only one LXD will be listening on.<br>
<br>
<br>
As mentioned in the blog post, we do have a plan to improve the<br>
situation by having the client relay the data in cases where the two<br>
servers can't talk, but we haven't made much progress on implementing<br>
that so far.<br>
<span class=""><br>
><br>
> Why is it trying to connect to 192.168.1.8? That is a local wireless<br>
> address on lxd2, but it was never mentioned in any lxd configuration:<br>
><br>
> root@olympia:~# ifconfig wlp3s0<br>
> wlp3s0    Link encap:Ethernet  HWaddr 80:56:f2:05:ce:6c<br>
>           inet addr:192.168.1.8  Bcast:192.168.1.255  Mask:255.255.255.0<br>
>           inet6 addr: fe80::8256:f2ff:fe05:ce6c/64 Scope:Link<br>
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1<br>
>           RX packets:401712 errors:0 dropped:0 overruns:0 frame:0<br>
>           TX packets:219214 errors:0 dropped:0 overruns:0 carrier:0<br>
>           collisions:0 txqueuelen:1000<br>
>           RX bytes:95097222 (95.0 MB)  TX bytes:34201360 (34.2 MB)<br>
><br>
><br>
> So my question is, how do we get lxd to ignore the local wireless IP, and<br>
> execute the lxc move command using the configured IPs?<br>
><br>
> Regards,<br>
><br>
> Jake<br>
<br>
</span>> ______________________________<wbr>_________________<br>
> lxc-users mailing list<br>
> <a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.<wbr>linuxcontainers.org</a><br>
> <a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.<wbr>org/listinfo/lxc-users</a><br>
<span class=""><font color="#888888"><br>
<br>
--<br>
Stéphane Graber<br>
Ubuntu developer<br>
<a href="http://www.ubuntu.com" rel="noreferrer" target="_blank">http://www.ubuntu.com</a><br>
</font></span><br>______________________________<wbr>_________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.<wbr>linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" rel="noreferrer" target="_blank">http://lists.linuxcontainers.<wbr>org/listinfo/lxc-users</a><br></blockquote></div><br></div></div></div>