maas-import-isos behind a proxy

Asked by Shannon McFarland on 2012-04-26

The host running MAAS is behind a proxy server in our lab. I can wget anywhere I want as well as do apt-gets (via an export) but when I run the maas-import-isos command I get a whole string of "No route to host" errors as it is trying to go there directly vs. using my proxy.

Is there a way to force MAAS to use a proxy for these imports?


Question information

English Edit question
MAAS Edit question
No assignee Edit question
Last query:
Last reply:

If you set the environment variable http_proxy it should use that.

So something like:
http_proxy= maas-import-isos

export http_proxy=

to set it for everything in your shell.

Shannon McFarland (shmcfarl) said : #2

That is how I have had it set and it never seems to use the proxy. wget and apt-get use it fine.

I get this (just snippet):

-2012-04-26 12:09:09--
Resolving (,,, ...
Connecting to (||:80... failed: No route to host.
Connecting to (||:80... failed: No route to host.
Connecting to (||:80... failed: No route to host.
Connecting to (||:80... failed: No route to host.
Connecting to (||:80... failed: No route to host.
Connecting to (||:80... ^

It should be hitting the proxy instead of trying to route directly to it.

Hmm odd, maas-import-isos just calls cobbler-ubuntu-import which uses wget itself so it ought to use your proxy settings.

Did you export http_proxy in your shell? Wthout the export the variable won't reach anything that mass-import-isos calls out to.

Shannon McFarland (shmcfarl) said : #5

Yes, I did an export in my shell. I am going to temporarily move the MAAS host outside of my proxy to get this finished up. Thanks for your help.

Ok I am sorry I could not be of more help. As far as I know, this really ought to work so I am going to file a bug.

I think sudo is not helping us. You could try it like this:

sudo su -
export http_proxy= ....

drolfe (drolfe) said : #8

If you can see your http_proxy when running the command env, then make sure you run sudo with the -E option to (preserve environment)


sudo -E maas-import-isos

Jacek (jacek-r-e) said : #9

You need to set both:

Worked fine for me; failed when I had only first set.

Marking solved.