krun with TSI networking fails in IPv4 only environment

Aperta
#2,333 3 commenti 0 reazioni 0 assegnatari Vedi su GitHub

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
18/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
c
Ambito
networking

Direzione di ricerca

The payload names no source files, so start by reproducing the report: run the four podman --runtime krun run ... alpine wget www.google.com commands and compare the address wget picks with and without --network=pasta:-4. The thread points to TSI address-family selection, a topic that needs networking background and the maintainers' input. Done means outbound lookups in an IPv4-only environment resolve to IPv4 without the -4 workaround, and the maintainers have agreed where the fix belongs.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

I've been trying to use krun to run some containers that need outbound network connectivity, and since the passt mode isn't working right now due to #2283 I've been trying to get it working with TSI which I couldn't get working before, but I'm not having much luck with this either. The main issue seems to be IPv6 related, when I try to run something inside a container that connects outbound it almost always tries to connect with a v6 address despite me not being on a dual stack network, by way of comparison doing the same thing on the host resolves to a v4 address.

Specific test examples:

$ podman --runtime krun run -it --rm docker.io/library/alpine wget www.google.com
Connecting to www.google.com ([ipv6 address])
wget: can't connect to remote host: Connection refused
$ podman --runtime krun run -it --rm --network=podman docker.io/library/alpine wget www.google.com
Connecting to www.google.com (ipv4 address)
saving to 'index.html' (etc)
$ podman --runtime krun run -it --rm --network=pasta docker.io/library/alpine wget www.google.com
Connecting to www.google.com ([ipv6 address])
wget: can't connect to remote host: Connection refused
$ podman --runtime krun run -it --rm --network=pasta:-4 docker.io/library/alpine wget www.google.com
Connecting to www.google.com (ipv4 address)
saving to 'index.html' (etc)

As a side note, ping fails, presumably because it's running at a lower level that TSI isn't intercepting, which complicates testing a bit (hence the use of wget)

This results in difficult to diagnose failures, ideally TSI should replicate the host behaviour and transparently connect to v4 in the same way without requiring a workaround.

Lingua principale
C
Stelle
4.2k
Fork
476
Merge medio
1g 10h
PR unite (30g)
55

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di containers/crun

Tutte le issue di containers/crun

Issue simili

Altre issue su C

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.