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

Ouverte
#594 5 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
4/5
Temps estimé
3-5 jours
Accessibilité débutants
39/100
Type d'issue
Bug
Clarté
Plutôt claire
Activité
À l'abandon
Stack technique
docker
Domaine
devops

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

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
Langage dominant
Dockerfile
Étoiles
37
Forks
42
Merge moyen
16 h 53 min
PR mergées (30 j)
30

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de docker/packaging

Toutes les issues de docker/packaging

Issues similaires

Plus d'issues DevOps

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.