Skip to content

Commit 644cef4

Browse files
author
zhouhao
committed
update runtime-spec version
Signed-off-by: zhouhao <zhouhao@cn.fujitsu.com>
1 parent ce55f9b commit 644cef4

19 files changed

Lines changed: 1285 additions & 1054 deletions

File tree

Godeps/Godeps.json

Lines changed: 3 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Godeps/_workspace/src/github.com/opencontainers/runtime-spec/specs-go/config.go

Lines changed: 222 additions & 140 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Godeps/_workspace/src/github.com/opencontainers/runtime-spec/specs-go/state.go

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Godeps/_workspace/src/github.com/opencontainers/runtime-spec/specs-go/version.go

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Godeps/_workspace/src/github.com/syndtr/gocapability/capability/capability.go

Lines changed: 10 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Godeps/_workspace/src/github.com/syndtr/gocapability/capability/capability_linux.go

Lines changed: 46 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Godeps/_workspace/src/github.com/syndtr/gocapability/capability/enum.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Godeps/_workspace/src/github.com/syndtr/gocapability/capability/syscall_linux.go

Lines changed: 9 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/oci-runtime-tool/generate.go

Lines changed: 5 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ var generateFlags = []cli.Flag{
2222
cli.StringFlag{Name: "arch", Value: runtime.GOARCH, Usage: "architecture the container is created for"},
2323
cli.StringSliceFlag{Name: "args", Usage: "command to run in the container"},
2424
cli.StringSliceFlag{Name: "bind", Usage: "bind mount directories src:dest[:options...]"},
25-
cli.StringSliceFlag{Name: "cap-add", Usage: "add Linux capabilities"},
26-
cli.StringSliceFlag{Name: "cap-drop", Usage: "drop Linux capabilities"},
2725
cli.StringFlag{Name: "cgroups-path", Usage: "specify the path to the cgroups"},
2826
cli.StringFlag{Name: "cwd", Value: "/", Usage: "current working directory for the process"},
2927
cli.StringSliceFlag{Name: "device", Usage: "specifies a device which must be made available in the container"},
@@ -52,8 +50,8 @@ var generateFlags = []cli.Flag{
5250
cli.IntFlag{Name: "linux-network-classid", Usage: "specifies class identifier tagged by container's network packets"},
5351
cli.StringSliceFlag{Name: "linux-network-priorities", Usage: "specifies priorities of network traffic"},
5452
cli.Int64Flag{Name: "linux-pids-limit", Usage: "maximum number of PIDs"},
55-
cli.Uint64Flag{Name: "linux-realtime-period", Usage: "CPU period to be used for realtime scheduling (in usecs)"},
56-
cli.Uint64Flag{Name: "linux-realtime-runtime", Usage: "the time realtime scheduling may use (in usecs)"},
53+
cli.Int64Flag{Name: "linux-realtime-period", Usage: "CPU period to be used for realtime scheduling (in usecs)"},
54+
cli.Int64Flag{Name: "linux-realtime-runtime", Usage: "the time realtime scheduling may use (in usecs)"},
5755
cli.StringSliceFlag{Name: "masked-paths", Usage: "specifies paths can not be read inside container"},
5856
cli.StringFlag{Name: "mount-cgroups", Value: "no", Usage: "mount cgroups (rw,ro,no)"},
5957
cli.StringFlag{Name: "mount-label", Usage: "selinux mount context label"},
@@ -259,24 +257,6 @@ func setupSpec(g *generate.Generator, context *cli.Context) error {
259257

260258
g.SetupPrivileged(context.Bool("privileged"))
261259

262-
if context.IsSet("cap-add") {
263-
addCaps := context.StringSlice("cap-add")
264-
for _, cap := range addCaps {
265-
if err := g.AddProcessCapability(cap); err != nil {
266-
return err
267-
}
268-
}
269-
}
270-
271-
if context.IsSet("cap-drop") {
272-
dropCaps := context.StringSlice("cap-drop")
273-
for _, cap := range dropCaps {
274-
if err := g.DropProcessCapability(cap); err != nil {
275-
return err
276-
}
277-
}
278-
}
279-
280260
var uidMaps, gidMaps []string
281261

282262
if context.IsSet("uidmappings") {
@@ -385,11 +365,11 @@ func setupSpec(g *generate.Generator, context *cli.Context) error {
385365
}
386366

387367
if context.IsSet("linux-cpu-quota") {
388-
g.SetLinuxResourcesCPUQuota(context.Uint64("linux-cpu-quota"))
368+
g.SetLinuxResourcesCPUQuota(context.Int64("linux-cpu-quota"))
389369
}
390370

391371
if context.IsSet("linux-realtime-runtime") {
392-
g.SetLinuxResourcesCPURealtimeRuntime(context.Uint64("linux-realtime-runtime"))
372+
g.SetLinuxResourcesCPURealtimeRuntime(context.Int64("linux-realtime-runtime"))
393373
}
394374

395375
if context.IsSet("linux-pids-limit") {
@@ -644,7 +624,7 @@ var deviceType = map[string]bool{
644624

645625
// addDevice takes the raw string passed with the --device flag, parses it, and add it
646626
func addDevice(device string, g *generate.Generator) error {
647-
dev := rspec.Device{}
627+
dev := rspec.LinuxDevice{}
648628

649629
// The required part and optional part are separated by ":"
650630
argsParts := strings.Split(device, ":")

0 commit comments

Comments
 (0)