Commit 1a7f77f
committed
fix: workaround podman stop/rm timeout in rootless mode with --pid host
In rootless mode with --pid host (distrobox default), podman stop/rm --force
times out because "crun kill --all" fails when the container's cgroup-path
is empty.
Root cause: When using --pid host, the container shares the host's PID
namespace and crun doesn't create a dedicated cgroup. The "crun kill --all"
command relies on cgroup to find processes, but with empty cgroup-path,
no processes are found and killed.
Solution: Call "podman kill" before stop/rm, which uses "crun kill" (without
--all flag) that sends signals directly to the container's init process PID,
bypassing the cgroup lookup issue.
Fixes: #1939
See also: chimera-linux/cports#1718
Signed-off-by: xz-dev <xiangzhedev@gmail.com>1 parent 2995df5 commit 1a7f77f
2 files changed
+36
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
389 | 389 | | |
390 | 390 | | |
391 | 391 | | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
392 | 414 | | |
393 | 415 | | |
394 | 416 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
290 | 290 | | |
291 | 291 | | |
292 | 292 | | |
293 | | - | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
294 | 307 | | |
295 | 308 | | |
296 | 309 | | |
| |||
0 commit comments