Skip to content

Commit

Permalink
Merge pull request kata-containers#503 from teawater/fix_shimv2
Browse files Browse the repository at this point in the history
Revert vendor: Update libcontainer vendoring
  • Loading branch information
lifupan authored Mar 29, 2019
2 parents 48dd1c0 + 39696c0 commit 6b7d41a
Show file tree
Hide file tree
Showing 45 changed files with 1,057 additions and 2,606 deletions.
13 changes: 3 additions & 10 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

[[constraint]]
name = "github.com/opencontainers/runc"
revision = "f56b4cbeadc407e715d9b2ba49e62185bd81cef4"
revision = "cc4307ab6643668ce5abc6b524e1764a54c32550"

[[constraint]]
name = "github.com/opencontainers/runtime-spec"
Expand Down
7 changes: 3 additions & 4 deletions grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ func setConsoleCarriageReturn(fd int) error {
return unix.IoctlSetTermios(fd, unix.TCSETS, termios)
}

func buildProcess(agentProcess *pb.Process, procID string, init bool) (*process, error) {
func buildProcess(agentProcess *pb.Process, procID string) (*process, error) {
user := agentProcess.User.Username
if user == "" {
// We can specify the user and the group separated by ":"
Expand All @@ -312,7 +312,6 @@ func buildProcess(agentProcess *pb.Process, procID string, init bool) (*process,
Env: agentProcess.Env,
User: user,
AdditionalGroups: additionalGids,
Init: init,
},
}

Expand Down Expand Up @@ -584,7 +583,7 @@ func (a *agentGRPC) finishCreateContainer(ctr *container, req *pb.CreateContaine
}
ctr.config = *config

ctr.initProcess, err = buildProcess(req.OCI.Process, req.ExecId, true)
ctr.initProcess, err = buildProcess(req.OCI.Process, req.ExecId)
if err != nil {
return emptyResp, err
}
Expand Down Expand Up @@ -875,7 +874,7 @@ func (a *agentGRPC) ExecProcess(ctx context.Context, req *pb.ExecProcessRequest)
return nil, grpcStatus.Errorf(codes.FailedPrecondition, "Cannot exec in stopped container %s", req.ContainerId)
}

proc, err := buildProcess(req.Process, req.ExecId, false)
proc, err := buildProcess(req.Process, req.ExecId)
if err != nil {
return emptyResp, err
}
Expand Down
5 changes: 0 additions & 5 deletions mockcontainer.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import (

"github.com/opencontainers/runc/libcontainer"
"github.com/opencontainers/runc/libcontainer/configs"
"github.com/opencontainers/runtime-spec/specs-go"
)

type mockContainer struct {
Expand All @@ -34,10 +33,6 @@ func (m *mockContainer) State() (*libcontainer.State, error) {
return nil, nil
}

func (m *mockContainer) OCIState() (*specs.State, error) {
return nil, nil
}

func (m *mockContainer) Config() configs.Config {
return configs.Config{
Capabilities: &configs.Capabilities{},
Expand Down
201 changes: 0 additions & 201 deletions vendor/github.com/checkpoint-restore/go-criu/LICENSE

This file was deleted.

Loading

0 comments on commit 6b7d41a

Please sign in to comment.