Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Cannot copy or deploy images behind proxy #2147
Comments
|
cloud-images.ubuntu.com is currently offline due to network issues on the Canonical network. |
stgraber
closed this
Jun 23, 2016
|
Note that indeed, unless you have http_proxy and https_proxy set in the daemon's environment (which init systems don't usually do), you will need to set core.proxy_http and core.proxy_https This likely was the first problem you ran into, and you then hit the actual image server being unavailable at the moment. |
ptylenda
commented
Jun 23, 2016
|
Okay, thanks, but what is the reason I could curl without a problem? I tried that for about 2 hours in different env combinations, and in all cases curl was working but lxd launch was not. Maybe it can be caused by proxy being of form http://abc:1234/, even though it is a https proxy? |
|
And you had both core.http_proxy and core.https_proxy set to http://abc:1234 during those tests as well as http_proxy and https_proxy set accordingly in the shell you were running the lxc command from? |
ptylenda
commented
Jun 23, 2016
|
Well, now knowing that there are problems with cloud-images.ubuntu.com, I have tried
and now it worked, but only if core.https_proxy was set, it ignored $HTTPS_PROXY, as you mentioned in your previous comment. However, I am not sure how to resolve this issue, because this is a controller machine bootstraped by Juju 2.0, especially that it requires doing
(or at least the latter one) |
|
Both of the profile configuration keys should automatically get unset once lxdbr0 is properly configured which I'd expect Juju to do for you. Same should go for core.proxy_http and core.proxy_https, those should be set by Juju when it's told to use a proxy for a given environment. As for the environment variables, LXD doesn't ignore them, but they need to be set for both the client (lxc) and the daemon (lxd). Init systems don't pass those environment variables so unless you manually modified the lxd systemd unit, the daemon wouldn't have them set. Actually, in most cases you don't even need the client to have the environment variables set as it's the daemon doing all the image handling, not the client. The exception is for commands that are done directly by the client such as "lxc image list ubuntu:" or "lxc image info ubuntu:16.04". |
|
Oh and yes, cloud-images.ubuntu.com is now back online. |
ptylenda
commented
Jun 23, 2016
•
|
In case of juju, this is how I am bootstrapping. config.yml:
Command: Such a controller gets bootstrapped properly, I am able to communicate from this machine to outside world, use apt-get and so on, but lxd is not configured properly out of the box. Well, it may be a bug in beta version... UPDATE: I might have not been precise enough, I am bootstraping maas controller on juju in order to deploy openstack. And I have tried to use different bundles, but these with lxc are not compatible with juju 2.0, because they need to use "lxd" instead of "lxc" in configuration files. The problems I describe occur when I use config https://api.jujucharms.com/charmstore/v5/~openstack-charmers-next/openstack-base-xenial-mitaka/archive/bundle.yaml with all lxc changed to lxd, as described in https://jujucharms.com/docs/devel/temp-release-notes (https://jujucharms.com/docs/devel/temp-release-notes#lxd-containers) |
mushuweb
commented
Aug 12, 2016
•
Proxy configurationIn most setups, you’ll want the LXD daemon to fetch images from remote servers. If you are in an environment where you must go through a HTTP(s) proxy to reach the outside world, you’ll want to set a few configuration keys or alternatively make sure that the standard PROXY environment variables are set in the daemon’s environment.
With those, all transfers initiated by LXD will use the squid01.internal HTTP proxy, except for traffic to the server at image-server.local Source : https://www.stgraber.org/2016/03/15/lxd-2-0-installing-and-configuring-lxd-212/ |
ptylenda commentedJun 23, 2016
Required information
Issue description
For some reason images cannot be copied when being behind proxy. Proxy settings are set properly according to https://github.com/lxc/lxd/blob/master/doc/configuration.md
Steps to reproduce
Configuration https://github.com/lxc/lxd/blob/master/doc/configuration.md says, that there is no need for setting lxd core.proxy_https, but even if I set it, it still doesn't work...
I have tried solution described in #1909, but even if I have profile like below, it still doesn't work: