Skip to content

Various runhcs shim fixes#2692

Merged
estesp merged 5 commits intocontainerd:masterfrom
jterry75:shim_reconnect
Oct 3, 2018
Merged

Various runhcs shim fixes#2692
estesp merged 5 commits intocontainerd:masterfrom
jterry75:shim_reconnect

Conversation

@jterry75
Copy link
Copy Markdown
Contributor

  • Adds Windows shim reconnect logs support
  • Decrease shim timeout on pipe not found
    On Windows because of the way the log pipe is forwarded to the shim there is a
    condition where the pipe listener may not yet be active when a client tries to
    connect. To handle this case we allow polling on the file and retry on pipe not
    found. This limits the pipe not found retry to 5 seconds but leaves the connect
    timeout alone as if there is a listener we want to connect to it normally.
  • Handle shim delete workdir on Windows

Comment thread runtime/v2/binary.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit: could be simplified to

if gruntime.GOOS != "windows" {
   bundlePath = b.bundle.Path
}

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.

Good point. Fixed

Comment thread runtime/v2/binary.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

typo: s/deafult/default/

Comment thread runtime/v2/shim/shim_windows.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

liftime? lifetime?

Comment thread runtime/v2/shim/shim_windows.go Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

s/would of/would have/

Comment thread runtime/v2/shim/shim_windows.go Outdated
@jterry75 jterry75 force-pushed the shim_reconnect branch 3 times, most recently from cc2bbb1 to fd083f8 Compare October 2, 2018 16:00
@mlaventure
Copy link
Copy Markdown
Contributor

One more issue, but LGTM.

There seems to be some unwanted whitespaces

3aef60f - FAIL - has whitespace errors. See `git show --check 3aef60f97960a7bdc6e4a07077602ee2672a02e3`.

On Windows because of the way the log pipe is forwarded to the shim there is a
condition where the pipe listener may not yet be active when a client tries to
connect. To handle this case we allow polling on the file and rety on pipe not
found. This limits the pipe not found retry to 5 seconds but leaves the connect
timeout alone as if there is a listener we want to connect to it normally.

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

jterry75 commented Oct 2, 2018

@mlaventure - Can you tell me what the build failure was? This builds/tests/verifies locally just fine. Do you have any ideas?

@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #2692 into master will increase coverage by 1.42%.
The diff coverage is 68.13%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2692      +/-   ##
=========================================
+ Coverage   43.07%   44.5%   +1.42%     
=========================================
  Files         100     101       +1     
  Lines       10606   10918     +312     
=========================================
+ Hits         4569    4859     +290     
+ Misses       5316    5307       -9     
- Partials      721     752      +31
Flag Coverage Δ
#linux 47.06% <0%> (-0.03%) ⬇️
#windows 40.74% <68.13%> (+0.5%) ⬆️
Impacted Files Coverage Δ
runtime/v2/shim/util_windows.go 0% <0%> (ø) ⬆️
runtime/v2/shim/shim.go 0% <0%> (ø) ⬆️
runtime/v2/shim/shim_windows.go 40.85% <73.8%> (+40.85%) ⬆️
remotes/docker/authorizer.go 66.49% <0%> (ø)
metadata/content.go 47.64% <0%> (+5.7%) ⬆️
remotes/docker/resolver.go 70.02% <0%> (+8.69%) ⬆️

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 ac01f20...ab20312. Read the comment docs.

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

@estesp
Copy link
Copy Markdown
Member

estesp commented Oct 3, 2018

the whitespace error was fixed on the last push; CI passing now

@estesp estesp merged commit de4bb2d into containerd:master Oct 3, 2018
@jterry75 jterry75 deleted the shim_reconnect branch October 3, 2018 15:54
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