Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion libpod/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,10 @@ func getTestContainer(id, name, locksDir string) (*Container, error) {
valid: true,
}

g := generate.New()
g, err := generate.New("linux")
if err != nil {
return nil, err
}
ctr.config.Spec = g.Spec()
Copy link
Contributor

Choose a reason for hiding this comment

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

This should have g.Spec() -> g.Config (and similarly in CreateConfigToOCISpec).

Copy link
Contributor

Choose a reason for hiding this comment

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

This should have g.Spec() -> g.Config (and similarly in CreateConfigToOCISpec).

I've filed #1008 for this.


ctr.config.Labels["test"] = "testing"
Expand Down
5 changes: 4 additions & 1 deletion pkg/spec/spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ const cpuPeriod = 100000
// CreateConfigToOCISpec parses information needed to create a container into an OCI runtime spec
func CreateConfigToOCISpec(config *CreateConfig) (*spec.Spec, error) { //nolint
cgroupPerm := "ro"
g := generate.New()
g, err := generate.New("linux")
Copy link
Contributor

Choose a reason for hiding this comment

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

The rest of CreateConfigToOCISpec is pretty Linux-specific, so I'm fine with this being hard-coded here. But CreateConfigToOCISpec is so opinionated, I'm surprised you need to seed it at all. Do you know what parts of this initial config survive the subsequent edits to be returned to the caller? You might just want to build the *spec.Spec object directly.

if err != nil {
return nil, err
}
g.HostSpecific = true
addCgroup := true
if config.Privileged {
Expand Down
2 changes: 1 addition & 1 deletion vendor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ k8s.io/kube-openapi 275e2ce91dec4c05a4094a7b1daee5560b555ac9 https://github.com/
k8s.io/utils 258e2a2fa64568210fbd6267cf1d8fd87c3cb86e https://github.com/kubernetes/utils
github.com/mrunalp/fileutils master
github.com/varlink/go master
github.com/projectatomic/buildah 2441ff4f9f6a5e635f85c177892f096a46503d6f
github.com/projectatomic/buildah e098ef46fd32af5e77c7c65315d454653a36d6dd
github.com/Nvveen/Gotty master
github.com/fsouza/go-dockerclient master
github.com/openshift/imagebuilder master
142 changes: 44 additions & 98 deletions vendor/github.com/opencontainers/runtime-tools/README.md

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

30 changes: 30 additions & 0 deletions vendor/github.com/opencontainers/runtime-tools/error/error.go

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

Loading