Giter Site home page Giter Site logo

Comments (9)

marten-seemann avatar marten-seemann commented on August 20, 2024

It looks like it's not possible to trap signals when using the --abort-on-container-exit option in docker-compose. I opened docker/compose#7652.

from quic-interop-runner.

nibanks avatar nibanks commented on August 20, 2024

With @larseggert's help we've been able to push an updated MsQuic Docker image that supports streaming, but it still has issues. There seems to be a race condition where the server is shutdown before all the logs flush to disk. Perhaps, as a temporary stop-gap solution you add a sleep for a second or two before killing the server?

from quic-interop-runner.

marten-seemann avatar marten-seemann commented on August 20, 2024

Perhaps, as a temporary stop-gap solution you add a sleep for a second or two before killing the server?

That would be a workaround, but not an easy one. —abort-on-container-exit doesn’t allow you to do anything like that, so we’d have to start and stop the containers manually. I really hope that someone will pick up my docker-compose issue, otherwise we’ll have no choice but to actually implement that workaround.

from quic-interop-runner.

marten-seemann avatar marten-seemann commented on August 20, 2024

Nobody picked up the issue in more than a week. Time to implement the workaround! 👎

from quic-interop-runner.

marten-seemann avatar marten-seemann commented on August 20, 2024

After playing around with this for a while, it seems like the problem is the following: We need to run a subprocess.run for every container (simulator, server and client). I haven't figured this part out yet, we might need to use the threading package to run them in parallel.
The problem is that we want to access the logs here. People log to stdout, and we need to capture that. What's more, we need to aggregate the logs of the three containers into one file such that the lines appear in the right order. subprocess.run only allows us to get the logs after the container has returned, so there's no way to restore the ordering of logs between the containers.

According to the documentation it's only possible to pass a physical file to the stdout argument of that function. I'm not sure how anyone could think that this is a sane way to design an API, why not use an interface there, so users can use their own implementation of that interface? While I could create a temporary file on disk to pass into that function, and then read that file into memory after the commands have returned, this doesn't allow me to prefix every line with [client] or [server].

@jlaine, can we ask for your wisdom here? I'm sure there must be better way in Python to do this...

from quic-interop-runner.

nibanks avatar nibanks commented on August 20, 2024

We have some streaming stuff enabled, but it doesn't work very well because it seems to be timer based, so much of the time we end up losing much of the end of our logs (where the relevant errors end up being). I'd really be appreciated if we could get this feature in!

from quic-interop-runner.

nibanks avatar nibanks commented on August 20, 2024

Any updates? I'd really like to get consistent logging for msquic working, but can't do it without this.

from quic-interop-runner.

anrossi avatar anrossi commented on August 20, 2024

Is it possible to make progress on this issue? Or is it blocked completely on the docker-compose issue/Python submodule API? MsQuic logging is still largely missing in interop runner failure cases due to this, which hurts our ability to diagnose and improve interop.
If there's no possible way forward, feel free close this issue.

from quic-interop-runner.

marten-seemann avatar marten-seemann commented on August 20, 2024

There's code for that in this branch: https://github.com/marten-seemann/quic-interop-runner/tree/separate-docker-compose-runs
For some reason it makes the interop runs very flaky though. Unfortunately, I won't have to time figure out what's going on there, but maybe you can make sense of this?

from quic-interop-runner.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.