Skip to content

ctr: make ctr shim command easy to use#3288

Merged
estesp merged 1 commit intocontainerd:masterfrom
Ace-Tang:easy-shim
May 17, 2019
Merged

ctr: make ctr shim command easy to use#3288
estesp merged 1 commit intocontainerd:masterfrom
Ace-Tang:easy-shim

Conversation

@Ace-Tang
Copy link
Copy Markdown
Contributor

make ctr shim command easy to use for user, shim socket is generated
through sha256, and it can not get directly, change socket flag to id
command, generated socket in code.
It also avoid fail to connect shim v2, since shim v2 have multiple
containers, ctr shim --socket state should specify container id, or
get error rpc error: code = NotFound desc = container not created: not found

Signed-off-by: Ace-Tang [email protected]

@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented May 16, 2019

Build succeeded.

Comment thread cmd/ctr/commands/shim/shim.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.

Can this be just shim.SocketAddress(ctx, id) ?

return filepath.Join(string(filepath.Separator), "containerd-shim", fmt.Sprintf("%x.sock", d)), nil

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.

Update.

make ctr shim command easy to use for user, shim socket is generated
through sha256, and it can not get directly, change socket flag to id
command, generated socket in code.
It also avoid fail to connect shim v2, since shim v2 have multiple
containers, `ctr shim --socket state` should specify container id, or
get error `rpc error: code = NotFound desc = container not created: not
found`

Signed-off-by: Ace-Tang <[email protected]>
@theopenlab-ci
Copy link
Copy Markdown

theopenlab-ci Bot commented May 17, 2019

Build succeeded.

@codecov-io
Copy link
Copy Markdown

codecov-io commented May 17, 2019

Codecov Report

Merging #3288 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff           @@
##           master   #3288   +/-   ##
======================================
  Coverage    44.4%   44.4%           
======================================
  Files         113     113           
  Lines       12231   12231           
======================================
  Hits         5431    5431           
  Misses       5966    5966           
  Partials      834     834
Flag Coverage Δ
#linux 48.33% <ø> (ø) ⬆️
#windows 39.66% <ø> (ø) ⬆️

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 cd5369b...6907062. Read the comment docs.

@crosbymichael
Copy link
Copy Markdown
Member

LGTM

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 estesp merged commit b99a66c into containerd:master May 17, 2019
@Ace-Tang Ace-Tang deleted the easy-shim branch May 20, 2019 05:21
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.

5 participants