Bug 730533

Summary: yum/curl/wget curl#6 - "Couldn't resolve host" error with DNS server that doesn't support ipv6
Product: [Fedora] Fedora Reporter: Koen <koen.schram>
Component: yumAssignee: Seth Vidal <skvidal>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: high Docs Contact:
Priority: unspecified    
Version: 15CC: ffesti, james.antill, koen.schram, maxamillion, pmatilai, tim.lauridsen, zpavlas
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-08-17 06:54:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
as requested : debug output of yum none

Description Koen 2011-08-14 08:01:37 UTC
Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. My home network works with a (legacy) Speedtouch Home/professional router with built in DNS. No ipv6 support.  The DNS looks up local machine and then forwards to an external DNS of my ISP.
2. Fresh install of Fedora 15. Disable ipv6 (/etc/modprobe.d/dist.conf; Firefox/Thunderbird about:config network.dns.disableIPv6 true; /etc/sysconfig/network-scripts; chkconfig ip6tables off)
3.When using de internal (ipv4) DNS all seems to work (Firefox, Thunderbird, ping, nslookup, ...) except yum/wget/curl.  Using a mirror address with wget en explicitly giving the "-4" option works however (which lead me to believe it's a ipv6 DNS problem).
Switching to an external (ipv6) DNS (such as 8.8.8.8) works for all packages, but obviously prevent lookup of local machines.
  
Actual results:
curl#6 - "Couldn't resolve host"

Expected results:
update of yum packages

Additional info:
Found related bugs 548269 and 548396, but seems to be different because I want my internal network on ipv4 (due to legacy).

Comment 1 Zdeněk Pavlas 2011-08-15 14:19:18 UTC
Hi, thanks for the report!  Yum does not support -4 and -6 in yum.conf.
However, you could manually change the urlgrabber's defaults.

/usr/lib/python2.7/site-packages/urlgrabber/grabber.py
-       self.ip_resolve = None
+       self.ip_resolve = 'ipv4'

But there's something wrong in your setup, as curl should not exit with ERR#6, but fall back IPv4 "A" records.  Could you run

# export URLGRABBER_DEBUG=1,debug.txt
# yum update

and attach the debug file?

Comment 2 Koen 2011-08-15 20:46:50 UTC
Created attachment 518339 [details]
as requested : debug output of yum

As requested, herewith the output of de debug.txt

Comment 3 Koen 2011-08-15 20:54:30 UTC
(In reply to comment #2)
> Created attachment 518339 [details]
> as requested : debug output of yum
> 
> As requested, herewith the output of de debug.txt

Thank you very much for your quick reply.  The trick in /usr/lib/python2.7/site-packages/urlgrabber/grabber.py does indeed solve the initial problem.  I have no idea why curl exits with ERR#6.  If it is of any help, I could attach the new debug file ?

Comment 4 Zdeněk Pavlas 2011-08-17 06:54:40 UTC
The upstream yum now supports 'ip_resolve' option in yum.conf, so just set 'ip_resolve = ipv4' there.  Fixed in upstream, closing.