Bug 1093420 - Add to dnf.conf ip_resolve entry
Add to dnf.conf ip_resolve entry
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: dnf (Show other bugs)
20
Unspecified Unspecified
unspecified Severity low
: ---
: ---
Assigned To: Honza Silhan
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-01 13:20 EDT by Germano Massullo
Modified: 2014-07-08 22:29 EDT (History)
8 users (show)

See Also:
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-08 22:29:48 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Germano Massullo 2014-05-01 13:20:50 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):
dnf-0.4.20-1.fc20.noarch
Comment 1 Ales Kozumplik 2014-05-02 01:41:10 EDT
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 01:43:37 EDT
related: bug 730533
Comment 3 Germano Massullo 2014-05-02 03:08:26 EDT
(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 03:29:41 EDT
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 06:54:35 EDT
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 07:08:58 EDT
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 02:33:32 EDT
Thanks Pavel, that is a very valuable input for us!
Comment 8 Ales Kozumplik 2014-05-27 07:48:48 EDT
Moving to Jan, Jan let's add the config option as it is in Yum.
Comment 9 Honza Silhan 2014-06-24 07:00:11 EDT
The 'ip_resolve' config option (same as in Yum) and '-6'/'-4' cmd option was added.
Comment 10 Fedora Update System 2014-07-07 05:11:37 EDT
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-07 21:03:56 EDT
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-08 22:29:48 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.