-
-
Notifications
You must be signed in to change notification settings - Fork 287
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docker:// not working (well) - hangs, does not update #1183
Comments
I get the same behaviour when running
|
The following strategy enables "following" docker logs, but is less convenient ... and seems to be very prone to lnav opening / closing files (the FIFO pipe)?
|
Thanks for trying it out and giving a heads up! I had made a change after the docker/url work that caused the problem. I've pushed a quick fix to get it going again. Need to think a bit to figure out how to improve the behavior a bit more. |
Many thanks for the fantastically fast fix! Current HEAD works very well for
I can now look into doing fancier things: I like setting up local notebook infrastructure with |
@shoffmeister Should there be a |
@tstack while My experiments tend to involve some however arbitrarily named baseline One directory right now has
and that's more the rule than the exception. I just successfully tried
While this is not what Not implementing And, after all that, someone will come up with a request to "hey, version: "2"
services:
s1:
image: bash
command: bash -c 'while true; do sleep 1; echo "$(date -Ins) INFO s1"; done'
s2:
image: bash
command: bash -c 'while true; do sleep 1; echo "$(date -Ins) INFO s2"; done'
s3:
image: bash
command: bash -c 'for i in {1..5}; do sleep 1; echo "$(date -Ins) WARN s3"; done; exit 99' |
I've pushed a change that adds some initial support for docker compose. If you use
That will tail all of the service logs separately, so the LOG (or TEXT) view will show the messages associated with a particular container. Note that the I don't really use docker much, so I'm not sure how useful this is. Let me know if you have time to try it out and if there are gaps. Thanks |
@tstack Interesting! I gave the "compose" support a whirl with my local stacks and noticed a few things: a) does not accept "---" at the top of a YAML document - but docker compose does; presence of
Generally, IIRC, docker supports multi-document YAML files, i.e. more than one YAML document in a single file. b) "compose" implementation is too general; in 38e5fa5#diff-8b93f0d06f87b27b049e1357526684516a8ee4382042b4051916ae155f132918R18 very generic support for the "compose" feature is added. This implementation assumes that on a user's system the following works
Alas ...
All this applies, IIRC, to both Linux and Windows. It's a mess. Having tried compose support in lnav, I recognize this as quite user-friendly. I am torn. 🤷♂️ c) compose support is not cumulative, does not aggregate, i.e. Repro yaml for item a) ---
version: "2"
services:
s1:
image: bash
command: bash -c 'while true; do sleep 1; echo "$(date -Ins) INFO s1"; done'
s2:
image: bash
command: bash -c 'while true; do sleep 1; echo "$(date -Ins) INFO s2"; done'
s3:
image: bash
command: bash -c 'for i in {1..5}; do sleep 1; echo "$(date -Ins) WARN s3"; done; exit 99' |
Also, use `docker-compose` instead of `docker compose` Related to #1183
I've pushed a change that tries to address this.
Hmm, I'm not able to reproduce this, but I'm not sure I'm doing the right thing either. Is the Thanks for the detailed response! |
You mean the support added only 4 days ago in version v2.21.0 (Support for multi-document YAML files (compose-spec/compose-go#451)) |
Hmm, I have habitually putting Now, true multi-document support - yeah, my memory is ... blurred? ... from all those stacks. Historically, I have been assembling these through multiple |
@tstack Sorry for the long delay in getting back on the "compose not cumulative" issue that I reported above! It would seem as if there is a different problem: lnav simply errors out on the first docker compose file with
And it is really the content of the compose file which is responsible: debug.zip To reproduce, simply run the latest CI build with Note that the file is already trimmed down; the original size is 6 KB. |
FWIW, I am on a "modern" Docker installation; because of that, I do not have To get
|
Also, use `docker-compose` instead of `docker compose` Related to tstack#1183
lnav version
Downloaded musl binary from CI (https://github.com/tstack/lnav/actions/workflows/bins.yml) at eda33d6 (a couple of minutes ago)
Describe the bug
lnav hangs dead upon starting with a
docker://
URL. Ctrl+C "unlocks" something, but then no further updates take place.To Reproduce
Terminal 1:
Terminal 2:
//exp: lnav immediately shows the output from docker (stdout)
//act: lnav hangs dead
Press Ctrl+C - and lnav updates log content, but only once. It is possible to navigate in those logs.
Press Ctrl+C again - and lnav terminates
My eventual goal is to have the equivalent of
and
working. Right now, that seems to offer additional challenges.
System is Fedora Linux 38 (inside a virtual machine). With the bare metal file logs (running
lnav
), everything works fine.The text was updated successfully, but these errors were encountered: