Skip to content

Commit

Permalink
Merge pull request #2771 from Ace-Tang/runtime_v2_add_id
Browse files Browse the repository at this point in the history
fix: fix failed to get container-shim relation with io.containerd.runc.v1
  • Loading branch information
crosbymichael committed Nov 9, 2018
2 parents 130d07e + c4feaa7 commit ed5a789
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions runtime/v2/runc/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ type service struct {
cancel func()
}

func newCommand(ctx context.Context, containerdBinary, containerdAddress string) (*exec.Cmd, error) {
func newCommand(ctx context.Context, id, containerdBinary, containerdAddress string) (*exec.Cmd, error) {
ns, err := namespaces.NamespaceRequired(ctx)
if err != nil {
return nil, err
Expand All @@ -125,6 +125,7 @@ func newCommand(ctx context.Context, containerdBinary, containerdAddress string)
}
args := []string{
"-namespace", ns,
"-id", id,
"-address", containerdAddress,
"-publish-binary", containerdBinary,
}
Expand All @@ -138,7 +139,7 @@ func newCommand(ctx context.Context, containerdBinary, containerdAddress string)
}

func (s *service) StartShim(ctx context.Context, id, containerdBinary, containerdAddress string) (string, error) {
cmd, err := newCommand(ctx, containerdBinary, containerdAddress)
cmd, err := newCommand(ctx, id, containerdBinary, containerdAddress)
if err != nil {
return "", err
}
Expand Down

0 comments on commit ed5a789

Please sign in to comment.