Having read this answer on Ask Ubuntu: What is “dist-upgrade” and why does it upgrade more than “upgrade”?
I'm still not sure what happened here in my situation.
On a local server, Ubuntu 18.04, I have docker pinned to an older version.
The file is located here: /etc/apt/preferences.d/docker-ce.pref
And the contents are:
Explanation: Pin added by Ansible role "nickjj.docker"
Package: docker-ce
Pin: version 19.03.5-ce*
Pin-Priority: 600
Someone performed sudo apt-get update
and then sudo apt-get dist-upgrade
on this server, according to the auth.log
file.
Docker didn't get upgraded, but was clearly restarted. I learned this because the service file in /lib/systemd/system/docker.service
was reset to the default.
After this, I learned you shouldn't do edits there, but do sudo systemctl edit docker.service
.
But that's another story. Point is: I did make those edits in the past and then they were gone. The service had either been upgraded or restarted, and it turned out it wasn't upgraded.
I don't get why it restarted. It's pinned, so it shouldn't come up during upgrades.
That being said, dist-upgrade
details some sort of conflict resolution between dependencies.
Could it be that dist-upgrade
forced a restart of the service?
No other commands were found in auth.log
, it's really weird.