tech:pb_podman_-_podman_system_migrate
Ceci est une ancienne révision du document !
Table des matières
Pb podman - podman system migrate
Voir sur RedHat :
- Paquet
setup(/etc/subuidet/etc/subgid)
Notes :
podman system migratecan be used to stop both the running containers and the pause process…
Erreur
potentially insufficient UIDs or GIDs available in user namespace
ou encore, suite à une mise à jour de Podman
ERRO[0000] invalid internal status, try resetting the pause process with "/usr/bin/podman system migrate": could not find any running process: no such process
Étapes à suivre pour reproduire
Remise à l'état initial
# egrep " setup-" /var/log/dnf.rpm.log |grep Upgraded | tail -1 2023-09-27T17:52:38+0200 SUBDEBUG Upgraded: setup-2.12.2-5.el8.noarch
yum install -y setup-2.12.2-5.el8.noarch
# sudo -u awx -i podman ps ; echo $? CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 0
sudo -u awx -i podman system migrate
Un faut lancer au moins un container
sudo -u awx -i podman run -d monimage:latest sleep inf
Reproduction
yum install setup
sudo -u awx -i podman ps
Pas d'erreur, car nous n'avons pas encore faite de reboot
Redémarrons
reboot
$ sudo -u awx -i podman ps ; echo $? ERRO[0000] invalid internal status, try resetting the pause process with "podman system migrate": could not find any running process: no such process 1
Solution
sudo -u awx -i podman system migrate
Script palliatif
Maintenance palliative - script pour automatiser la commande podman system migrate quand cela est nécessaire. Cela évite les indisponibilité de podman en cas de reboot.
- autofix_podman_system_migrate.sh
#! /bin/bash # QUI: Script écrit par JB. Il doit être lancé avec le(s) compte(s) utilisateur(s) exécutant des containers podman. # QUOI: Voir le ticket #03618727 # POURQUOI: Bug indispo podman après reboot si certains paquets tels que podman, setup... ont été mis à jour. # QUAND: Script lancé au boot # COMMENT: Avec une crontab tel que : # '@reboot /var/lib/awx/scripts/autofix_podman_system_migrate.sh' # ou si cron root '@reboot sudo -u awx -i /var/lib/awx/scripts/autofix_podman_system_migrate.sh' # ou encore avec SystemD if podman ps 2>&1 | grep -q 'podman system migrate' then podman system migrate # Fix containers still in Stopping state if [[ "$USER" == 'awx' ]] then sleep 1 podman rm -f "$(podman ps -a | grep -v 'seconds' | awk '/Stopping/ {print $1}')" 2>/dev/null || true fi fi
- autofix_podman_system_migrate.service
[Unit] Description=Autofix podman system migrate [Service] Type=oneshot ExecStart=/bin/bash /var/lib/awx/scripts/autofix_podman_system_migrate.sh RemainAfterExit=yes User=awx [Install] WantedBy=receptor.service
Autres
- name: Ensure changes are applied to podman command: podman system migrate environment: XDG_RUNTIME_DIR: "{{ podman_tmp.path }}"
tech/pb_podman_-_podman_system_migrate.1742825205.txt.gz · Dernière modification : de 127.0.0.1
