snap ignores the proxy environment variables
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Snappy |
Fix Released
|
Undecided
|
John Lenton | ||
snapd (Ubuntu) |
Fix Released
|
Undecided
|
John Lenton |
Bug Description
I'm working behind an http proxy and find out that, snappy stopped to using http_proxy and/or https_proxy for connection with store since version 2. The proxy setting works with snappy 1.x, wget and curl.
root@SnapEntw:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04 LTS
Release: 16.04
Codename: xenial
root@SnapEntw:~# uname -a
Linux SnapEntw 4.4.0-21-generic #37-Ubuntu SMP Mon Apr 18 18:33:37 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
root@SnapEntw:~# apt-cache show snapd
Package: snapd
Priority: optional
Section: devel
Installed-Size: 18536
Maintainer: Ubuntu Developers <email address hidden>
Architecture: amd64
Version: 2.0.2
Replaces: ubuntu-snappy (<< 1.9), ubuntu-snappy-cli (<< 1.9)
Depends: init-system-helpers (>= 1.18~), libc6 (>= 2.4), adduser, lsb-release, squashfs-tools, ubuntu-
Conflicts: snap (<< 2013-11-
Breaks: ubuntu-snappy (<< 1.9), ubuntu-snappy-cli (<< 1.9)
Filename: pool/main/
Size: 4010516
MD5sum: 45b58056b9107a4
SHA1: 003a857233ebd93
SHA256: 27507f566e314d3
Description-en: Tool to interact with Ubuntu Core Snappy.
Manage an Ubuntu system with snappy.
Description-md5: 364ba9499ea9442
Built-Using: golang-1.6 (= 1.6.1-0ubuntu1), golang-check.v1 (= 0.0+git20150729
Homepage: https:/
Bugs: https:/
Origin: Ubuntu
Supported: 5y
Task: ubuntu-core, ubuntu-desktop, ubuntu-usb, cloud-image, server, kubuntu-desktop, ubuntu-core, edubuntu-desktop, edubuntu-usb, xubuntu-core, xubuntu-desktop, mythbuntu-desktop, lubuntu-core, ubuntustudio-
root@SnapEntw:~# export http_proxy=http://
root@SnapEntw:~# export https_proxy=http://
root@SnapEntw:~# snap install hello-world
error: cannot perform the following tasks:
- Download snap "ubuntu-core" from channel "stable" (Get https:/
root@SnapEntw:~# wget https:/
[1] 2536
root@SnapEntw:~# The name is too long, 268 chars total.
Trying to shorten...
New name is search?
--2016-05-09 10:02:25-- https:/
Connecting to 192.168.
Proxy request sent, awaiting response... 200 OK
Length: 123898 (121K) [application/
Saving to: ‘search?
search?
2016-05-09 10:02:26 (628 KB/s) - ‘search?
root@SnapEntw:~# curl -v https:/
[1] 2538
root@SnapEntw:~# * Trying 192.168.1.123...
* Connected to 192.168.1.123 (192.168.1.123) port 3128 (#0)
* Establish HTTP proxy tunnel to search.
> CONNECT search.
> Host: search.
> User-Agent: curl/7.47.0
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection established
< Connection: close
<
* Proxy replied OK to CONNECT request
* found 173 certificates in /etc/ssl/
* found 692 certificates in /etc/ssl/certs
* ALPN, offering http/1.1
* SSL connection using TLS1.2 / ECDHE_RSA_
* server certificate verification OK
* server certificate status verification SKIPPED
* common name: search.
* server certificate expiration date OK
* server certificate activation date OK
* certificate public key: RSA
* certificate version: #3
* subject: C=GB,ST=
* start date: Tue, 02 Jun 2015 00:00:00 GMT
* expire date: Mon, 06 Jun 2016 12:00:00 GMT
* issuer: C=US,O=DigiCert Inc,CN=DigiCert SHA2 Secure Server CA
* compression: NULL
* ALPN, server did not agree to a protocol
> GET /api/v1/
> Host: search.
> User-Agent: curl/7.47.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Mon, 09 May 2016 08:03:37 GMT
< Server: gunicorn/19.3.0
< X-Suggested-
< Access-
< Expires: Mon, 09 May 2016 08:04:38 GMT
< Vary: Accept,
< X-Bzr-Revision-
< Cache-Control: max-age=61
< Access-
< Access-
< Content-Type: application/
< Content-Length: 123898
< X-Cache: MISS from juju-prod-
< X-Cache-Lookup: HIT from juju-prod-
< Via: 1.1 juju-prod-
< Strict-
<
Changed in snappy: | |
assignee: | nobody → John Lenton (chipaca) |
status: | New → In Progress |
Changed in snappy: | |
status: | In Progress → Fix Released |
Changed in snapd (Ubuntu): | |
status: | Confirmed → Fix Released |
assignee: | nobody → John Lenton (chipaca) |
The "snap" tool is a client to snapd. Setting environment variables on the client won't make snapd aware of them. We need to find a nice way to set such configuration details on the server.