snapd does not use system proxy settings

Bug #1777413 reported by Noel Grandin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
snapd (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I'm seeing this in the logs:

  Jun 18 11:19:59 librebuild2 snapd[755]: 2018/06/18 11:19:59.542067 autorefresh.go:327: Cannot prepare auto-refresh change: cannot refresh snap-declaration for "gnome-3-26-1604": Get https:/
/api.snapcraft.io/api/v1/snaps/assertions/snap-declaration/16/NmbO4ZEgTCbugdJuIMrIio0LXczdU5WN?max-format=2: net/http: request canceled while waiting for connection (Client.Timeout exceeded
 while awaiting headers)
Jun 18 11:19:59 librebuild2 snapd[755]: 2018/06/18 11:19:59.542153 stateengine.go:101: state ensure error: cannot refresh snap-declaration for "gnome-3-26-1604": Get https://api.snapcraft.i
o/api/v1/snaps/assertions/snap-declaration/16/NmbO4ZEgTCbugdJuIMrIio0LXczdU5WN?max-format=2: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting
headers)

And I guess it's because I'm behind a proxy, and most things don't seem to read the system proxy settings.

This is Ubuntu18.

Perhaps the control-panel thingy should be setting the https_proxy environment variable(s)?

Revision history for this message
John Lenton (chipaca) wrote :

The control-panel thingy _used_ to set https_proxy via /etc/environment, if it doesn't that might be a bug. Or maybe you set it and didn't restart snapd? That would also have this effect.

Changed in snapd (Ubuntu):
status: New → Incomplete
Revision history for this message
John Lenton (chipaca) wrote :

(please set back to New after answering that)

Revision history for this message
Noel Grandin (noelgrandin) wrote :

I did set it, and I did restart.

This is probably the same problem that I've seen elsewhere, where snapd is being run via sudo or something similar, and sudo strips the relevant environment variables.

So really this is a system-wide design problem with the interaction of sudo and proxy settings.

No idea what the right answer is - making everything talk dbus to some config daemon to get proxy settings?

Revision history for this message
John Lenton (chipaca) wrote :

Sorry I was unclear: when you set the system-wide proxy, did it update /etc/environment?

Revision history for this message
Noel Grandin (noelgrandin) wrote :

I don't know, and I'm not using Ubuntu any more, sorry, feel free to close this.

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for snapd (Ubuntu) because there has been no activity for 60 days.]

Changed in snapd (Ubuntu):
status: Incomplete → Expired
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.