RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1332418 - "/etc/resolv.conf" generated by dracut may contain duplicated DNS items
Summary: "/etc/resolv.conf" generated by dracut may contain duplicated DNS items
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: dracut
Version: 7.3
Hardware: Unspecified
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Lukáš Nykrýn
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks: 1279685
TreeView+ depends on / blocked
 
Reported: 2016-05-03 07:29 UTC by Xunlei Pang
Modified: 2016-11-04 08:05 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-11-04 08:05:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2530 0 normal SHIPPED_LIVE dracut bug fix and enhancement update 2016-11-03 14:17:01 UTC

Description Xunlei Pang 2016-05-03 07:29:12 UTC
Description of problem:
When passing DNS to dracut via "nameserver=x.x.x.x",
the dns provided may be duplicated, so there can be duplicated DNS items in the "/etc/resolv.conf".


Version-Release number of selected component (if applicable):
kexec-tools-2.0.7-38

How reproducible:


Steps to Reproduce:
1. In static network environment, pass the same DNS to dracut via nameserver=x.x.x.x" several times through "/proc/cmdline" or other ways like specified using directive DNS1/DNS2 in "/etc/sysconfig/network-scripts/ifcfg-<config>".

2. Configure /etc/kdump.conf to use network dump target(either nfs or ssh)
   Configure /etc/kdump.conf to enable "default shell". 
   kdumpctl restart

3. After crash, let the kdump progress fail(for example: shutdown remote network), then it will enter a shell. 

4. In the shell, "cat /etc/resolv.conf", and will find the duplicated DNS items passed in 1).


Actual results:


Expected results:
"/etc/resolv.conf" generated by dracut doesn't contain duplicated DNS items passed through "nameserver=x.x.x.x".

Additional info:
"/etc/resolv.conf" have some restrictions on the number of DNS items
effective, so it'd be better that this file contains no duplicated DNS items.

Comment 1 Xunlei Pang 2016-05-03 07:30:30 UTC
There is a patch("network/net-lib.sh: delete duplicated DNS items from "/etc/resolv.conf") posted:
https://github.com/dracutdevs/dracut/compare/master...dracut-mailing-devs:1461665111-7385-2-git-send-email-xlpang%40redhat.com

Comment 4 Harald Hoyer 2016-07-21 08:54:52 UTC
https://errata.devel.redhat.com/advisory/24112

dracut-033.436.el7 already contains:

commit a3204225884ba63aee94db345d5c38f1c872d6b7
Author: Xunlei Pang <xlpang>
Date:   Tue Apr 26 18:05:11 2016 +0800

    network/net-lib.sh: delete duplicated DNS items from "/etc/resolv.conf"

Comment 6 Jan Stodola 2016-08-09 08:18:29 UTC
Reproduced with RHEL-7.2 GA.
Verified on RHEL-7.3 Alpha with dracut-033-450.el7, duplicate nameservers are not present in /etc/resolv.conf created by dracut.

Moving to VERIFIED.

Comment 8 errata-xmlrpc 2016-11-04 08:05:14 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2530.html


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