Bug 1093420

Summary: Add to dnf.conf ip_resolve entry
Product: [Fedora] Fedora Reporter: Germano Massullo <germano.massullo>
Component: dnfAssignee: Honza Silhan <jsilhan>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 20CC: akozumpl, germano.massullo, jklimes, jsilhan, pnemade, psimerda, rholy, tim.lauridsen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dnf-plugins-core-0.1.1-2.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-07-09 02:29:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Germano Massullo 2014-05-01 17:20:50 UTC
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):
dnf-0.4.20-1.fc20.noarch

Comment 1 Ales Kozumplik 2014-05-02 05:41:10 UTC
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.

Comment 2 Ales Kozumplik 2014-05-02 05:43:37 UTC
related: bug 730533

Comment 3 Germano Massullo 2014-05-02 07:08:26 UTC
(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.

Comment 4 Ales Kozumplik 2014-05-02 07:29:41 UTC
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?

Comment 5 Ales Kozumplik 2014-05-09 10:54:35 UTC
Talked to Jiri in person today, he says to ask Pavel. Pavel, would you have an answer/opinion to comment 4?

Comment 6 Pavel Šimerda (pavlix) 2014-05-09 11:08:58 UTC
Hi Aleš,

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.

Cheers,

Pavel

Comment 7 Ales Kozumplik 2014-05-12 06:33:32 UTC
Thanks Pavel, that is a very valuable input for us!

Comment 8 Ales Kozumplik 2014-05-27 11:48:48 UTC
Moving to Jan, Jan let's add the config option as it is in Yum.

Comment 9 Honza Silhan 2014-06-24 11:00:11 UTC
The 'ip_resolve' config option (same as in Yum) and '-6'/'-4' cmd option was added.

Comment 10 Fedora Update System 2014-07-07 09:11:37 UTC
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.
https://admin.fedoraproject.org/updates/dnf-0.5.3-1.fc20,hawkey-0.4.17-1.fc20,dnf-plugins-core-0.1.1-2.fc20

Comment 11 Fedora Update System 2014-07-08 01:03:56 UTC
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:
https://admin.fedoraproject.org/updates/FEDORA-2014-8167/dnf-0.5.3-1.fc20,hawkey-0.4.17-1.fc20,dnf-plugins-core-0.1.1-2.fc20
then log in and leave karma (feedback).

Comment 12 Fedora Update System 2014-07-09 02:29:48 UTC
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.