Debug logs for port bindings when Docker deploy image fails #761
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.
Debug logs for port bindings when Docker deploy image fails.
This is spawning from
bind: address already in use
failures we were seeing in CI and will hopefully give a better picture of what's happening.Example
bind: address already in use
error:Example logs that this PR will output
What's the root cause?
I suspect that we might be running into bugs with the Docker port allocation code since Complement is creating the images in parallel (I think).
Compounding the problem might be that we're exposing many more ports than usual in the out-of-repo Complement image that we're using and Complement is using
PublishAllPorts: true
when deploying the image which will take all of our exposed ports and make port bindings to the host for each.Bugs in this part of Docker is not uncommon, just search for
"address already in use"
in the Docker codebase. For example, moby/moby#48274 has some smoke.The first layer of parallelism that we can control is multiple images within a single deploy which I think we can add a mutex around things to control.
Multiple test packages running in parallel (controlled by
-p n
) is a good second factor that is probably harder to figure out.Pull Request Checklist
Signed-off-by: Eric Eastwood [email protected]