kubernetes / cloud-provider-openstack

Apache License 2.0
619 stars 610 forks source link

Openstack cloud controller manager sends external DNS queries to resolve openstack at an interval of 5minutes #1718

Closed amshankaran closed 2 years ago

amshankaran commented 2 years ago

Is this a BUG REPORT or FEATURE REQUEST?:

Uncomment only one, leave it on its own line:

/kind bug /kind feature

What happened: OCCM sends 2 external DNS queries to resolve openstack at an interval of 5 minutes. number of queries generated = 2 * number of nodes in the cluster (in my cluster with 6 nodes 24 queries, 12 A queries 12 AAAA queries)

What you expected to happen: Why these DNS queries were generated? I don't see any parameter defines 5 minutes except "--node-status-update-frequency". Are these queries generated to get the node status from openstack. I could see the first query itself getting resolved (response received), then why do we need the second query? Is there any parameter defines the number of queries?

How to reproduce it:

Anything else we need to know?:

Environment:

jichenjc commented 2 years ago

@lingxiankong do you happen to know the answer?

lingxiankong commented 2 years ago

Could you please provide some logs?

amshankaran commented 2 years ago

dns packet capture Please find the attached dns packet capture. I don't have logs now, I'll collect and share the same for the openstack-cloud-controller-manager pods. If any other logs requires do let me know

amshankaran commented 2 years ago

openstack-cloud-controller-manager-t9dr8-pod.log

@lingxiankong please find the attached log

amshankaran commented 2 years ago

Hi Is there any update on this ticket?

lingxiankong commented 2 years ago

Hi @amshankaran thanks for providing the logs. From the log, I assume the domain name in the DNS queries is your OpenStack Keystone service endpoint. The k8s cloud controller manager has a component to periodically synchronize the node status (especially the node addresses) from OpenStack, the default interval is 5m, as you can see from the log, --node-status-update-frequency="5m0s". To verify, you can change --v=4 in OCCM container command to see the API interactions.

amshankaran commented 2 years ago

Hi @lingxiankong, thanks for your clarification. just one more information required, I could see the first query itself getting resolved (response received), then why do we need the second query? Is there any parameter defines the number of queries (as 2)?

lingxiankong commented 2 years ago

What do you mean by the second query? Have you checked the debug log of openstack-cloud-controller-manager?

amshankaran commented 2 years ago

log_v_6.txt Hi @lingxiankong, As I mentioned in the bug description, i could see 24 DNS queries. (My cluster has 6 nodes), 12 A queries 12 AAAA queries. So 2 A queries and 2 AAAA queries for one node. (check the packet capture image attached) Please find the attached log. I could see two GET requests. One for the instance another one for the os_interface. Is this as per design? Will it create two DNS request?

lingxiankong commented 2 years ago

One for the instance another one for the os_interface

Yes.

Will it create two DNS request?

AFAIK, this is the default behavior of dual-protocol DNS queries.

lingxiankong commented 2 years ago

Close this issue as per my reply.

/close

k8s-ci-robot commented 2 years ago

@lingxiankong: Closing this issue.

In response to [this](https://github.com/kubernetes/cloud-provider-openstack/issues/1718#issuecomment-1088096063): >Close this issue as per my reply. > >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.