Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A temporary fix for endless close #643

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions internal/imports/imports_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import (
_ "github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanisms/sendfd"
_ "github.com/networkservicemesh/sdk/pkg/networkservice/common/retry"
_ "github.com/networkservicemesh/sdk/pkg/networkservice/common/upstreamrefresh"
_ "github.com/networkservicemesh/sdk/pkg/networkservice/utils/checks/checkclose"
_ "github.com/networkservicemesh/sdk/pkg/tools/awarenessgroups"
_ "github.com/networkservicemesh/sdk/pkg/tools/grpcutils"
_ "github.com/networkservicemesh/sdk/pkg/tools/log"
Expand All @@ -40,5 +41,6 @@ import (
_ "os"
_ "os/signal"
_ "syscall"
_ "testing"
_ "time"
)
9 changes: 6 additions & 3 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Copyright (c) 2021-2022 Doc.ai its affiliates.
//
// Copyright (c) 2023 Cisco and/or its affiliates.
// Copyright (c) 2023-2024 Cisco and/or its affiliates.
//
// SPDX-License-Identifier: Apache-2.0
//
Expand Down Expand Up @@ -29,6 +29,7 @@ import (
"os"
"os/signal"
"syscall"
"testing"
"time"

nested "github.com/antonfisher/nested-logrus-formatter"
Expand All @@ -55,6 +56,7 @@ import (
"github.com/networkservicemesh/sdk/pkg/networkservice/common/mechanisms/sendfd"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/retry"
"github.com/networkservicemesh/sdk/pkg/networkservice/common/upstreamrefresh"
"github.com/networkservicemesh/sdk/pkg/networkservice/utils/checks/checkclose"
"github.com/networkservicemesh/sdk/pkg/tools/awarenessgroups"
"github.com/networkservicemesh/sdk/pkg/tools/grpcutils"
"github.com/networkservicemesh/sdk/pkg/tools/log"
Expand All @@ -80,8 +82,8 @@ type Config struct {
MetricsExportInterval time.Duration `default:"10s" desc:"interval between mertics exports" split_words:"true"`

LivenessCheckEnabled bool `default:"true" desc:"Dataplane liveness check enabled/disabled"`
LivenessCheckInterval time.Duration `default:"1200ms" desc:"Dataplane liveness check interval"`
LivenessCheckTimeout time.Duration `default:"1s" desc:"Dataplane liveness check timeout"`
LivenessCheckInterval time.Duration `default:"700ms" desc:"Dataplane liveness check interval"`
LivenessCheckTimeout time.Duration `default:"500ms" desc:"Dataplane liveness check timeout"`
}

func main() {
Expand Down Expand Up @@ -215,6 +217,7 @@ func main() {
clientinfo.NewClient(),
upstreamrefresh.NewClient(ctx),
up.NewClient(ctx, vppConn),
checkclose.NewClient(nil, func(t *testing.T, c *networkservice.Connection) { time.Sleep(config.LivenessCheckTimeout) }),
connectioncontext.NewClient(vppConn),
memif.NewClient(ctx, vppConn),
sendfd.NewClient(),
Expand Down
Loading