Skip to content

Commit f055bdb

Browse files
committed
Remove windows v1 runtime
Closes #3094 Signed-off-by: Michael Crosby <[email protected]>
1 parent f776141 commit f055bdb

18 files changed

Lines changed: 11 additions & 2596 deletions

Protobuild.toml

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,3 @@ ignore_files = [
7777
"google/protobuf/descriptor.proto",
7878
"gogoproto/gogo.proto"
7979
]
80-
81-
[[descriptors]]
82-
prefix = "github.com/containerd/containerd/windows/hcsshimtypes"
83-
target = "windows/hcsshimtypes/next.pb.txt"
84-
ignore_files = [
85-
"google/protobuf/descriptor.proto",
86-
"gogoproto/gogo.proto"
87-
]

client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ func New(address string, opts ...ClientOpt) (*Client, error) {
9393
if copts.defaultRuntime != "" {
9494
c.runtime = copts.defaultRuntime
9595
} else {
96-
c.runtime = fmt.Sprintf("%s.%s", plugin.RuntimePlugin, runtime.GOOS)
96+
c.runtime = defaults.DefaultRuntime
9797
}
9898

9999
if copts.services != nil {

cmd/containerd/builtins_windows.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,4 @@ import (
2424
_ "github.com/containerd/containerd/runtime/v2"
2525
_ "github.com/containerd/containerd/snapshots/lcow"
2626
_ "github.com/containerd/containerd/snapshots/windows"
27-
_ "github.com/containerd/containerd/windows"
2827
)

cmd/ctr/commands/commands.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import (
2121
"fmt"
2222
"os"
2323
"path/filepath"
24-
"runtime"
2524
"strings"
2625

26+
"github.com/containerd/containerd/defaults"
2727
"github.com/urfave/cli"
2828
)
2929

@@ -100,7 +100,7 @@ var (
100100
cli.StringFlag{
101101
Name: "runtime",
102102
Usage: "runtime name",
103-
Value: fmt.Sprintf("io.containerd.runtime.v1.%s", runtime.GOOS),
103+
Value: defaults.DefaultRuntime,
104104
},
105105
cli.BoolFlag{
106106
Name: "tty,t",

container_test.go

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ import (
4040
specs "github.com/opencontainers/runtime-spec/specs-go"
4141

4242
"github.com/containerd/containerd/errdefs"
43-
"github.com/containerd/containerd/windows/hcsshimtypes"
4443
gogotypes "github.com/gogo/protobuf/types"
4544
)
4645

@@ -441,20 +440,13 @@ func TestContainerPids(t *testing.T) {
441440
t.Errorf("invalid task pid %d", pid)
442441
}
443442
processes, err := task.Pids(ctx)
444-
if err != nil {
445-
t.Fatal(err)
446-
}
447443
switch runtime.GOOS {
448444
case "windows":
449-
if processes[0].Info == nil {
450-
t.Error("expected additional process information but received nil")
451-
} else {
452-
var details hcsshimtypes.ProcessDetails
453-
if err := details.Unmarshal(processes[0].Info.Value); err != nil {
454-
t.Errorf("expected Windows info type hcsshimtypes.ProcessDetails %v", err)
455-
}
456-
}
445+
// TODO: This is currently not implemented on windows
457446
default:
447+
if err != nil {
448+
t.Fatal(err)
449+
}
458450
if l := len(processes); l != 1 {
459451
t.Errorf("expected 1 process but received %d", l)
460452
}

defaults/defaults_unix.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,6 @@ const (
3232
// DefaultFIFODir is the default location used by client-side cio library
3333
// to store FIFOs.
3434
DefaultFIFODir = "/run/containerd/fifo"
35+
// DefaultRuntime is the default linux runtime
36+
DefaultRuntime = "io.containerd.runc.v2"
3537
)

defaults/defaults_windows.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,6 @@ const (
4040
// DefaultFIFODir is the default location used by client-side cio library
4141
// to store FIFOs. Unused on Windows.
4242
DefaultFIFODir = ""
43+
// DefaultRuntime is the default windows runtime
44+
DefaultRuntime = "io.containerd.runhcs.v1"
4345
)

windows/hcsshim.go

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

0 commit comments

Comments
 (0)