No HTTP proxy support

Bug #1266504 reported by Robie Basak
20
This bug affects 4 people
Affects Status Importance Assigned to Milestone
uvtool
Triaged
Wishlist
Unassigned

Bug Description

It would be nice if --http-proxy existed, and/or the environment's http_proxy variable were used to configure cloud-init.

Robie Basak (racb)
Changed in uvtool:
status: New → Triaged
Revision history for this message
Adam Stokes (adam-stokes) wrote :

Robie,

Was curious if this feature is on the roadmap and if so is there an ETA?

Thank you,
Adam

tags: added: cloud-installer
Revision history for this message
Mike McCracken (mikemc) wrote :

I'd be happy to propose a branch for this - I just hacked a copy of kvm.py to add the cloud-init key 'apt_proxy'

However, AFAICT cloud-init doesn't have a http_proxy key (it doesn't show up in the cloudinit source tree). Is there a way to set that for cloud-init that I'm missing?

Revision history for this message
Robie Basak (racb) wrote :

Adam,

> Was curious if this feature is on the roadmap and if so is there an ETA?

Sorry, I must have missed your question when you asked it. I don't have any plans to do anything but urgent maintenance on uvtool right now, but my own time priorities can always be changed if we need to do that inside Canonical.

Mike,

> I'd be happy to propose a branch for this...

Please do!

I don't see anything in cloud-init apart from for apt either. The way I would set http_proxy (and https_proxy, socks_proxy etc) is by appending /etc/environment in the guest from cloud-init. Is there a different mechanism we should be using instead? We can probably organise an append from cloud-init (even if we have to resort to "sh -c \"echo ... >> /etc/environment\"") which should work for subsequent user logins. Perhaps it should be a request to cloud-init to be able to specify environment variables in userdata directly though?

I imagine a basic implementation to set both apt_proxy and arrange for http_proxy, with a more complex implementation to perhaps permit the two to be set independently and/or add https and socks.

Revision history for this message
Robie Basak (racb) wrote :

Also, maybe default to the calling user's http_proxy, etc? For bonus points read out the calling user's system's apt configuration in a reliable way :-)

Revision history for this message
Robie Basak (racb) wrote :

Also, maybe default to the calling user's http_proxy, etc? For bonus points read out the calling user's system's apt configuration in a reliable way :-)

Also, note that DNS might resolve inside the guest differently, so resolving hostnames host-side might be an idea.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.