Skip to content

Commit

Permalink
fix CI error
Browse files Browse the repository at this point in the history
Signed-off-by: abushwang <[email protected]>
  • Loading branch information
wswsmao committed Dec 11, 2024
1 parent 0b5689f commit 80cee15
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 11 deletions.
4 changes: 4 additions & 0 deletions cmd/containerd-stargz-grpc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,10 @@ func main() {
log.G(ctx).WithError(err).Fatalf("failed to serve snapshotter")
}

// TODO: In detach mode, rs is taken over by fusemanager,
// but client will send unmount request to fusemanager,
// and fusemanager need get mount info from local db to
// determine its behavior
if cleanup {
log.G(ctx).Debug("Closing the snapshotter")
rs.Close()
Expand Down
10 changes: 5 additions & 5 deletions cmd/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,19 +14,22 @@ require (
github.com/coreos/go-systemd/v22 v22.5.0
github.com/docker/go-metrics v0.0.1
github.com/goccy/go-json v0.10.3
github.com/gogo/protobuf v1.3.2
github.com/hashicorp/go-multierror v1.1.1
github.com/klauspost/compress v1.17.11
github.com/moby/sys/mountinfo v0.7.2
github.com/opencontainers/go-digest v1.0.0
github.com/opencontainers/image-spec v1.1.0
github.com/opencontainers/runtime-spec v1.2.0
github.com/pelletier/go-toml v1.9.5
github.com/pkg/errors v0.9.1
github.com/rs/xid v1.6.0
github.com/sirupsen/logrus v1.9.3
github.com/urfave/cli/v2 v2.27.5
go.etcd.io/bbolt v1.3.11
golang.org/x/sync v0.9.0
golang.org/x/sys v0.26.0
google.golang.org/grpc v1.68.0
k8s.io/cri-api v0.32.0-alpha.0
)

require (
Expand Down Expand Up @@ -65,7 +68,6 @@ require (
github.com/go-openapi/jsonreference v0.20.2 // indirect
github.com/go-openapi/swag v0.22.4 // indirect
github.com/godbus/dbus/v5 v5.1.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/gnostic-models v0.6.8 // indirect
Expand All @@ -88,7 +90,6 @@ require (
github.com/minio/sha256-simd v1.0.1 // indirect
github.com/mitchellh/go-homedir v1.1.0 // indirect
github.com/moby/locker v1.0.1 // indirect
github.com/moby/sys/mountinfo v0.7.2 // indirect
github.com/moby/sys/sequential v0.6.0 // indirect
github.com/moby/sys/signal v0.7.1 // indirect
github.com/moby/sys/symlink v0.3.0 // indirect
Expand All @@ -107,13 +108,11 @@ require (
github.com/opencontainers/runtime-tools v0.9.1-0.20221107090550-2e043c6bd626 // indirect
github.com/opencontainers/selinux v1.11.1 // indirect
github.com/pelletier/go-toml/v2 v2.2.3 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_golang v1.20.5 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/russross/blackfriday/v2 v2.1.0 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/spaolacci/murmur3 v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
Expand Down Expand Up @@ -141,6 +140,7 @@ require (
k8s.io/api v0.31.2 // indirect
k8s.io/apimachinery v0.31.2 // indirect
k8s.io/client-go v0.31.2 // indirect
k8s.io/cri-api v0.32.0-alpha.0 // indirect
k8s.io/klog/v2 v2.130.1 // indirect
k8s.io/kube-openapi v0.0.0-20240228011516-70dd3763d340 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
Expand Down
14 changes: 8 additions & 6 deletions cmd/stargz-fuse-manager/fusemanager/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"github.com/containerd/log"
"google.golang.org/grpc"
"google.golang.org/grpc/backoff"
"google.golang.org/grpc/credentials/insecure"

pb "github.com/containerd/stargz-snapshotter/cmd/stargz-fuse-manager/fusemanager/api"
"github.com/containerd/stargz-snapshotter/snapshot"
Expand Down Expand Up @@ -60,17 +61,18 @@ func newClient(ctx context.Context, socket string) (pb.StargzFuseManagerServiceC
connParams := grpc.ConnectParams{
Backoff: backoff.DefaultConfig,
}

gopts := []grpc.DialOption{
grpc.WithBlock(),
grpc.WithInsecure(),
grpc.FailOnNonTempDialError(true),
grpc.WithTransportCredentials(insecure.NewCredentials()),
grpc.WithConnectParams(connParams),
grpc.WithContextDialer(dialer.ContextDialer),
grpc.WithDefaultCallOptions(grpc.MaxCallRecvMsgSize(defaults.DefaultMaxRecvMsgSize)),
grpc.WithDefaultCallOptions(grpc.MaxCallSendMsgSize(defaults.DefaultMaxSendMsgSize)),
grpc.WithDefaultCallOptions(
grpc.MaxCallRecvMsgSize(defaults.DefaultMaxRecvMsgSize),
grpc.MaxCallSendMsgSize(defaults.DefaultMaxSendMsgSize),
),
}

conn, err := grpc.DialContext(ctx, fmt.Sprintf("unix://%s", socket), gopts...)
conn, err := grpc.NewClient(fmt.Sprintf("unix://%s", socket), gopts...)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 80cee15

Please sign in to comment.