Various containerd-shim-runhcs bug fixes/improvements#2686
Various containerd-shim-runhcs bug fixes/improvements#2686crosbymichael merged 4 commits intocontainerd:masterfrom
Conversation
jterry75
commented
Sep 26, 2018
- Forward containerd debug to shim invocation
- Fixes containerd-shim-runhcs Delete on exec id
- Fixes containerd-shim-runhcs State on exec id
- Adds containerd-shim-runhcs verbose logging support
b4b1abb to
18f7a7c
Compare
Codecov Report
@@ Coverage Diff @@
## master #2686 +/- ##
==========================================
- Coverage 45% 42.99% -2.02%
==========================================
Files 92 100 +8
Lines 10114 10588 +474
==========================================
Hits 4552 4552
- Misses 4842 5316 +474
Partials 720 720
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
nit: camels in the code, no snakes
There was a problem hiding this comment.
Lol for test code I like it because it reads better on the cmdline. Will change it
Signed-off-by: Justin Terry (VM) <[email protected]>
Signed-off-by: Justin Terry (VM) <[email protected]>
Signed-off-by: Justin Terry (VM) <[email protected]>
Revendors to Microsoft/hcsshim v0.7.5 that added support for logging all runhcs.exe commands via Windows named pipes. This now launches all runhcs.exe commands and forwards debug logging to the containerd-shim-runhcs log when with --debug. Signed-off-by: Justin Terry (VM) <[email protected]>
18f7a7c to
81eb40f
Compare
| return fmt.Errorf("shim namespace cannot be empty") | ||
| } | ||
| ctx := namespaces.WithNamespace(context.Background(), namespaceFlag) | ||
| ctx = context.WithValue(ctx, OptsKey{}, Opts{Debug: debugFlag}) |
There was a problem hiding this comment.
It only looks like this Opts is used in the tests, is this needed still?
There was a problem hiding this comment.
It is used in the StartShim command. I was actually surprised this wasn't already plumbed but it seems that if a --debug is sent to a <shim>.exe --debug start command the re-invoke will drop the --debug because it has no debug context. So this forwards the debug context to the StartShim so that the shim implementation can adhere to it. I did not fix it for the runc shim though.
There was a problem hiding this comment.
Ok. This feels a little out of place right now, but lets continue and develop out the tracing feature and see where this ends up.
There was a problem hiding this comment.
Sounds good to me its easy to take out later
|
LGTM |