docker / docker/docker-ce-packaging

upgrading docker-ce while the service is stopped leads to delayed/surprise service restart

Open
#1,295 5 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Makefile
Stars
209
Forks
164
Avg merge
2h 24m
Merged PRs (30d)
4

Description

we just recently discovered that if you upgrade the docker-ce package (at least on oracle9 with the rhel9 packages) while the docker service is stopped, then the docker service will be still marked as needs-restart after the upgrade
that is not neccessary as when the service will be started after the package upgrade, it will be running the new version, so there is no need for another restart

but because of the lingering mark, the next (random) execution of systemctl reload-or-restart --marked will trigger a restart on the docker service which is surprising to say the least.

here are the steps you can use to reproduce the issue:

dnf install docker-ce-29.1.5-1.el9
systemctl enable --now docker
systemctl stop docker docker.socket
dnf install docker-ce-29.2.0-1.el9
systemctl start docker
systemctl show docker --property=Markers
systemctl reload-or-restart --marked

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the listed dnf and systemctl sequence, starting with the docker-ce upgrade and service lifecycle commands. Inspect how the package upgrade leaves the docker service marked for restart; done means starting the stopped service after upgrade clears that state and systemctl reload-or-restart --marked does not trigger a surprise restart.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, linux
Domain
build-system, devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.