-
Notifications
You must be signed in to change notification settings - Fork 36
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
Always add initial client DNS config to request #1316
Merged
denis-tingaikin
merged 10 commits into
networkservicemesh:main
from
NikitaSkrynnik:fix-dns-config
Jul 4, 2022
Merged
Always add initial client DNS config to request #1316
denis-tingaikin
merged 10 commits into
networkservicemesh:main
from
NikitaSkrynnik:fix-dns-config
Jul 4, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
Comment on lines
87
to
91
v, _ := metadata.Map(ctx, true).LoadOrStore(dnsContextClientRefreshKey, request.Connection.Context.DnsContext.Configs) | ||
initialClientDNSConfigs := v.([]*networkservice.DNSConfig) | ||
|
||
initialClientDNSConfigs = append(initialClientDNSConfigs, c.resolvconfDNSConfig) | ||
request.Connection.Context.DnsContext.Configs = initialClientDNSConfigs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suggested change
v, _ := metadata.Map(ctx, true).LoadOrStore(dnsContextClientRefreshKey, request.Connection.Context.DnsContext.Configs) | |
initialClientDNSConfigs := v.([]*networkservice.DNSConfig) | |
initialClientDNSConfigs = append(initialClientDNSConfigs, c.resolvconfDNSConfig) | |
request.Connection.Context.DnsContext.Configs = initialClientDNSConfigs | |
initialClientDNSConfigs, _ := metadata.Map(ctx, true).LoadOrStore(dnsContextClientRefreshKey, request.Connection.Context.DnsContext.Configs) | |
request.Connection.Context.DnsContext.Configs = append(initialClientDNSConfigs.([]*networkservice.DNSConfig,c.resolvconfDNSConfig) |
Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com>
denis-tingaikin
approved these changes
Jul 4, 2022
nsmbot
pushed a commit
to networkservicemesh/sdk-kernel
that referenced
this pull request
Jul 4, 2022
…k@main PR link: networkservicemesh/sdk#1316 Commit: 6cf1b72 Author: Nikita Skrynnik Date: 2022-07-04 23:12:45 +1100 Message: - Always add initial client DNS config to request (#1316) * always add initial client DNS config to request Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix test Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add proper join for resolvconf and client DNS configs Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * save initial client dns configs in dnsContextClient Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * cleanup Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply comments Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot
pushed a commit
to networkservicemesh/cmd-nse-remote-vlan
that referenced
this pull request
Jul 4, 2022
…k@main PR link: networkservicemesh/sdk#1316 Commit: 6cf1b72 Author: Nikita Skrynnik Date: 2022-07-04 23:12:45 +1100 Message: - Always add initial client DNS config to request (#1316) * always add initial client DNS config to request Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix test Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add proper join for resolvconf and client DNS configs Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * save initial client dns configs in dnsContextClient Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * cleanup Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply comments Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot
pushed a commit
to networkservicemesh/cmd-admission-webhook-k8s
that referenced
this pull request
Jul 4, 2022
…k@main PR link: networkservicemesh/sdk#1316 Commit: 6cf1b72 Author: Nikita Skrynnik Date: 2022-07-04 23:12:45 +1100 Message: - Always add initial client DNS config to request (#1316) * always add initial client DNS config to request Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix test Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add proper join for resolvconf and client DNS configs Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * save initial client dns configs in dnsContextClient Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * cleanup Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply comments Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot
pushed a commit
to networkservicemesh/cmd-nsmgr-proxy
that referenced
this pull request
Jul 4, 2022
…k@main PR link: networkservicemesh/sdk#1316 Commit: 6cf1b72 Author: Nikita Skrynnik Date: 2022-07-04 23:12:45 +1100 Message: - Always add initial client DNS config to request (#1316) * always add initial client DNS config to request Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix test Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add proper join for resolvconf and client DNS configs Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * save initial client dns configs in dnsContextClient Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * cleanup Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply comments Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot
pushed a commit
to networkservicemesh/cmd-registry-proxy-dns
that referenced
this pull request
Jul 4, 2022
…k@main PR link: networkservicemesh/sdk#1316 Commit: 6cf1b72 Author: Nikita Skrynnik Date: 2022-07-04 23:12:45 +1100 Message: - Always add initial client DNS config to request (#1316) * always add initial client DNS config to request Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix test Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add proper join for resolvconf and client DNS configs Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * save initial client dns configs in dnsContextClient Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * cleanup Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply comments Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot
pushed a commit
to networkservicemesh/cmd-ipam-vl3
that referenced
this pull request
Jul 4, 2022
…k@main PR link: networkservicemesh/sdk#1316 Commit: 6cf1b72 Author: Nikita Skrynnik Date: 2022-07-04 23:12:45 +1100 Message: - Always add initial client DNS config to request (#1316) * always add initial client DNS config to request Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix test Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add proper join for resolvconf and client DNS configs Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * save initial client dns configs in dnsContextClient Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * cleanup Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply comments Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot
pushed a commit
to networkservicemesh/cmd-nsmgr
that referenced
this pull request
Jul 4, 2022
…k@main PR link: networkservicemesh/sdk#1316 Commit: 6cf1b72 Author: Nikita Skrynnik Date: 2022-07-04 23:12:45 +1100 Message: - Always add initial client DNS config to request (#1316) * always add initial client DNS config to request Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix test Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add proper join for resolvconf and client DNS configs Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * save initial client dns configs in dnsContextClient Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * cleanup Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply comments Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot
pushed a commit
to networkservicemesh/cmd-nse-vfio
that referenced
this pull request
Jul 4, 2022
…k@main PR link: networkservicemesh/sdk#1316 Commit: 6cf1b72 Author: Nikita Skrynnik Date: 2022-07-04 23:12:45 +1100 Message: - Always add initial client DNS config to request (#1316) * always add initial client DNS config to request Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix test Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add proper join for resolvconf and client DNS configs Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * save initial client dns configs in dnsContextClient Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * cleanup Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply comments Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot
pushed a commit
to networkservicemesh/cmd-map-ip-k8s
that referenced
this pull request
Jul 4, 2022
…k@main PR link: networkservicemesh/sdk#1316 Commit: 6cf1b72 Author: Nikita Skrynnik Date: 2022-07-04 23:12:45 +1100 Message: - Always add initial client DNS config to request (#1316) * always add initial client DNS config to request Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix test Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add proper join for resolvconf and client DNS configs Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * save initial client dns configs in dnsContextClient Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * cleanup Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply comments Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot
pushed a commit
to networkservicemesh/sdk-k8s
that referenced
this pull request
Jul 4, 2022
…k@main PR link: networkservicemesh/sdk#1316 Commit: 6cf1b72 Author: Nikita Skrynnik Date: 2022-07-04 23:12:45 +1100 Message: - Always add initial client DNS config to request (#1316) * always add initial client DNS config to request Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix test Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add proper join for resolvconf and client DNS configs Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * save initial client dns configs in dnsContextClient Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * cleanup Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply comments Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
nsmbot
pushed a commit
to networkservicemesh/cmd-nsc-init
that referenced
this pull request
Jul 4, 2022
…k@main PR link: networkservicemesh/sdk#1316 Commit: 6cf1b72 Author: Nikita Skrynnik Date: 2022-07-04 23:12:45 +1100 Message: - Always add initial client DNS config to request (#1316) * always add initial client DNS config to request Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix test Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add proper join for resolvconf and client DNS configs Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * save initial client dns configs in dnsContextClient Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * cleanup Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply comments Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
This was referenced Jul 4, 2022
nsmbot
pushed a commit
to networkservicemesh/cmd-registry-memory
that referenced
this pull request
Jul 4, 2022
…k@main PR link: networkservicemesh/sdk#1316 Commit: 6cf1b72 Author: Nikita Skrynnik Date: 2022-07-04 23:12:45 +1100 Message: - Always add initial client DNS config to request (#1316) * always add initial client DNS config to request Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix test Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * add proper join for resolvconf and client DNS configs Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * save initial client dns configs in dnsContextClient Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * cleanup Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply review comments Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * fix linter Signed-off-by: Nikita Skrynnik <nikita.skrynnik@xored.com> * apply comments Signed-off-by: NSMBot <nsmbot@networkservicmesh.io>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Nikita Skrynnik nikita.skrynnik@xored.com
Description
Endpoint appends its DNS configs to configs which are already in the connection on first request from a client. Client saves these DNS configs. On Refresh client sends request with saved configs to the endpoint and the endpoint appends its configs again. It leads to duplication of the endpoint's dns configs on refreshes.
Issue link
How Has This Been Tested?
Types of changes