Skip to content

Commit ff3394f

Browse files
authored
Merge pull request #564 from henry118/fc-1.0
Update to firecracker to 1.0 release
2 parents 4e0dcd8 + b4f1581 commit ff3394f

File tree

10 files changed

+133
-70
lines changed

10 files changed

+133
-70
lines changed

.github/workflows/build.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
os: ['ubuntu-18.04', 'ubuntu-20.04']
17-
go: ['1.13', '1.14', '1.15', '1.16', '1.17']
17+
go: ['1.15', '1.16', '1.17']
1818
# Build all variants regardless of failures
1919
fail-fast: false
2020

_submodules/firecracker

Submodule firecracker updated 292 files

config/config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ type Config struct {
4848
RootDrive string `json:"root_drive"`
4949
CPUTemplate string `json:"cpu_template"`
5050
LogLevels []string `json:"log_levels"`
51-
HtEnabled bool `json:"ht_enabled"`
51+
SmtEnabled bool `json:"smt_enabled"`
5252
// If a CreateVM call specifies no network interfaces and DefaultNetworkInterfaces is non-empty,
5353
// the VM will default to using the network interfaces as specified here. This is especially
5454
// useful when a CNI-based network interface is provided in DefaultNetworkInterfaces.

go.mod

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,27 @@ module github.com/firecracker-microvm/firecracker-containerd
33
require (
44
github.com/Microsoft/go-winio v0.5.0 // indirect
55
github.com/StackExchange/wmi v0.0.0-20181212234831-e0a55b97c705 // indirect
6-
github.com/awslabs/tc-redirect-tap v0.0.0-20200708224642-a0300978797d
6+
github.com/awslabs/tc-redirect-tap v0.0.0-20211025175357-e30dfca224c2
77
github.com/bits-and-blooms/bitset v1.2.1 // indirect
88
github.com/containerd/containerd v1.5.9
99
github.com/containerd/continuity v0.2.0 // indirect
1010
github.com/containerd/fifo v1.0.0
11+
github.com/containerd/go-cni v1.1.1 // indirect
1112
github.com/containerd/go-runc v1.0.0
1213
github.com/containerd/ttrpc v1.1.0
1314
github.com/containerd/typeurl v1.0.2
14-
github.com/containernetworking/cni v0.8.1
15-
github.com/containernetworking/plugins v0.9.1
16-
github.com/firecracker-microvm/firecracker-go-sdk v0.22.1-0.20210520223842-abd0815b8bf9
15+
github.com/containernetworking/cni v1.0.1
16+
github.com/containernetworking/plugins v1.0.1
17+
github.com/firecracker-microvm/firecracker-go-sdk v0.22.1-0.20220214213810-2380785d98b7
1718
github.com/go-ole/go-ole v1.2.4 // indirect
1819
github.com/gofrs/uuid v3.3.0+incompatible
1920
github.com/gogo/googleapis v1.4.1 // indirect
2021
github.com/gogo/protobuf v1.3.2
2122
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
2223
github.com/golang/protobuf v1.5.2
23-
github.com/google/uuid v1.3.0 // indirect
24-
github.com/hashicorp/go-multierror v1.1.0
24+
github.com/hashicorp/go-multierror v1.1.1
2525
github.com/klauspost/compress v1.13.6 // indirect
26-
github.com/mdlayher/vsock v1.0.1
26+
github.com/mdlayher/vsock v1.1.0
2727
github.com/miekg/dns v1.1.25
2828
github.com/opencontainers/runc v1.0.3
2929
github.com/opencontainers/runtime-spec v1.0.3-0.20210910115017-0d6cc581aeea
@@ -32,14 +32,11 @@ require (
3232
github.com/shirou/gopsutil v2.18.12+incompatible
3333
github.com/shirou/w32 v0.0.0-20160930032740-bb4de0191aa4 // indirect
3434
github.com/sirupsen/logrus v1.8.1
35-
github.com/stretchr/testify v1.6.1
36-
github.com/vishvananda/netlink v1.1.1-0.20201029203352-d40f9887b852
35+
github.com/stretchr/testify v1.7.0
36+
github.com/vishvananda/netlink v1.1.1-0.20210330154013-f5de75959ad5
3737
go.opencensus.io v0.23.0 // indirect
38-
golang.org/x/net v0.0.0-20211005001312-d4b1ae081e3b // indirect
3938
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c
4039
golang.org/x/sys v0.0.0-20220209214540-3681064d5158
41-
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211 // indirect
42-
golang.org/x/text v0.3.7 // indirect
4340
google.golang.org/genproto v0.0.0-20211005153810-c76a74d43a8e // indirect
4441
google.golang.org/grpc v1.41.0
4542
)

go.sum

Lines changed: 107 additions & 40 deletions
Large diffs are not rendered by default.

internal/cmd/test-bridged-tap/main.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ import (
2828

2929
"github.com/containernetworking/cni/pkg/skel"
3030
"github.com/containernetworking/cni/pkg/types"
31-
"github.com/containernetworking/cni/pkg/types/current"
31+
current "github.com/containernetworking/cni/pkg/types/100"
3232
"github.com/containernetworking/cni/pkg/version"
3333
"github.com/containernetworking/plugins/pkg/ns"
3434
"github.com/containernetworking/plugins/pkg/utils/buildversion"
@@ -153,7 +153,6 @@ func add(args *skel.CmdArgs) error {
153153
vmIfaceIndex := len(currentResult.Interfaces) - 1
154154

155155
currentResult.IPs = append(currentResult.IPs, &current.IPConfig{
156-
Version: "4",
157156
Address: vethIPConf.Address,
158157
Gateway: vethIPConf.Gateway,
159158
Interface: &vmIfaceIndex,

runtime/helpers.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func machineConfigurationFromProto(cfg *config.Config, req *proto.FirecrackerMac
3636
CPUTemplate: models.CPUTemplate(cfg.CPUTemplate),
3737
VcpuCount: firecracker.Int64(defaultCPUCount),
3838
MemSizeMib: firecracker.Int64(defaultMemSizeMb),
39-
HtEnabled: firecracker.Bool(cfg.HtEnabled),
39+
Smt: firecracker.Bool(cfg.SmtEnabled),
4040
}
4141

4242
if req == nil {
@@ -55,7 +55,7 @@ func machineConfigurationFromProto(cfg *config.Config, req *proto.FirecrackerMac
5555
config.MemSizeMib = firecracker.Int64(int64(size))
5656
}
5757

58-
config.HtEnabled = firecracker.Bool(req.HtEnabled)
58+
config.Smt = firecracker.Bool(req.HtEnabled)
5959

6060
return config
6161
}

runtime/helpers_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func TestMachineConfigurationFromProto(t *testing.T) {
5353
CPUTemplate: models.CPUTemplateC3,
5454
VcpuCount: firecracker.Int64(vcpuCount),
5555
MemSizeMib: firecracker.Int64(memSize),
56-
HtEnabled: firecracker.Bool(true),
56+
Smt: firecracker.Bool(true),
5757
},
5858
},
5959
{
@@ -66,7 +66,7 @@ func TestMachineConfigurationFromProto(t *testing.T) {
6666
CPUTemplate: models.CPUTemplateC3,
6767
VcpuCount: firecracker.Int64(defaultCPUCount),
6868
MemSizeMib: firecracker.Int64(defaultMemSizeMb),
69-
HtEnabled: firecracker.Bool(false),
69+
Smt: firecracker.Bool(false),
7070
},
7171
},
7272
{
@@ -78,7 +78,7 @@ func TestMachineConfigurationFromProto(t *testing.T) {
7878
CPUTemplate: models.CPUTemplateC3,
7979
VcpuCount: firecracker.Int64(defaultCPUCount),
8080
MemSizeMib: firecracker.Int64(defaultMemSizeMb),
81-
HtEnabled: firecracker.Bool(false),
81+
Smt: firecracker.Bool(false),
8282
},
8383
},
8484
{
@@ -96,7 +96,7 @@ func TestMachineConfigurationFromProto(t *testing.T) {
9696
CPUTemplate: models.CPUTemplateC3,
9797
VcpuCount: firecracker.Int64(vcpuCount),
9898
MemSizeMib: firecracker.Int64(memSize),
99-
HtEnabled: firecracker.Bool(true),
99+
Smt: firecracker.Bool(true),
100100
},
101101
},
102102
}

runtime/service_integ_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2021,8 +2021,8 @@ func TestOOM_Isolated(t *testing.T) {
20212021
containerd.WithSnapshotter(defaultSnapshotterName),
20222022
containerd.WithNewSnapshot("snapshot-"+vmID, image),
20232023
containerd.WithNewSpec(
2024-
// The container is having 2MB of memory.
2025-
oci.WithMemoryLimit(2*1024*1024),
2024+
// The container is having 3MB of memory.
2025+
oci.WithMemoryLimit(3*1024*1024),
20262026
// But the dd command allocates 10MB of data on memory, which will be OOM killed.
20272027
oci.WithProcessArgs("/bin/dd", "if=/dev/zero", "ibs=10M", "of=/dev/null"),
20282028
firecrackeroci.WithVMID(vmID),

runtime/service_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ func TestBuildVMConfiguration(t *testing.T) {
7575
CPUTemplate: models.CPUTemplateC3,
7676
VcpuCount: firecracker.Int64(defaultCPUCount),
7777
MemSizeMib: firecracker.Int64(defaultMemSizeMb),
78-
HtEnabled: firecracker.Bool(false),
78+
Smt: firecracker.Bool(false),
7979
},
8080
},
8181
expectedStubDriveCount: 1,
@@ -112,7 +112,7 @@ func TestBuildVMConfiguration(t *testing.T) {
112112
CPUTemplate: models.CPUTemplateC3,
113113
VcpuCount: firecracker.Int64(2),
114114
MemSizeMib: firecracker.Int64(defaultMemSizeMb),
115-
HtEnabled: firecracker.Bool(false),
115+
Smt: firecracker.Bool(false),
116116
},
117117
},
118118
expectedStubDriveCount: 1,
@@ -152,7 +152,7 @@ func TestBuildVMConfiguration(t *testing.T) {
152152
CPUTemplate: models.CPUTemplateT2,
153153
VcpuCount: firecracker.Int64(3),
154154
MemSizeMib: firecracker.Int64(defaultMemSizeMb),
155-
HtEnabled: firecracker.Bool(false),
155+
Smt: firecracker.Bool(false),
156156
},
157157
},
158158
expectedStubDriveCount: 1,
@@ -188,7 +188,7 @@ func TestBuildVMConfiguration(t *testing.T) {
188188
CPUTemplate: models.CPUTemplateC3,
189189
VcpuCount: firecracker.Int64(defaultCPUCount),
190190
MemSizeMib: firecracker.Int64(defaultMemSizeMb),
191-
HtEnabled: firecracker.Bool(false),
191+
Smt: firecracker.Bool(false),
192192
},
193193
},
194194
expectedStubDriveCount: 1,
@@ -218,7 +218,7 @@ func TestBuildVMConfiguration(t *testing.T) {
218218
CPUTemplate: models.CPUTemplateC3,
219219
VcpuCount: firecracker.Int64(defaultCPUCount),
220220
MemSizeMib: firecracker.Int64(defaultMemSizeMb),
221-
HtEnabled: firecracker.Bool(false),
221+
Smt: firecracker.Bool(false),
222222
},
223223
},
224224
expectedStubDriveCount: 2,

0 commit comments

Comments
 (0)