Skip to content

Add support for containerd shim activation's within the same folder not in PATH#2960

Merged
crosbymichael merged 2 commits intocontainerd:masterfrom
jterry75:shim_windows_lookpath
Jan 28, 2019
Merged

Add support for containerd shim activation's within the same folder not in PATH#2960
crosbymichael merged 2 commits intocontainerd:masterfrom
jterry75:shim_windows_lookpath

Conversation

@jterry75
Copy link
Copy Markdown
Contributor

Adds fallback support for exec.LookPath which will not find the executable next to containerd.exe if containerd.exe was started from a different folder than where it is currently running. This fix will use the containerd binary path as a last resort to locate the shim if the shim itself is not found in the PATH.

Use full name including extension for shim binary format on Windows in order to
match any stat path faster without a fallback.

Signed-off-by: Justin Terry (VM) <[email protected]>
@jterry75
Copy link
Copy Markdown
Contributor Author

@jhowardmsft - FYI this is the containerd side fix for microsoft/hcsshim#460

@codecov-io
Copy link
Copy Markdown

codecov-io commented Jan 28, 2019

Codecov Report

Merging #2960 into master will decrease coverage by 0.04%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2960      +/-   ##
==========================================
- Coverage   44.02%   43.97%   -0.05%     
==========================================
  Files         102      102              
  Lines       10863    10874      +11     
==========================================
  Hits         4782     4782              
- Misses       5348     5359      +11     
  Partials      733      733
Flag Coverage Δ
#linux 47.62% <0%> (-0.03%) ⬇️
#windows 41.19% <0%> (-0.05%) ⬇️
Impacted Files Coverage Δ
runtime/v2/shim/util_windows.go 0% <ø> (ø) ⬆️
runtime/v2/shim/util_unix.go 0% <ø> (ø) ⬆️
runtime/v2/shim/util.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 4259f63...d63099c. Read the comment docs.

@crosbymichael
Copy link
Copy Markdown
Member

LGTM

1 similar comment
@ehazlett
Copy link
Copy Markdown
Member

LGTM

@crosbymichael crosbymichael merged commit f35c352 into containerd:master Jan 28, 2019
@jterry75 jterry75 deleted the shim_windows_lookpath branch January 28, 2019 21:28
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