Outils pour utilisateurs

Outils du site


blog

Pb podman - podman system migrate

Voir sur RedHat :

Notes :

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 }}"
2025/03/24 15:06

Pb podman - image is in use by a container

$ podman images | grep '<none>'
<none>                                                                           <none>      38808a9199c1  2 months ago   294 MB
<none>                                                                           <none>      e5bb0bda807d  3 months ago   371 MB

$ podman ps -a
CONTAINER ID  IMAGE       COMMAND     CREATED     STATUS      PORTS       NAMES

$ podman rmi 38808a9199c1
Error: image used by af0c32ff54054be71254ea980c9181dba8068ecac9e9e69b7190479602eb9721: image is in use by a container: consider listing external containers $
nd force-removing image

$ podman ps -a --storage | grep af0c3
af0c32ff5405  docker.io/library/259c91e8558f1ecb99392f6bc7ef9ea5320179b1e35b1c7c3101818f2547a453-tmp:latest  buildah     2 months ago  Storage
  38808a9199c1-working-container

Solution

podman ps -a --storage
# ou
podman ps -a --external
buildah rm --all

ou encore

podman rmi 38808a9199c1 -f

Profitons-en pour faire un peu de nettoyage

podman image prune

Ou encore

podman system prune 
2025/03/24 15:06

Pb plus de son quand on passe en console TTY

Solution 1

Mais c'est pas la bonne solution http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/WhatIsWrongWithSystemWide/

W: [pulseaudio] main.c: Le démon s'exécute en mode système, mais --disallow-exit n'est pas défini.
W: [pulseaudio] main.c: Le démon s'exécute en mode système, mais --disallow-module-loading n'est pas défini.
N: [pulseaudio] main.c: Le démon s'exécute en mode système, désactivation forcée du mode SHM.
N: [pulseaudio] main.c: Le démon s'exécute en mode système, désactivation forcée de la fermeture après délai d'inactivité.
W: [pulseaudio] main.c: Vous exécutez PA dans un mode système. Sachez que vous ne devriez pas faire cela.
W: [pulseaudio] main.c: Si vous choisissez malgré tout de le faire, vous êtes responsable de tout dysfonctionnement inattendu.
W: [pulseaudio] main.c: Veuillez lire http://pulseaudio.org/wiki/WhatIsWrongWithSystemMode pour comprendre pourquoi le mode système est généralement une mauvaise idée.

Voir http://www.freedesktop.org/wiki/Software/PulseAudio/Documentation/User/SystemWide/

/etc/pulse/daemon.conf

system-instance = yes
sudo usermod -aG pulse,pulse-access mpd
sudo usermod -aG pulse,pulse-access your-login

La modif sera effective au prochain redémarrage

FIXME Comment redémarrer PulseAudio !?

Solution 2

FIXME A vérifier N'est-ce pas le mode deamon qui fait que ça marche !

http://askubuntu.com/questions/544925/failed-to-open-audio-output-error-when-trying-to-send-audio-from-mpd-to-pulsea/549128#549128

~/.pulse/client.conf

autospawn=yes

Puis dans le TTY

pulseaudio --start

La session doit être ouverte avec le même compte en TTY que sur l'interface graphique (su et sudo ne marche pas, pourquoi ?)

2025/03/24 15:06

Pb PHP Warning: PHP Startup: Unable to load dynamic library

su - apache
cd /var/www/plop
php symfony cc
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/php_mapscript.so' - libhdf5.so.6: cannot open shared object file: No such file or directory in Unknown on line 0

On test en changeant le LD_LIBRARY_PATH

export LD_LIBRARY_PATH=/usr/lib64/mpich/lib/
php symfony cc

Ça marche !

Voir aussi

env LD_LIBRARY_PATH=/run/current-system/sw/lib:$LD_LIBRARY_PATH
Rendre la manip permanante

Pour ne pas a avoir à exporter systématiquement LD_LIBRARY_PATH

/etc/ld.so.conf.d/mpich-x86_64.conf

/usr/lib64/mpich/lib
ldconfig

Autres

ldconfig en lecture seule (pas besion de compte root)

/sbin/ldconfig -NXv |grep mpich
2025/03/24 15:06

Pb pas d'historique en console pour certains shells

ou pas d'historique en ligne de commande

Un exemple de la console ocaml

Source : http://stackoverflow.com/questions/11757239/how-to-repeat-last-command-in-ocaml-interpreter-shell

Avec la console (ici exemple avec ocaml) pas d'historique.

La flèche du haut me donne les caractères suivants :

$ ocaml
^[[A

La fléche du bas :

^[[B

Solution avec rlwrap (GNU Readline)

sudo apt-get install rlwrap
rlwrap ocaml

Ça marche aussi avec Netcat

rlwrap nc smtp.acme.com 25
2025/03/24 15:06
blog.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki