-
Type: Task
-
Resolution: Gone away
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Connection String
-
None
Problem Statement/Rationale
Connecting to an existing atlas instance from our k8s cluster failed and thrown AuthenticationFailed exception.
Steps to Reproduce
Have a k8s cluster; where DNS is configured with ndots: 5 and attempt to connect it using pymongo and dnspython2.
Expected Results
It should be able to connect to the atlas instance.
Actual Results
It fails with AuthenticationFailed exception as the TXT record is not found and connection string is not parsed.
Additional Notes
After checking, I noticed that PyMongo / DNSPython only tried the first possible QNAME which includes the search domain. It should try all possible QNAMEs.
Here's the QNAMEs that it tried:
[<DNS name REDACTED-staging.REACTED.mongodb.net.NAMESPACE.svc.cluster.local.>, <DNS name REDACTED-staging.REDACTED.mongodb.net.svc.cluster.local.>, <DNS name REDACTED-staging.REDACTED.mongodb.net.cluster.local.>, <DNS name REDACTED-staging.REDACTED.mongodb.net.>]
SRV records resolving should have the same bug. However it contains 5 dots and and DNSPython doesn't try the search domain at first. So it works.
[<DNS name _mongodb._tcp.REDACTED-staging.REDACTED.mongodb.net.>, <DNS name _mongodb._tcp.REDACTED-staging.REDACTED.mongodb.net.NAMESPACE.svc.cluster.local.>, <DNS name _mongodb._tcp.REDACTED-staging.REDACTED.mongodb.net.svc.cluster.local.>, <DNS name _mongodb._tcp.REDACTED-staging.REDACTED.mongodb.net.cluster.local.>]
- is related to
-
DRIVERS-2521 DNS handling for non-default ndots configurations
- Backlog
- related to
-
MONGOSH-1156 Mongosh does not understand FQDN
- Closed