From 651778bafb7a7f878329a56d4f127bc878caad24 Mon Sep 17 00:00:00 2001 From: Artem Belov Date: Thu, 18 Mar 2021 12:12:19 +0700 Subject: [PATCH] Revert localbypass fix; Skip NSMgr restored heal Signed-off-by: Artem Belov --- pkg/networkservice/chains/nsmgr/server_heal_test.go | 2 ++ pkg/registry/common/localbypass/find_server.go | 9 +-------- pkg/registry/common/localbypass/server.go | 3 +-- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/pkg/networkservice/chains/nsmgr/server_heal_test.go b/pkg/networkservice/chains/nsmgr/server_heal_test.go index 0dd400d5b0..c6af09585a 100644 --- a/pkg/networkservice/chains/nsmgr/server_heal_test.go +++ b/pkg/networkservice/chains/nsmgr/server_heal_test.go @@ -261,6 +261,8 @@ func testNSMGRHealForwarder(t *testing.T, nodeNum int, restored bool, customConf } func TestNSMGR_HealRemoteNSMgrRestored(t *testing.T) { + t.Skip("https://github.com/networkservicemesh/sdk/issues/770") + nsmgrCtx, nsmgrCtxCancel := context.WithTimeout(context.Background(), time.Second) defer nsmgrCtxCancel() diff --git a/pkg/registry/common/localbypass/find_server.go b/pkg/registry/common/localbypass/find_server.go index 9376243c74..ba4a0c6309 100644 --- a/pkg/registry/common/localbypass/find_server.go +++ b/pkg/registry/common/localbypass/find_server.go @@ -17,16 +17,13 @@ package localbypass import ( - "errors" - "github.com/networkservicemesh/api/pkg/api/registry" "github.com/networkservicemesh/sdk/pkg/tools/stringurl" ) type localBypassNSEFindServer struct { - nseURLs *stringurl.Map - nsmgrURL string + nseURLs *stringurl.Map registry.NetworkServiceEndpointRegistry_FindServer } @@ -35,9 +32,5 @@ func (s *localBypassNSEFindServer) Send(endpoint *registry.NetworkServiceEndpoin if u, ok := s.nseURLs.Load(endpoint.Name); ok { endpoint.Url = u.String() } - if endpoint.Url == s.nsmgrURL { - return errors.New("NSMgr found unregistered endpoint") - } - return s.NetworkServiceEndpointRegistry_FindServer.Send(endpoint) } diff --git a/pkg/registry/common/localbypass/server.go b/pkg/registry/common/localbypass/server.go index ffed14f123..89b84cda80 100644 --- a/pkg/registry/common/localbypass/server.go +++ b/pkg/registry/common/localbypass/server.go @@ -73,8 +73,7 @@ func (s *localBypassNSEServer) Find(query *registry.NetworkServiceEndpointQuery, func (s *localBypassNSEServer) findServer(server registry.NetworkServiceEndpointRegistry_FindServer) registry.NetworkServiceEndpointRegistry_FindServer { return &localBypassNSEFindServer{ - nseURLs: &s.nseURLs, - nsmgrURL: s.url, + nseURLs: &s.nseURLs, NetworkServiceEndpointRegistry_FindServer: server, } }