Score:6

Ubuntu 20.04.5 LTS package upgrade broke Docker; how recover from this?

cn flag

VPS running 20.04 LTS with a handful of Docker images that have been around for years.

I just updated the security and, what should be, non-breaking upgrades (apt-get update && apt-get upgrade), but the process broke the Docker install. I've already tried removing and reinstalling, sudo dpkg --configure -a and similar commands, but it won't start. I have avoided purges as I'm not sure I understand what configuration files will be removed.

SystemCtl Status:

● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: failed (Result: exit-code) since Mon 2023-02-06 10:06:22 EST; 12s ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
    Process: 1231 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
   Main PID: 1231 (code=exited, status=1/FAILURE)

sudo journalctl -xe doesn't provide anything helpful.

The most obvious message from syslog:

dockerd[1231]: failed to start daemon: error initializing graphdriver: prior storage driver aufs is deprecated and will be removed in a future release; update the the daemon configuration and explicitly choose this storage driver to continue using it; visit https://docs.docker.com/go/storage-driver/ for more information

We know aufs is deprecated and are working on a plan to migrate to overlay2. Had planned to do that in conjunction with a dist-upgrade.

Is my issue indeed related to the deprecation of aufs? Is there a way to recover from this without migrating our images to overlay2 yet?

ru flag
If you've updated your Docker, then there is no way to fix this except to revert your docker packages to an older version. The deprecation of `aufs` is already complete in Docker - you MUST migrate to `overlay2` to use updated docker. That's what their error is indicating.
tim.rohrer avatar
cn flag
Doesn't that seem like an odd update for an LTS?
ru flag
Fun fact, if you installed Docker using Docker's guide which uses Docker's repositories, it doesn't follow LTS rules. Same if you installed Docker via snaps. How did you install Docker to begin with? (Ubuntu 22.04 may be an LTS but if you installed Docker from upstream repositories, you're on Docker's update and deprecation cycles, not Ubuntu LTS cycles)
tim.rohrer avatar
cn flag
Good question. As I think about it, Docker might have been reinstalled a number of years ago because of the gaff with them changing the repo urls. But, I thought they were installed using `apt` but I could be remembering wrong. It was, I'm sure, done before the upgrade from LTS 18 to 20. Luckily this issue is on our test server and so we can take a few to decide which way to proceed. Thank you for your help and insights.
ru flag
`apt` can use external repositories, not just Ubuntu's repos. Check `apt policy docker` and see what it says for where it's downloading the package from, if it's coming from Docker's upstream repos then it doesn't follow Ubuntu LTS rules.
pk flag
I would say you have to `update the the daemon configuration and explicitly choose this storage driver to continue using it`
Artur Meinild avatar
vn flag
Does this answer your question? [Docker upgrade failure: The aufs storage-driver is no longer supported](https://askubuntu.com/questions/1361206/docker-upgrade-failure-the-aufs-storage-driver-is-no-longer-supported)
tim.rohrer avatar
cn flag
In hindsight, sure. But that error message wasn't present with the upgrade, and hints to it were only found in the logs. The answer below is accepted.
Score:12
jp flag

Starting with the 23.0.0 release, Docker will fail to start if a deprecated storage driver is used : https://docs.docker.com/engine/deprecated/#aufs-storage-driver

Create or edit /etc/docker/daemon.json with the following content to use explicitly the aufs storage driver :

{
  "storage-driver": "aufs"
}

Now the Docker service should be able to be started again without any problems with a sudo service docker start command.

tim.rohrer avatar
cn flag
Boom! Thank you. Worked great. Now we can do our transition more controlled.
Manuel avatar
lb flag
you are my heros ! THANK YOU !
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.