Engine: `--pid container:NAME` and `--pid host` are dropped without an error
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- docker, rust
- Ambito
- backend, operating-systems
Direzione di ricerca
Start by comparing how container creation handles the --pid values container:NAME and host with the Docker behavior described here, then review #129 for the proposed namespace support and #265 for the ignored-option handling. Reproduce with the commands in the issue and inspect HostConfig.PidMode and the process lists; done means Kiri either honors these modes or clearly rejects or warns about unsupported values.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Kiri version and system
- Kiri 0.2.1 (engine 27.5.1), docker CLI 29.9.3
- macOS 27.2, Apple M4 Pro
~/.kiri/vm.json:{"cpus":6,"memory_mib":16384}
What you did
docker run -d -i --name pid-a busybox:1.37 cat
docker run -d -i --name pid-b --pid container:pid-a busybox:1.37 cat
docker run -d -i --name pid-h --pid host busybox:1.37 cat
docker inspect -f '{{.Name}} PidMode=[{{.HostConfig.PidMode}}]' pid-b pid-h
docker exec pid-b ps -o pid,comm
docker exec pid-h ps -o pid,comm
What happened
All three containers start without an error or a warning. PidMode is empty, and each container sees only its own processes:
/pid-b PidMode=[]
/pid-h PidMode=[]
PID COMMAND
1 cat
2 ps
PID COMMAND
1 cat
2 ps
What you expected instead
Docker keeps PidMode as container:<id> and host. pid-b joins the PID namespace of pid-a, so its ps also lists the cat of pid-a, and pid-h sees the processes of the VM.
If Kiri can't share namespaces yet, I'd expect the create to fail or warn rather than start a container without the setting.
Anything else
I noticed this through wrong measurements, not an error. A sidecar started with --pid container:server read /proc/1/status every 200 ms to sample a server's memory. Under Kiri it read its own shell instead, so every sample came out as 1.9 MiB, and nothing said the option had been dropped. The workaround was to copy a static busybox into the server's container and read /proc/1/status with docker exec.
Related:
- #129 proposes container PID/IPC sharing and host/private PID modes.
- #265 would refuse
--pidand other options Kiri ignores with a 400, instead of dropping them. Its description says it was found by reading the code and has no issue; this is a reproduction on a real machine.
- Lingua principale
- Rust
- Stelle
- 7.5k
- Fork
- 329
- Merge medio
- 7h 48m
- PR unite (30g)
- 105
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di libracoder/kiri
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
libracoder/kiri#364 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
libracoder/kiri#289 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 4/5 3-5 giorni Idoneità per principianti 47/100
libracoder/kiri#365 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 35/100
libracoder/kiri#362 ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 3/5 1-2 giorni Idoneità per principianti 47/100
libracoder/kiri#359 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di libracoder/kiri
Issue simili
-
benchmark-review
Difficoltà 2/5 1-3 ore Idoneità per principianti 63/100
I maintainer di solito rispondono entro 1 giorno
-
area:filesystem bug need-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 85/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
Captions panel does not offer to show an existing transcriptForse già presa @thedavidweng l’ha presa oggi. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
CapSoftware/Cap#4276 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
matrix-org/matrix-rust-sdk#7495 ·
I maintainer di solito rispondono entro 1 giorno