testcontainers / testcontainers/testcontainers-java

DockerClientConfigUtils#getDefaultGateway() is failing with syslog driver

Aperta
#879 5 commenti 2 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

resolution/acknowledged type/bug type/feature
Lingua principale
Java
Stelle
8.7k
Fork
1.9k
Merge medio
2g 17h
PR unite (30g)
9

Descrizione

Hello guys,

I'm trying to use testcontainers-java (which I like a lot) and I can't make it work in my CI infrastructure.
The reason of the failure is because I'm running my tests inside docker and the docker logging driver is configured to syslog.

For what I understood, this code is trying to read the log to get the output of a command to get the gateway ip and it's failing because getting the log is not supported by syslog.
Therefore the gateway ip address can not be determined and the library can not properly manage containers.

I'm getting the following error in the logs of my build:

10:11:34.252 [tc-okhttp-stream-247575268] ERROR com.github.dockerjava.core.async.ResultCallbackTemplate - Error during callback
com.github.dockerjava.api.exception.InternalServerErrorException: {"message":"configured logging reader does not support reading"}

It looks like an issue to me as the library can not be used with such configuration. I'd like to have your thoughts on that and eventually know if there could be any workaround I could use.

Thank in advance !

Guida per i contributori

Apri la guida per i contributori

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.

Direzione di ricerca

Inizia in core/src/main/java/org/testcontainers/dockerclient/DockerClientConfigUtils.java, in getDefaultGateway(), quindi riproduci il malfunzionamento con il syslog logging driver di Docker. Traccia come vengono ottenuti l'output del comando e la gateway IP, e verifica che Testcontainers riesca a determinare il gateway senza l'errore di logging-reader non supportato.

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

Valutazione

Stack tecnologico
docker, java
Ambito
devops, testing
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.