1

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.

Serg
  • 824
  • 7
  • 14
KdgDev
  • 265
  • Try pin priority 1001 – nobody Jul 06 '21 at 14:47
  • 3
    Yes, dist-upgrade will restart services where required. Just because Docker didn’t receive any updates doesn’t mean that a dependency didn’t – matigo Jul 06 '21 at 14:50
  • @matigo Gosh darnit. Well, if you turn that into a fully fledged answer I'll mark it as the accepted answer. – KdgDev Jul 06 '21 at 15:06
  • 1
    You can probably also verify whether the docker version changed (sounds like there's some uncertainty) by checking /var/log/apt/history.log. – Gertlex Jul 06 '21 at 15:31

0 Answers0