cockpit-project / console.dot

Webconsole Cloud Service
2 stars 3 forks source link

appservice: Cache session pod IP addresses #51

Closed martinpitt closed 2 years ago

martinpitt commented 2 years ago

With this, make check succeeds for me 4 out of 5 times. Before, it failed 3 out of 4 times. I still get the occasional loooooong timeout on socket.gethostbyname(), but it's so much better now.

martinpitt commented 2 years ago

This doesn't yet work on k8s, the DNS name isn't available immediately:

  File "/usr/local/bin/multiplexer.py", line 139, in handle_session_new
    addr = socket.gethostbyname(session_hostname)
socket.gaierror: [Errno -2] Name or service not known

So this needs a retry loop.

martinpitt commented 2 years ago

I tested this with k8s now, and it works fine. I like this failure mode a lot more now!

martinpitt commented 2 years ago

@jelly : I filed the podman bug and for now I'll stop trying to work around this. For k8s this is still a positive change IMHO, so I cleaned up the commit messages and am re-asking for review. Sorry for the back and forth!