Release lock of docker compose file if possible#13111
Merged
jsoriano merged 2 commits intoelastic:masterfrom Jul 31, 2019
Merged
Release lock of docker compose file if possible#13111jsoriano merged 2 commits intoelastic:masterfrom
jsoriano merged 2 commits intoelastic:masterfrom
Conversation
Write pid of process holding the lock in the lock file so it can be used to check if the lock is stalled by a process that is not alive anymore. This can happen if the test is interrupted while building and starting an container with docker-compose and it can lead to obscure timeouts.
exekias
approved these changes
Jul 31, 2019
| logp.Info("docker-compose.yml is locked, waiting") | ||
| infoShown = true | ||
| if acquireLock(c.LockFile()) { | ||
| if infoShown { |
Contributor
There was a problem hiding this comment.
not related to this PR, but I wonder if Debug would be better?
Member
Author
There was a problem hiding this comment.
After we added the conditions to print these messages only once I think that it is ok at the info level, so it informs that it couldn't continue because the lock is held, and then it informs when it can take it.
But it could be fine at the debug level too, yes.
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.
Write pid of process holding the lock in the lock file so it can be used
to check if the lock is stalled by a process that is not alive anymore.
This can happen if the test is interrupted while building and starting
an container with docker-compose and it can lead to obscure timeouts.
Related to #7957, #12909.