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

Offen
#594 5 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
39/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
docker
Bereich
devops

Rechercherichtung

The report describes the docker-ce upgrade and systemd marker behavior on Oracle Linux 9 with RHEL 9 packages, but names no source file or test. Start by locating the package scripts that set or clear needs-restart, then reproduce the listed dnf and systemctl sequence. Done means upgrading while Docker is stopped no longer leaves a marker that triggers an unnecessary restart after the service starts.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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
Vorherrschende Sprache
Dockerfile
Sterne
37
Forks
42
Ø Merge
16 Std. 53 Min.
Gemergte PRs (30 T.)
30

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus docker/packaging

Alle Issues in docker/packaging

Ähnliche Issues

Weitere Issues zu DevOps

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.