allow for optional started channel to receive runc pid#69
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #69 +/- ##
==========================================
+ Coverage 19.17% 20.54% +1.37%
==========================================
Files 7 7
Lines 579 589 +10
==========================================
+ Hits 111 121 +10
Misses 432 432
Partials 36 36
Continue to review full report at Codecov.
|
Member
AkihiroSuda
reviewed
Oct 20, 2020
| Started: started, | ||
| }) | ||
| if err == nil { | ||
| t.Fatal("Expected error from Exec, but got nil") |
Contributor
Author
There was a problem hiding this comment.
Whoops, thanks. Fixed.
Signed-off-by: Cory Bennett <cbennett@netflix.com>
AkihiroSuda
approved these changes
Oct 20, 2020
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.
We need to be able to send signals to the runc process (not the processes running under runc), and the Monitor currently does not allow for us to learn the pid in order to signal. This PR adds an optional
Started chan<- intto theCreateOptsandExecOptsto allow for us to receive the pid just after the runc process has started.The use-case for sending signals directly to the runc process is that we need to send a
SIGWINCHfor resize events when using externally managed pty pair (not using ConsoleSocket). The current hacky work-around is to usePidFile, which will populate the pid of the runc init or exec process which we can then use to parse/proc/$pid/statusto find the parent-pid (ie the runc process).More context: moby/buildkit#1731 (comment)
cc @tonistiigi