Search This Blog

Friday, November 15, 2019

Unbuntu Snap bug - installs docker file and fills up your syslog

Found my linux workstation had run out of disk space and this was the cause. Workaround - remove snap docker and truncate the syslog.  

=========================================



Have an Ubuntu 18.04 VM with docker.io installed from repo, it suddenly ran out of diskspace after the docker snap installed all by itself at 01:00 Amsterdam time.
Both snap docker and docker from repo were fighting over /run/containerd/containerd.sock:
/var/log/syslog shows many of below lines being added:
docker.dockerd[5786]: time="2019-11-15T01:54:57.345655308Z" level=error msg="failed to get event" error="rpc error: code = Unavailable desc = all SubConns are in TransientFailure,
latest connection error: connection error: desc = \"transport: Error while dialing dial unix /run/containerd/containerd.sock: connect: permission denied\"" module=libcontainerd namespace=moby
On checking the file:
sudo fuser /run/containerd/containerd.sock
1052
ps aux | grep 1052
root 1026 219 1.1 2010520 23976 ? Ssl 09:07 33:18 dockerd -G docker --exec-root=/var/snap/docker/418/run/docker --data-root=/var/snap/docker/common/var-lib-docker --pidfile=/var/snap/docker/418/run/docker.pid --config-file=/var/snap/docker/418/config/daemon.json
root 1052 0.2 0.2 2650780 5540 ? Ssl 09:07 0:02 /usr/bin/containerd
Similar to what is described here: https://askubuntu.com/questions/1188908/what-does-this-docker-log-entry-mean
I've removed the snap and snapd for now and cleared the syslog.
What's going on?
A Z (azaagman) 6 hours ago
affects:php-defaults (Ubuntu) → snapd (Ubuntu)
Launchpad Janitor (janitor) wrote :
Status changed to 'Confirmed' because the bug affects multiple users.
Changed in docker.io (Ubuntu):
status:New → Confirmed
Changed in snapd (Ubuntu):
status:New → Confirmed
lubobill1990 (lubobill1990) wrote :
I regard this is not just a bug, but a serious security hazard. Why snap can automatically install docker from outside control?
A Z (azaagman) wrote :
Adding in workaround:
Remove either the docker snap or the docker.io package:
sudo snap remove docker
OR
sudo apt purge docker.io
Truncate the syslog to get your diskspace back:
sudo truncate -s 0 /var/log/syslog

No comments: