snapd.refresh.service runs when being offline or on expensive/slow internet
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
snapd (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
snapd.refresh.
● snapd.refresh.
Loaded: loaded (/lib/systemd/
Active: failed (Result: exit-code) since Mon 2016-08-29 22:29:46 CEST; 3min 28s ago
Docs: man:snap(1)
Process: 2498 ExecStart=
Main PID: 2498 (code=exited, status=1/FAILURE)
Aug 29 22:29:46 autopkgtest systemd[1]: Starting Automatically refresh installed snaps...
Aug 29 22:29:46 autopkgtest /usr/bin/
Aug 29 22:29:46 autopkgtest snap[2498]: error: cannot refresh []: Post https:/
Aug 29 22:29:46 autopkgtest systemd[1]: snapd.refresh.
Aug 29 22:29:46 autopkgtest systemd[1]: Failed to start Automatically refresh installed snaps.
Aug 29 22:29:46 autopkgtest systemd[1]: snapd.refresh.
Aug 29 22:29:46 autopkgtest systemd[1]: snapd.refresh.
This alone is mostly just a wart (although failed services are always a red flag). More importantly this shows that this will run even on 3G, tethering, or other slow/expensive links. Please limit auto-upgrading snaps to when the system is on a high-quality ethernet/wifi link.
ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: snapd 2.13+16.10
ProcVersionSign
Uname: Linux 4.4.0-9136-generic x86_64
ApportVersion: 2.20.3-0ubuntu7
Architecture: amd64
CurrentDesktop: i3
Date: Mon Aug 29 22:33:19 2016
EcryptfsInUse: Yes
SourcePackage: snapd
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in snapd (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
A simple fix is to change one target in /lib/systemd/ system/ snapd.refresh. service. I changed the line
After=network. target snapd.firstboot .service snapd.socket
to
After=network- online. target snapd.firstboot .service snapd.socket
Now the service is started, when the network is really online.