fix(vaccel): don't ignore vsock environment setup errors in Exec
I maintainer di solito rispondono entro 2 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 85/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- infrastructure, networking
Direzione di ricerca
Inizia da Exec() in pkg/unikontainers/unikontainers.go:653-656 e leggi prepareVSockEnvironment() in pkg/unikontainers/vaccel.go:111-131 per vedere come vengono restituiti gli errori di configurazione. Il lavoro è completato quando un errore di configurazione interrompe l’avvio del container con un errore chiaro, invece di essere registrato e ignorato.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
In Exec(), the error returned by prepareVSockEnvironment() is only logged at Debug level and execution continues. vAccel stays enabled (vmmArgs.VAccelType = "vsock"), so the monitor is still launched with vsock devices/sockets that were never set up in the monitor rootfs.
Related to #698 / #699, which fixed the same Debug-only logging for the resolveVAccelConfig() call a few lines above, but not for prepareVSockEnvironment().
Location
pkg/unikontainers/unikontainers.go:653-656
vaccelDevices, err := prepareVSockEnvironment(rootfsParams.MonRootfs, u.State.Annotations[annotHypervisor], vsockSocketPath)
if err != nil {
uniklog.Debugf("failed to prepare get required vsock devices: %v", err)
}
Current behavior
prepareVSockEnvironment() (pkg/unikontainers/vaccel.go:111-131) returns an error when /dev/vsock or /dev/vhost-vsock is missing on the host (e.g. vhost_vsock not loaded), or when the Firecracker socket bind mount fails. In that case:
- The error is only visible at debug log level, and the message has a typo ("prepare get required").
vaccelDevicesisnil, sosetupDevices()has nothing to create and returnsnil.vmmArgs.VAccelTypeis still set to"vsock", so the monitor receives-device vhost-vsock-pci(QEMU), avsockconfig entry (Firecracker) or--vsock(Cloud Hypervisor) for devices that do not exist in its rootfs.
The container start then fails later inside the monitor (e.g. QEMU cannot open the vhost device) with an error that does not mention the real cause, which is only visible at debug log level.
Expected behavior
If vAccel was requested and validated, a failure to prepare its vsock environment should abort the container start with a clear error, e.g.:
failed to prepare vAccel vsock environment: could not get host device /dev/vhost-vsock: no such file or directory
Steps to reproduce
- Use a host where
/dev/vhost-vsockis missing (modprobe -r vhost_vsock). - Run a QEMU-based unikernel with the annotations
com.urunc.unikernel.vAccel=vsockandcom.urunc.unikernel.RPCAddress=vsock://2:2048. - At the default
infolog level nothing mentions the missing device; the start fails later inside QEMU with an unrelated-looking error.
Proposed fix
Return the error instead of logging it at Debug, and fix the message:
if err != nil {
return fmt.Errorf("failed to prepare vAccel vsock environment: %w", err)
}
If you would rather continue without vAccel in this case, the alternative is to Warn and skip setting VAccelType, VSockDevPath and VSockDevID. Happy to go with whichever you prefer.
I'd like to work on this.
- Lingua principale
- Go
- Stelle
- 308
- Fork
- 222
- Merge medio
- 2g 12h
- PR unite (30g)
- 42
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
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 urunc-dev/urunc
-
Containers handed over to runc cannot be started, killed or deleted when urunc runs without --rootForse di nuovo libera @Daksha1611 l’ha presa 16 giorni fa e non c’è nessuna pull request aperta. Apertabug enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
urunc-dev/urunc#1127 · 4 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
urunc-deploy cleanup never labels the node, so the cleanup DaemonSet does not runForse già presa @Sarthak-Shreshtha01 l’ha presa 18 giorni fa. Apertabug K8s/Tools
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 2 giorni
-
FreeBSD: docs update and rootfs detectionForse già presa @yug105 l’ha presa 13 giorni fa. Apertadocumentation enhancement Storage
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
urunc-dev/urunc#1108 · 6 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Rumprun guests receive &, < and > as \u0026, \u003c and \u003eForse già presa @Sarthak-Shreshtha01 l’ha presa 24 giorni fa. Apertabug Guests
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
urunc-dev/urunc#1074 · 4 commenti ·
I maintainer di solito rispondono entro 2 giorni
-
Flag to keep pulled images on local runs of e2eForse già presa @slash-init l’ha presa 24 giorni fa. Apertadev
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
urunc-dev/urunc#1057 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di urunc-dev/urunc
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
I maintainer di solito rispondono entro 1 giorno
-
cmd/ebitenmobile: multi-language bindings run the complete generator twiceForse già presa @kumagi l’ha presa oggi. Apertaos:macos performance
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
hajimehoshi/ebiten#4011 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
agent-butler-finding chore
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
jordansmall/spindrift#6318 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
Eyevinn/moqlivemock#166 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
JakeChampion/lang#14091 ·
I maintainer di solito rispondono entro 1 giorno