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

qfix: DNSNSEResolve server should correctly translate NSE for floating side and for querying side #1027

Merged

Conversation

denis-tingaikin
Copy link
Member

@denis-tingaikin denis-tingaikin commented Jul 17, 2021

Signed-off-by: Denis Tingaikin denis.tingajkin@xored.com

Description

Problem scenario:

  1. NSE "nse-1@floating" registers in the floating domain with labels: "ns-1@floating" : {"app": "myapp"}.
  2. NSE "nse" registered in floating registry with labels: "ns-1@floating" : {"app": "myapp"}
  3. Call Find request "nse-1@floaing" on local registry.

Actual: Returned nse-1 with labels: "ns-1@floating" : {"app": "myapp"}
Expected: Returned nse-1@floating with labels: "ns-1@floaitng" : {"app": "myapp"}

How Has This Been Tested?

  • Added unit testing to cover
  • Tested manually
  • Tested by integration testing
  • Have not tested

Types of changes

  • Bug fix
  • New functionallity
  • Documentation
  • Refactoring
  • CI

Signed-off-by: Denis Tingaikin <denis.tingajkin@xored.com>
@edwarnicke
Copy link
Member

I'm a little confused... we is something registering in domain @floating showing up in our local registry as a local ns?

@denis-tingaikin
Copy link
Member Author

denis-tingaikin commented Jul 17, 2021

@edwarnicke Its about using Find on local registry with interdomain queries.

For example,

Use-case:

  1. Register NSE (note: actually we register NSE in floating registry)
NSE{
  name: "nse-1@floating"
  labels: "ns-1@floating": {"label1": label2}
}
  1. Call find nse-1@floating

Actual response:

NSE{
  name: "nse-1"
  labels: "ns-1@floating": {"label1": label2}
}

Expected response:

NSE{
  name: "nse-1"
  labels: "ns-1": {"label1": label2}
}

This patch makes actual = expected.

@edwarnicke
Copy link
Member

Your actual response is what I would have expected... why do you expect the response to clip the domain out of a label?

@denis-tingaikin
Copy link
Member Author

denis-tingaikin commented Jul 17, 2021

By my view it could affect discover chain element, because it will not able to match ns by labels.

@edwarnicke
Copy link
Member

@denis-tingaikin Could you say more about that, I don't see it... the ns you are looking for is ns-1@floating ... you aren't looking for ns-1 in your local registry... that's a different ns...

@denis-tingaikin denis-tingaikin marked this pull request as draft July 17, 2021 17:02
Signed-off-by: denis-tingajkin <denis.tingajkin@xored.com>
@denis-tingaikin denis-tingaikin changed the title qfix: NSE labels could be missed on DNS NSE resolving in registry-proxy-dns qfix: DNS Resolver NAME server should able to translate NSE for floating domain and for querying side Jul 18, 2021
@denis-tingaikin
Copy link
Member Author

denis-tingaikin commented Jul 18, 2021

@edwarnicke Many thanks for the internal clarification. I've provided a patch that makes the next behavior for floating registry queries from the client side of local registry.

Untitled Diagram (1)

@denis-tingaikin denis-tingaikin marked this pull request as ready for review July 18, 2021 09:47
@denis-tingaikin denis-tingaikin changed the title qfix: DNS Resolver NAME server should able to translate NSE for floating domain and for querying side qfix: DNSNSEResolve server should able to translate NSE for floating domain and for querying side Jul 18, 2021
@denis-tingaikin denis-tingaikin changed the title qfix: DNSNSEResolve server should able to translate NSE for floating domain and for querying side qfix: DNSNSEResolve server should correctly translate NSE for floating side and for querying side Jul 18, 2021
@edwarnicke edwarnicke merged commit b086a10 into networkservicemesh:main Jul 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants