-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
podman logs --follow, k8s-file, misses a log #17286
Comments
@Luap99 mind taking a look? You turned out to be the "Trüffelschwein" of finding subtle bugs in the log code. |
I suspect it is a timing issue in CI, logs in general gives no guarantees about timing when they are written. |
I can reproduce locally, and in the process discovered that the flake is correlated with this server output:
I'm reworking the test logic anyway, making it (sigh) sloppier in hopes of eliminating the flake, but I think this is an interesting clue. |
...in hopes of fixing a flake with podman-remote. It's still possible that there's a real problem with logs under remote, and this will just sweep that under the rug. Also, fix a nasty-red test warning (add cleanup), refactor uses of $(pause_image), and improve a few test assertions. Closes: containers#17286 Signed-off-by: Ed Santiago <[email protected]>
Seen just now, in a PR based on a recent main. root debian. Reopening. |
Removing the |
Thinking out loud after a long day (usually not a good idea). But: #15321 was reporting "missing log lines" as one of its symptoms; the "channel 123 found" error was drowning out any useful info. But "channel 123", in podman-remote, appears to mean "container not found". Is it possible that a container gets removed right in the middle of another process running |
Is this the same bug? f37 rootless and
|
I guess these are just timing issues in the test, can we make run_podman print the timing when the commands are executed, i.e. |
That would really clutter up the logs ... but maybe I can use logformatter to help. I'll look into it. |
I was think just adding the timestamp here: podman/test/system/helpers.bash Line 200 in e2d1ad1
Would that there really clutter logs? |
Sample from my proof-of-concept:
|
That is consistent with the most recent failure:
Submitted #18752 as possible fix |
I don't think #18752 fixes the flake. Testing how
Obviously 1 second is only rounded up to one second which means if we make the date call at 0.9 second then there is only a 0.1 second window for podman to output the logs because --until means we exit at that given time and stop reading more. I think this is racy because I coded it in two different go routines (one that writes logs and one that waits for until then stops the log reader). I think I can fix that in the actual code but it may not be trivial. Maybe change the test to do: |
Also note that this applies for the one specific test, the |
Would this help? ..._log_test_until()
...
- after=$(date --date='+1 second' --iso-8601=seconds)
+ after=$(date --date='+1 second' --iso-8601=ns) Seems to work, although I can't tell if it does the right thing internally. |
I think this is fine. |
I'm suspecting a test bug (because of the
sleep
), not an actual podman bug, but will figure it out later.The text was updated successfully, but these errors were encountered: