Skip to content
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

logs are not being flushed to run.out #497

Open
nonsense opened this issue Feb 7, 2020 · 2 comments · Fixed by #518
Open

logs are not being flushed to run.out #497

nonsense opened this issue Feb 7, 2020 · 2 comments · Fixed by #518
Assignees
Labels
kind/bug Kind: Bug P2 P2: Should be fixed.

Comments

@nonsense
Copy link
Member

nonsense commented Feb 7, 2020

It appears that logs are not flushed when we write to stdout - if we run a test plan on cluster:k8s we see output in stdout for given test instances via kubectl logs, but those logs do not appear immediately in run.out on the S3 bucket.


There are two parts to this:

  1. flushing on s3bucket daemon (which runs s3fs)
  2. flushing within the testground codebase
@nonsense nonsense added the bug label Feb 7, 2020
@nonsense nonsense added this to the Testground v0.2 milestone Feb 7, 2020
@raulk
Copy link
Contributor

raulk commented Feb 11, 2020

We're likely missing a call to https://godoc.org/go.uber.org/zap#Logger.Sync when the instance shuts down. This should be solved by calling re.logger.SLogger().Sync() from inside RunEnv#Close().

@raulk raulk self-assigned this Feb 11, 2020
@nonsense nonsense reopened this Feb 13, 2020
@nonsense
Copy link
Member Author

This is not just about flushing at the end of the test. We should flush periodically or after every call to the logger, because if a test deadlocks, we want to be able to get the last emitted logs, even if the buffer is not full.

@raulk raulk modified the milestones: Testground v0.2, Testground v0.3 Mar 3, 2020
@github-actions github-actions bot removed the bug label Mar 3, 2020
@Robmat05 Robmat05 added the kind/bug Kind: Bug label Mar 16, 2020
@raulk raulk added the P2 P2: Should be fixed. label May 5, 2020
@raulk raulk modified the milestones: Testground v0.5, Testground v0.6 May 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Kind: Bug P2 P2: Should be fixed.
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

3 participants