Skip to content

Commit

Permalink
Revert localbypass fix; Skip NSMgr restored heal
Browse files Browse the repository at this point in the history
Signed-off-by: Artem Belov <artem.belov@xored.com>
  • Loading branch information
Artem Belov committed Mar 18, 2021
1 parent a59af4e commit 651778b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
2 changes: 2 additions & 0 deletions pkg/networkservice/chains/nsmgr/server_heal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
9 changes: 1 addition & 8 deletions pkg/registry/common/localbypass/find_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand All @@ -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)
}
3 changes: 1 addition & 2 deletions pkg/registry/common/localbypass/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
Expand Down

0 comments on commit 651778b

Please sign in to comment.