Skip to content
This repository has been archived by the owner on May 6, 2020. It is now read-only.

Commit

Permalink
vendor: Update virtcontainers vendoring
Browse files Browse the repository at this point in the history
This commit update virtcontainers vendoring by mainly adding support
for kata agent and kata shim.

Shortlog:

3e86f7b vendor: Force kata containers agent vendoring
34952bb shim: Factorize the shim config structure between kata and CC
a7e244a shim: Factorize shim execution code
eb8befb shim: Add a Kata shim mock implementation
6da9685 shim: Add a Kata Containers shim type
18f46de kata_shim: Initial implementation
60a446a container: Generate process token when not set
4c2c9a4 mounts: Fix bug while checking if /dev was bind-mounted
67fcb6d pkg/oci: honour CPU period and quota
1a3de59 agent: Add kata exec, stopContainer and killContainer
4f92997 annotations: Update tests to use package prefix
b3da3de mount: Fix tests for bindMountContainerRootfs function
aa75a0e kata_agent: Implement vmURL and setProxyURL
53f093d kata_agent: Initial VSOCK support
bc302d2 kata_agent: Implement the validate function
cb7fac2 kata_agent: Rename shared dir paths
0b95eda kata_agent: Create and start container implementations
c4a4be4 mount: Gather the entire bind mount API
be96f34 vendor: Update for Kata Containers
c0692ca annotations: Move OCI annotations to the annotation package
1a638c0 ci: Handle complex revendoring cases
fe726af kata_agent: Implement pod start and stop ops
3d1afe4 kata_agent: Initialize gRPC client
f6948d8 agent: Add new agent type for Kata Containers
7d35db6 kata_agent: Add Kata agent configuration
b2fe3df hyperstart: Rename to hyperstart_agent
f86cd11 kata_agent: Initial implementation
414e156 qemu: improve kernel boot time
bdde7bb pod: Add important comment for Cmd type
a217958 oci: Pass the NoNewPrivileges flag to the agent.
f683602 oci: Add support for NoNewPrivileges in oci spec
ddd89b7 cheanup: Remove vendored "golang.org/x/crypto" package.
fd6e357 cleanup: Remove sshd agent
b7c19b8 cni: update function names for consistency
847eaaa network: scan network one less time
dc4836a network: unique ID is not unique
8449f56 network: refactoring and cleanup of CNI path
d6f9690 vendor: Revendor govmm for VSOCK support

Fixes #900

Signed-off-by: Sebastien Boeuf <[email protected]>
  • Loading branch information
Sebastien Boeuf committed Jan 8, 2018
1 parent be7d1ce commit cec1b6f
Show file tree
Hide file tree
Showing 790 changed files with 309,428 additions and 8,049 deletions.
55 changes: 49 additions & 6 deletions Gopkg.lock

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

10 changes: 1 addition & 9 deletions Gopkg.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@
name = "github.com/opencontainers/runc"
revision = "a0159fddcd197a57790b6dd5654802b7dc8f80be"

[[constraint]]
name = "github.com/opencontainers/runtime-spec"
revision = "a8125598b32a65ff55c83214d3c262383178e7fa"

[[constraint]]
name = "github.com/pmezard/go-difflib"
revision = "792786c7400a136282c1664665ae0a8db921c6c2"
Expand Down Expand Up @@ -74,10 +70,6 @@
name = "golang.org/x/crypto"
revision = "76eec36fa14229c4b25bb894c2d0e591527af429"

[[constraint]]
name = "golang.org/x/sys"
revision = "314a259e304ff91bd6985da2a7149bbf91237993"

[[constraint]]
name = "github.com/containers/virtcontainers"
revision = "d2342c73a2b486736b2f88164b13b542873115dc"
revision = "387abeb4466d86aef1171b054f64ee8c636aa05f"
2 changes: 1 addition & 1 deletion cc-env.go
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ func getCommandVersion(cmd string) (string, error) {
}

func getShimInfo(config oci.RuntimeConfig) (ShimInfo, error) {
shimConfig, ok := config.ShimConfig.(vc.CCShimConfig)
shimConfig, ok := config.ShimConfig.(vc.ShimConfig)
if !ok {
return ShimInfo{}, errors.New("cannot determine shim config")
}
Expand Down
2 changes: 1 addition & 1 deletion cc-env_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func getExpectedProxyDetails(config oci.RuntimeConfig) (ProxyInfo, error) {
}

func getExpectedShimDetails(config oci.RuntimeConfig) (ShimInfo, error) {
shimConfig, ok := config.ShimConfig.(vc.CCShimConfig)
shimConfig, ok := config.ShimConfig.(vc.ShimConfig)
if !ok {
return ShimInfo{}, fmt.Errorf("failed to get shim config")
}
Expand Down
8 changes: 4 additions & 4 deletions config.go
Original file line number Diff line number Diff line change
Expand Up @@ -294,13 +294,13 @@ func newHyperstartAgentConfig(a agent) (vc.HyperConfig, error) {
return vc.HyperConfig{}, nil
}

func newCCShimConfig(s shim) (vc.CCShimConfig, error) {
func newShimConfig(s shim) (vc.ShimConfig, error) {
path, err := s.path()
if err != nil {
return vc.CCShimConfig{}, err
return vc.ShimConfig{}, err
}

return vc.CCShimConfig{
return vc.ShimConfig{
Path: path,
Debug: s.debug(),
}, nil
Expand Down Expand Up @@ -353,7 +353,7 @@ func updateRuntimeConfig(configPath string, tomlConf tomlConfig, config *oci.Run
for k, shim := range tomlConf.Shim {
switch k {
case ccShimTableType:
shConfig, err := newCCShimConfig(shim)
shConfig, err := newShimConfig(shim)
if err != nil {
return fmt.Errorf("%v: %v", configPath, err)
}
Expand Down
10 changes: 5 additions & 5 deletions config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ func createAllRuntimeConfigFiles(dir, hypervisor string) (config testRuntimeConf
Path: proxyPath,
}

shimConfig := vc.CCShimConfig{
shimConfig := vc.ShimConfig{
Path: shimPath,
}

Expand Down Expand Up @@ -362,7 +362,7 @@ func TestConfigLoadConfigurationFailMissingShim(t *testing.T) {
func(config testRuntimeConfig, configFile string, ignoreLogging bool) (bool, error) {
expectFail := true

shimConfig, ok := config.RuntimeConfig.ShimConfig.(vc.CCShimConfig)
shimConfig, ok := config.RuntimeConfig.ShimConfig.(vc.ShimConfig)
if !ok {
return expectFail, fmt.Errorf("cannot determine shim config")
}
Expand Down Expand Up @@ -517,7 +517,7 @@ func TestMinimalRuntimeConfig(t *testing.T) {
Path: proxyPath,
}

expectedShimConfig := vc.CCShimConfig{
expectedShimConfig := vc.ShimConfig{
Path: shimPath,
}

Expand Down Expand Up @@ -628,7 +628,7 @@ func TestNewCCShimConfig(t *testing.T) {
Path: shimPath,
}

_, err = newCCShimConfig(shim)
_, err = newShimConfig(shim)
if err == nil {
t.Fatalf("Expected newCCShimConfig to fail as no paths exist")
}
Expand All @@ -638,7 +638,7 @@ func TestNewCCShimConfig(t *testing.T) {
t.Error(err)
}

shConfig, err := newCCShimConfig(shim)
shConfig, err := newShimConfig(shim)
if err != nil {
t.Fatalf("newCCShimConfig failed unexpectedly: %v", err)
}
Expand Down
28 changes: 14 additions & 14 deletions delete_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
"testing"

vc "github.com/containers/virtcontainers"
"github.com/containers/virtcontainers/pkg/oci"
vcAnnotations "github.com/containers/virtcontainers/pkg/annotations"
"github.com/containers/virtcontainers/pkg/vcMock"
"github.com/stretchr/testify/assert"
"github.com/urfave/cli"
Expand Down Expand Up @@ -127,7 +127,7 @@ func TestDeleteInvalidConfig(t *testing.T) {
{
ID: pod.ID(),
Annotations: map[string]string{
oci.ContainerTypeKey: string(vc.PodSandbox),
vcAnnotations.ContainerTypeKey: string(vc.PodSandbox),
},
},
},
Expand Down Expand Up @@ -181,8 +181,8 @@ func TestDeletePod(t *testing.T) {
{
ID: pod.ID(),
Annotations: map[string]string{
oci.ContainerTypeKey: string(vc.PodSandbox),
oci.ConfigJSONKey: configJSON,
vcAnnotations.ContainerTypeKey: string(vc.PodSandbox),
vcAnnotations.ConfigJSONKey: configJSON,
},
State: vc.State{
State: "ready",
Expand Down Expand Up @@ -244,8 +244,8 @@ func TestDeleteInvalidContainerType(t *testing.T) {
{
ID: pod.ID(),
Annotations: map[string]string{
oci.ContainerTypeKey: "InvalidType",
oci.ConfigJSONKey: configJSON,
vcAnnotations.ContainerTypeKey: "InvalidType",
vcAnnotations.ConfigJSONKey: configJSON,
},
State: vc.State{
State: "created",
Expand Down Expand Up @@ -285,8 +285,8 @@ func TestDeletePodRunning(t *testing.T) {
{
ID: pod.ID(),
Annotations: map[string]string{
oci.ContainerTypeKey: string(vc.PodSandbox),
oci.ConfigJSONKey: configJSON,
vcAnnotations.ContainerTypeKey: string(vc.PodSandbox),
vcAnnotations.ConfigJSONKey: configJSON,
},
State: vc.State{
State: "running",
Expand Down Expand Up @@ -357,8 +357,8 @@ func TestDeleteRunningContainer(t *testing.T) {
{
ID: pod.MockContainers[0].ID(),
Annotations: map[string]string{
oci.ContainerTypeKey: string(vc.PodContainer),
oci.ConfigJSONKey: configJSON,
vcAnnotations.ContainerTypeKey: string(vc.PodContainer),
vcAnnotations.ConfigJSONKey: configJSON,
},
State: vc.State{
State: "running",
Expand Down Expand Up @@ -433,8 +433,8 @@ func TestDeleteContainer(t *testing.T) {
{
ID: pod.MockContainers[0].ID(),
Annotations: map[string]string{
oci.ContainerTypeKey: string(vc.PodContainer),
oci.ConfigJSONKey: configJSON,
vcAnnotations.ContainerTypeKey: string(vc.PodContainer),
vcAnnotations.ConfigJSONKey: configJSON,
},
State: vc.State{
State: "ready",
Expand Down Expand Up @@ -528,8 +528,8 @@ func TestDeleteCLIFunctionSuccess(t *testing.T) {
{
ID: pod.ID(),
Annotations: map[string]string{
oci.ContainerTypeKey: string(vc.PodSandbox),
oci.ConfigJSONKey: configJSON,
vcAnnotations.ContainerTypeKey: string(vc.PodSandbox),
vcAnnotations.ConfigJSONKey: configJSON,
},
State: vc.State{
State: "ready",
Expand Down
Loading

0 comments on commit cec1b6f

Please sign in to comment.