Skip to content

Various containerd-shim-runhcs bug fixes/improvements#2686

Merged
crosbymichael merged 4 commits intocontainerd:masterfrom
jterry75:runhcs_improvements
Sep 28, 2018
Merged

Various containerd-shim-runhcs bug fixes/improvements#2686
crosbymichael merged 4 commits intocontainerd:masterfrom
jterry75:runhcs_improvements

Conversation

@jterry75
Copy link
Copy Markdown
Contributor

  • 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

@jterry75 jterry75 force-pushed the runhcs_improvements branch 2 times, most recently from b4b1abb to 18f7a7c Compare September 26, 2018 22:18
@codecov-io
Copy link
Copy Markdown

codecov-io commented Sep 26, 2018

Codecov Report

Merging #2686 into master will decrease coverage by 2.01%.
The diff coverage is 0%.

Impacted file tree graph

@@            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
Flag Coverage Δ
#linux 46.99% <0%> (-1.76%) ⬇️
#windows 40.15% <0%> (-1.61%) ⬇️
Impacted Files Coverage Δ
runtime/v2/shim/shim.go 0% <0%> (ø)
runtime/v2/shim/util_windows.go 0% <0%> (ø)
runtime/v2/shim/util_unix.go 0% <0%> (ø)
runtime/v2/shim/shim_unix.go 0% <0%> (ø)
runtime/v2/shim/shim_windows.go 0% <0%> (ø)
runtime/v2/shim/util.go 0% <0%> (ø)
runtime/v2/shim/shim_linux.go 0% <0%> (ø)
runtime/v2/shim/reaper_unix.go 0% <0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 75d7d6e...81eb40f. Read the comment docs.

Comment thread runtime/v2/shim/shim_test.go Outdated
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: camels in the code, no snakes

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol for test code I like it because it reads better on the cmdline. Will change it

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]>
Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Comment thread runtime/v2/shim/shim.go
return fmt.Errorf("shim namespace cannot be empty")
}
ctx := namespaces.WithNamespace(context.Background(), namespaceFlag)
ctx = context.WithValue(ctx, OptsKey{}, Opts{Debug: debugFlag})
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It only looks like this Opts is used in the tests, is this needed still?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/containerd/containerd/pull/2686/files#diff-b6be0a426cab99fb4e2d6ff6bf99fbf9R236

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good to me its easy to take out later

@crosbymichael
Copy link
Copy Markdown
Member

LGTM

@crosbymichael crosbymichael merged commit 655ba65 into containerd:master Sep 28, 2018
@jterry75 jterry75 deleted the runhcs_improvements branch September 28, 2018 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants