Commit eb332db
committed
fix(install): join host IPC namespace to prevent dm semaphore deadlock
Inside a container with an isolated IPC namespace (the podman/docker
default), udevd on the host cannot see the container's semaphores,
causing cryptsetup luksOpen/luksClose to deadlock on semop().
The primary fix is adding --ipc=host to the documented podman
invocations. As defense-in-depth, call setns() into /proc/1/ns/ipc
at the very start of global_init() when the process is in a different
IPC namespace than pid 1, so that devmapper's udev synchronization
works correctly even if the caller omits --ipc=host.
Signed-off-by: Andrew Dunn <andrew@dunn.dev>1 parent 0018400 commit eb332db
2 files changed
Lines changed: 21 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
| |||
1514 | 1515 | | |
1515 | 1516 | | |
1516 | 1517 | | |
| 1518 | + | |
| 1519 | + | |
| 1520 | + | |
| 1521 | + | |
| 1522 | + | |
| 1523 | + | |
| 1524 | + | |
| 1525 | + | |
| 1526 | + | |
| 1527 | + | |
| 1528 | + | |
| 1529 | + | |
| 1530 | + | |
| 1531 | + | |
| 1532 | + | |
| 1533 | + | |
| 1534 | + | |
1517 | 1535 | | |
1518 | 1536 | | |
1519 | 1537 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
| 71 | + | |
72 | 72 | | |
73 | 73 | | |
74 | 74 | | |
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
0 commit comments