lxdhub icon indicating copy to clipboard operation
lxdhub copied to clipboard

The incorrect address gets displayed when starting LXDHub as LXC container

Open BrunnerLivio opened this issue 6 years ago • 3 comments

In the README it states the following lines to pull the latest LXDHub image:

lxc remote add lxdhub https://lxdhub.xyz:8443 --accept-certificate --public
lxc launch lxdhub:lxdhub mylxdhub
lxc info mylxdhub | grep "eth0:.*inet" | head -n1 | awk '{print "Open http://"$3":3000 in your browser"}'

It returns the following:

Open http://fe80::216:3eff:fe98:d043:3000 in your browser

I guess there should be a small timeout?

Associated: https://github.com/lxc/lxd/issues/5226

BrunnerLivio avatar Oct 30 '18 12:10 BrunnerLivio

@BrunnerLivio - the above is the IPv6 IP of the LXDHub.

But that brings up a good point... the LXDHub could be reachable by BOTH an IPv6 and an IPv4 address. Especially if you installed the LXDHub locally in an LXD container? Should the above cmd be modified to display BOTH ?

bmullan avatar Oct 30 '18 12:10 bmullan

@bmullan

Should the above cmd be modified to display BOTH ?

I think the IPv4 should be enough for this command. But as mentioned in https://github.com/lxc/lxd/issues/5226 getting the IPv4 is not possible as far as I know with LXD, except hack a sleep with an approximate timeout command before calling lxc info | grep .... which we do not want, except we have to..

BrunnerLivio avatar Oct 30 '18 13:10 BrunnerLivio

In the ideal case one should reach lxdhub over and so ips would not matter so much. But this means changing the host configuration...

erickeller avatar Nov 24 '18 20:11 erickeller