Score:1

Stopping services from being restarted as a result of dist-upgrade replacing a dependency

my flag

Running Ubuntu Server 18.04

I believe I've encountered the following situation, and would like to stop it from occurring again.

The situation:

1/ I've put docker on hold with apt mark. This is confirmed with I do sudo apt upgrade --simulate, it correctly states:

The following packages have been kept back:
  containerd.io docker-ce docker-ce-cli

2/ Someone performs sudo apt dist-upgrade. This causes a shared dependency to be updated. Which in turn forces the docker service to restart, causing all containers to be restarted as well.

That's what I think happened. I'd like to prevent this from happening.

Is there a way to achieve this? The notion of docker, and all running containers, being restarted suddenly because of an event like this is bad news and I've frankly never heard of this happening before.

Is this possible? And if so, how do I prevent it? I would hope there's a way to basically say "This dependency is also used by a service that is not permitted to be automatically restarted, so don't upgrade it".

zwets avatar
us flag
I don't think there are packages called `containerd.io` or `docker-ce` in Ubuntu 18.04.
user535733 avatar
cn flag
Similar StackOverflow question from 2016: https://stackoverflow.com/questions/37765518/prevent-docker-engine-restart-during-apt-get-upgrade
user535733 avatar
cn flag
Take a look at [Docker Live Restore](https://docs.docker.com/config/containers/live-restore/)
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.