From: me@... Date: 2016-06-23T08:28:25+00:00 Subject: [ruby-core:76117] [Ruby trunk Bug#11152] Resolv::DNS should use Search Domains provided in /etc/resolv.conf by default Issue #11152 has been updated by Micke Lisinge. Aaron Patterson wrote: > Hi, > > It should parse your `/etc/resolv.conf` file. Can you post your `/etc/resolv.conf`? Maybe it's a problem with the parser. I am seeing the same problem, tested with Ruby 2.2.5 and 2.3.1. My code is running on a [kubernetes](http://kubernetes.io/) cluster with docker just like David's. This is the resolv.conf and David's probably looks the same: ~~~ search staging.svc.cluster.local svc.cluster.local cluster.local c.foo-project.internal. google.internal. nameserver 10.7.240.10 options ndots:5 ~~~ ---------------------------------------- Bug #11152: Resolv::DNS should use Search Domains provided in /etc/resolv.conf by default https://bugs.ruby-lang.org/issues/11152#change-59322 * Author: David Aronchick * Status: Feedback * Priority: Normal * Assignee: * ruby -v: * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- For some reason Resolv::DNS does not use search domains. Many downstream projects rely on Resolv, and this appears broken. I'm showing this below in Kubernetes, but it's based on the search domain(s), rather than a cluster issue. ~~~ [1] pry(main)> require 'resolv' => true [2] pry(main)> Resolv::DNS.new.getaddresses('client') => [] [3] pry(main)> nameservers = ["10.0.0.10", "169.254.169.254", "10.240.0.1"] [4] pry(main)> search_domains = ["default.kubernetes.local", "kubernetes.local", "c.bar-foobar-91020.internal.", "55618245300.google.internal.", "google.internal."] [5] pry(main)> a = Resolv::DNS.new(:nameserver => nameservers, :search => search_domains) [...output...] [6] pry(main)> a.getaddresses('client') => [#] ~~~ -- https://bugs.ruby-lang.org/ Unsubscribe: