Avoid stdout on all provisioners (except main)#2174
Merged
tomjn merged 5 commits intoVarying-Vagrant-Vagrants:developfrom Jun 4, 2020
Merged
Avoid stdout on all provisioners (except main)#2174tomjn merged 5 commits intoVarying-Vagrant-Vagrants:developfrom
tomjn merged 5 commits intoVarying-Vagrant-Vagrants:developfrom
Conversation
|
Thanks for opening this pull request! Make sure
|
Member
|
I'll test this later today, do you have any links for research on the |
Member
Author
|
Added link to the PR description. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is an attempt to fix #2173 and also clarify a bit of the process to pipe data to a file.
While researching this, i noticed there's a bug in the current implementation which is kind of a pain in the ass to fix, but was not introduced by my refactor.
This basically is a concurrency issue with tee. The way it currently works is that each output (stdout and stderr) are piped to FIFO queues, which is later fed to tee. The script only waits for the queue to be written, but not until tee finishes writing (appending actually) to the file. This is the reason that in some cases the log lines might be out of order, or in a weird situation. Link to an explanation of this here.
I've tried addressing this, but didn't have time to fully fix this, and I think this may be a bit out of the scope of the issue i'm trying to fix (yet it's an issue with the tee piping technique implemented)
After research, the code before my refactor behaved the same as it did before this PR. This PR effectively behaves like @tomjn suggested it should.