Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-34563

Connect via SRV record fails if the returned record resides in subdomain

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.6, 4.0.1, 4.1.1
    • Affects Version/s: 3.6.3
    • Component/s: Networking
    • None
    • Environment:
      Debian GNU/Linux buster/sid
      GKE k8s 1.9.4
      non-privileged
    • Fully Compatible
    • v4.0, v3.6
    • Platforms 2018-06-18, Platforms 2018-07-02
    • 67

      Kubernetes supports DNS SRV (service) records for named ports
      For each named port the record in following format is created:* _portname._protocol.service.namespace.svc.cluster.local*
      There is service:mongodb in namespace:default with protocol:tcp and portname:mongodb
      The service endpoint is statefulset:mongodb with instances mongodb-[0...9]
      For each of the instances the following resource record is created
      _mongodb._tcp.mongodb.default.svc.cluster.local service = 10 100 27017 mongodb-N.mongodb.default.svc.cluster.local. <-- A record that resolves to the IP of the instance itself.

      As we can see the host resides in the service subdomain and the software throws an error.
      Besides that it doesnt allow to connect to top-level domain resources requiring the address url must have at least 3 hostname components separated by dots ('.')

        1. bug.jpg
          bug.jpg
          251 kB

            Assignee:
            adam.martin@mongodb.com ADAM Martin (Inactive)
            Reporter:
            alexeremenko Alexey Eremenko
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: