| 両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン |
| linux:podman [2025/03/30 11:02] – [コンテナ内のカラーが微妙に違う...🤔ドウデモイイケドネ...😅] ともやん | linux:podman [2025/09/28 13:23] (現在) – [Error: cannot re-exec process to join the existing user namespace エラーが発生する💩🤪] ともやん |
|---|
| [[git>containers/podman/issues/9137|podman rootless causes Error: cannot re-exec process · Issue #9137 · containers/podman]]\\ | [[git>containers/podman/issues/9137|podman rootless causes Error: cannot re-exec process · Issue #9137 · containers/podman]]\\ |
| issues は閉じているが再現性はありそう...🤔\\ | issues は閉じているが再現性はありそう...🤔\\ |
| | |
| | 原因のまとめ🤔 by [[https://grok.com/|Grok]]\\ |
| | 主な原因はルートレスPodmanの仕組み(ユーザーネームスペース、cgroup v2、OCIランタイムのcrun/runc)で、以下のような要因:\\ |
| | * **pause.pidの残骸**: Podmanのルートレス実行で/run/user/$UID/libpod/tmp/pause.pidが残ると、再実行時に名前空間に参加できずエラー。 |
| | * **systemdセッションの不整合**: XDG_RUNTIME_DIRやsystemd-logindのセッションが不完全(Incusやツールボックス内のネスト実行で発生しやすい)。 |
| | * **ユーザーネームスペースの無効化**: ホストのカーネル設定(kernel.unprivileged_userns_clone=0)で無効になってる場合。 |
| | * **ネストコンテナ環境**: Incusやsystemd-nspawn内でPodmanを実行すると、ネスト設定(security.nesting)が不足。 |
| | * **仕様変更の影響**: Podman 4.9.x以降でルートレス処理が強化され、Fedora 42やUbuntu 24.04.2の組み合わせでエラーが増えた。以前の環境(例: Podman 4.3.1)では問題なかったのはこのため。 |
| | |
| | 結論: pause.pidの残骸を削除する🤔\\ |
| | <WRAP color_term> |
| | <WRAP color_command><html><pre> |
| | <font color="#0087FF"><b>$</b></font> <font color="#26A269">podman</font> info |
| | </pre></html></WRAP> |
| | <WRAP color_result><html><pre> |
| | Error: cannot re-exec process to join the existing user namespace |
| | </pre></html></WRAP> |
| | <WRAP color_command><html><pre> |
| | <font color="#0087FF"><b>$</b></font> <font color="#26A269">rm</font> /run/user/<font color="#A347BA">$</font><font color="#12488B"><b>(</b></font><font color="#26A269">id</font> <font color="#A347BA">-u</font><font color="#12488B"><b>)</b></font>/libpod/tmp/pause.pid |
| | <font color="#0087FF"><b>$</b></font> <font color="#26A269">podman</font> info |
| | </pre></html></WRAP> |
| | <WRAP color_result_hlong><html><pre> |
| | host: |
| | arch: amd64 |
| | buildahVersion: 1.41.4 |
| | cgroupControllers: |
| | - cpu |
| | - io |
| | - memory |
| | - pids |
| | cgroupManager: systemd |
| | cgroupVersion: v2 |
| | conmon: |
| | package: conmon-2.1.13-1.fc42.x86_64 |
| | path: /usr/bin/conmon |
| | version: 'conmon version 2.1.13, commit: ' |
| | cpuUtilization: |
| | idlePercent: 88.42 |
| | systemPercent: 2.59 |
| | userPercent: 8.99 |
| | </pre></html></WRAP> |
| | </WRAP> |
| | |
| | === 古い対処の経緯🤕 === |
| <WRAP color_term> | <WRAP color_term> |
| <WRAP color_command><html><pre> | <WRAP color_command><html><pre> |
| [[https://www.redhat.com/sysadmin/speeding-container-buildah|Speeding up container image builds with Buildah | Enable Sysadmin]]\\ | [[https://www.redhat.com/sysadmin/speeding-container-buildah|Speeding up container image builds with Buildah | Enable Sysadmin]]\\ |
| [[https://stackoverflow.com/questions/57776452/is-it-possible-to-map-a-user-inside-the-docker-container-to-an-outside-user|linux - Is it possible to map a user inside the docker container to an outside user? - Stack Overflow]]\\ | [[https://stackoverflow.com/questions/57776452/is-it-possible-to-map-a-user-inside-the-docker-container-to-an-outside-user|linux - Is it possible to map a user inside the docker container to an outside user? - Stack Overflow]]\\ |
| | [[https://kinsta.com/blog/dockerfile-entrypoint/|Dockerfile ENTRYPOINT: Everything You Need To Know]]\\ |
| |
| ==== 付録 ==== | ==== 付録 ==== |