Skip to content

Commit 2721a56

Browse files
Merge pull request #585 from austinvazquez/vsock
refactor: use fc-go-sdk vsock module
2 parents 429ea23 + 48877fd commit 2721a56

File tree

6 files changed

+32
-395
lines changed

6 files changed

+32
-395
lines changed

agent/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ import (
2727
taskAPI "github.com/containerd/containerd/runtime/v2/task"
2828
"github.com/containerd/containerd/sys/reaper"
2929
"github.com/containerd/ttrpc"
30+
"github.com/firecracker-microvm/firecracker-go-sdk/vsock"
3031
"github.com/opencontainers/runc/libcontainer/system"
3132
"github.com/sirupsen/logrus"
3233
"golang.org/x/sync/errgroup"
3334
"golang.org/x/sys/unix"
3435

3536
"github.com/firecracker-microvm/firecracker-containerd/eventbridge"
3637
"github.com/firecracker-microvm/firecracker-containerd/internal/event"
37-
"github.com/firecracker-microvm/firecracker-containerd/internal/vm"
3838

3939
drivemount "github.com/firecracker-microvm/firecracker-containerd/proto/service/drivemount/ttrpc"
4040
ioproxy "github.com/firecracker-microvm/firecracker-containerd/proto/service/ioproxy/ttrpc"
@@ -120,7 +120,7 @@ func main() {
120120
// Run ttrpc over vsock
121121

122122
vsockLogger := log.G(shimCtx).WithField("port", port)
123-
listener, err := vm.VSockListener(shimCtx, vsockLogger, uint32(port))
123+
listener, err := vsock.Listener(shimCtx, vsockLogger, uint32(port))
124124
if err != nil {
125125
log.G(shimCtx).WithError(err).Fatalf("failed to listen to vsock on port %d", port)
126126
}

go.mod

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@ require (
1313
github.com/containerd/typeurl v1.0.2
1414
github.com/containernetworking/cni v1.0.1
1515
github.com/containernetworking/plugins v1.0.1
16-
github.com/firecracker-microvm/firecracker-go-sdk v0.22.1-0.20220214213810-2380785d98b7
16+
github.com/firecracker-microvm/firecracker-go-sdk v0.22.1-0.20220302172044-565c88a871e2
1717
github.com/go-ole/go-ole v1.2.4 // indirect
1818
github.com/gofrs/uuid v3.3.0+incompatible
1919
github.com/gogo/protobuf v1.3.2
2020
github.com/hashicorp/go-multierror v1.1.1
2121
github.com/klauspost/compress v1.13.6 // indirect
22-
github.com/mdlayher/vsock v1.1.0
2322
github.com/miekg/dns v1.1.25
2423
github.com/opencontainers/image-spec v1.0.2-0.20211117181255-693428a734f5
2524
github.com/opencontainers/runc v1.1.0

0 commit comments

Comments
 (0)