Red Hat Bugzilla – Bug 1093420
Add to dnf.conf ip_resolve entry
Last modified: 2014-07-08 22:29:48 EDT
Description of problem:
yum.conf allows the user to choice if it must connect to ipv4 or ipv6 hosts.
From yum.conf man:
ip_resolve Determines how yum resolves host names.
`4' or `IPv4': resolve to IPv4 addresses only.
`6' or `IPv6': resolve to IPv6 addresses only.
it would be great to have it in dnf.conf too.
Version-Release number of selected component (if applicable):
Germano, it would be interesting to know what exact issue you are hitting with DNF's way of resolving?
Outlook for this bug: do not expose ip_resolve or similar setting, instead automatically try ipv6 and then ipv4 resolving, just like any other network client does.
related: bug 730533
(In reply to Ales Kozumplik from comment #1)
> Germano, it would be interesting to know what exact issue you are hitting
> with DNF's way of resolving?
My router has both IPv4 and IPv6 stack. They are two separate internet connections. The IPv4 internet connection is faster than the IPv6 internet connection.
The computer, on the same ethernet interface has two IP addresses: one for IPv4, one for IPv6.
DNF and YUM sometimes choice to connect to an IPv4 host, sometimes choice to connect to an IPv6 host. I need to force them to connect to only IPv4 hosts. In YUM I did that by adding ip_resolve=4 in file /etc/yum.conf , in DNF I could not do that because in dnf.conf man page I haven't seen such setting.
To me, this really sounds like something that the networking infrastructure of the distribution should have a setting for. Let's ask jklimes, one of the NM maintainers: Jiri, is there a setting somewhere (in NetworkManager preferably) to tell the resolving routines to prefer ipv4 over ipv6 whenever possible?
Talked to Jiri in person today, he says to ask Pavel. Pavel, would you have an answer/opinion to comment 4?
many tools (including curl an the like) allow you to resolve in dualstack manner (default), ipv4-only and ipv6-only. Utilities typically do it by allowing '-4' and '-6' in the command line. It's pretty much convenient for testing and it's a convenient workaround for people experimenting with their networks.
As dnf/yum is expected to be the main tool for installing packages, I would expect it to provide those two command-line options so that you can install software easily when there's a network problem. Tools like 'ssh' have such an option.
I doubt we need a long-term switch in the configuration, as people should instead fix their connectivity. Anyone can configure /etc/gai.conf to prefer IPv4 globally if that is what they wish. If the command-line switch is present, anyone can set up a bash alias for that.
I'm working on a resolver library where you could tweak this on the command-line. If that was already in common use, the issue would not exist. But that's unfortunately not the case.
Thanks Pavel, that is a very valuable input for us!
Moving to Jan, Jan let's add the config option as it is in Yum.
The 'ip_resolve' config option (same as in Yum) and '-6'/'-4' cmd option was added.
dnf-plugins-core-0.1.1-2.fc20, dnf-0.5.3-1.fc20, hawkey-0.4.17-1.fc20 has been submitted as an update for Fedora 20.
Package dnf-plugins-core-0.1.1-2.fc20, dnf-0.5.3-1.fc20, hawkey-0.4.17-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dnf-plugins-core-0.1.1-2.fc20 dnf-0.5.3-1.fc20 hawkey-0.4.17-1.fc20'
as soon as you are able to.
Please go to the following url:
then log in and leave karma (feedback).
dnf-plugins-core-0.1.1-2.fc20, dnf-0.5.3-1.fc20, hawkey-0.4.17-1.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report.