Skip to content

Commit 385d295

Browse files
milantracygvisor-bot
authored andcommitted
Remove pkg/shim/v1/runtimeoptions/v14 that supports containerd before v1.4.
gVisor now supports containerd 1.6 and later. PiperOrigin-RevId: 840429781
1 parent 23ece0f commit 385d295

File tree

8 files changed

+0
-558
lines changed

8 files changed

+0
-558
lines changed

nogo.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ global:
8585
exclude:
8686
# Generated: exempt all.
8787
- pkg/shim/v1/runtimeoptions/runtimeoptions_cri.go
88-
- pkg/shim/v1/runtimeoptions/v14/runtimeoptions_cri.go
8988
analyzers:
9089
asmdecl:
9190
generated: # Enabled.

pkg/shim/v1/runsc/BUILD

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ go_library(
2424
"//pkg/shim/v1/proc",
2525
"//pkg/shim/v1/runsccmd",
2626
"//pkg/shim/v1/runtimeoptions",
27-
"//pkg/shim/v1/runtimeoptions/v14",
2827
"//pkg/shim/v1/utils",
2928
"//runsc/specutils",
3029
"@com_github_burntsushi_toml//:go_default_library",

pkg/shim/v1/runsc/service.go

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ import (
5151
"github.com/sirupsen/logrus"
5252
"golang.org/x/sys/unix"
5353
"gvisor.dev/gvisor/pkg/cleanup"
54-
"gvisor.dev/gvisor/pkg/shim/v1/runtimeoptions/v14"
5554

5655
"gvisor.dev/gvisor/pkg/shim/v1/extension"
5756
"gvisor.dev/gvisor/pkg/shim/v1/proc"
@@ -219,26 +218,6 @@ func (s *runscService) Create(ctx context.Context, r *taskAPI.CreateTaskRequest)
219218
}
220219
var path string
221220
switch o := v.(type) {
222-
case *runctypes.CreateOptions: // containerd 1.2.x
223-
s.opts.IoUID = o.IoUid
224-
s.opts.IoGID = o.IoGid
225-
s.opts.ShimCgroup = o.ShimCgroup
226-
case *runctypes.RuncOptions: // containerd 1.2.x
227-
root := proc.RunscRoot
228-
if o.RuntimeRoot != "" {
229-
root = o.RuntimeRoot
230-
}
231-
232-
s.opts.BinaryName = o.Runtime
233-
234-
path = filepath.Join(root, configFile)
235-
if _, err := os.Stat(path); err != nil {
236-
if !os.IsNotExist(err) {
237-
return nil, fmt.Errorf("stat config file %q: %w", path, err)
238-
}
239-
// A config file in runtime root is not required.
240-
path = ""
241-
}
242221
case *runtimeoptions.Options: // containerd 1.5+
243222
if o.ConfigPath == "" {
244223
break
@@ -247,14 +226,6 @@ func (s *runscService) Create(ctx context.Context, r *taskAPI.CreateTaskRequest)
247226
return nil, fmt.Errorf("unsupported option type %q", o.TypeUrl)
248227
}
249228
path = o.ConfigPath
250-
case *v14.Options: // containerd 1.4-
251-
if o.ConfigPath == "" {
252-
break
253-
}
254-
if o.TypeUrl != optionsType {
255-
return nil, fmt.Errorf("unsupported option type %q", o.TypeUrl)
256-
}
257-
path = o.ConfigPath
258229
default:
259230
return nil, fmt.Errorf("unsupported option type %q", r.Options.TypeUrl)
260231
}

pkg/shim/v1/runtimeoptions/v14/BUILD

Lines changed: 0 additions & 35 deletions
This file was deleted.

pkg/shim/v1/runtimeoptions/v14/runtimeoptions.go

Lines changed: 0 additions & 20 deletions
This file was deleted.

pkg/shim/v1/runtimeoptions/v14/runtimeoptions.proto

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)