Bug 2039541 - Resolv-prepender script duplicating entries
Summary: Resolv-prepender script duplicating entries
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Machine Config Operator
Version: 4.10
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.10.0
Assignee: Ben Nemec
QA Contact: Victor Voronkov
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-01-11 21:54 UTC by Ben Nemec
Modified: 2022-03-12 04:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-12 04:40:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift machine-config-operator pull 2908 0 None open Bug 2039541: Fix duplicate prepender entries in resolv.conf 2022-01-12 21:58:30 UTC
Red Hat Product Errata RHSA-2022:0056 0 None None None 2022-03-12 04:41:06 UTC

Description Ben Nemec 2022-01-11 21:54:10 UTC
Description of problem: When the resolv-prepender runs, it is duplicating the prepended address. For example, when starting from a resolv.conf that looks like:

# Generated by NetworkManager
search ostest.test.metalkube.org
nameserver 8.8.8.8
nameserver 192.168.111.1

we get:
# Generated by KNI resolv prepender NM dispatcher script
search ostest.test.metalkube.org
nameserver 192.168.111.23
nameserver 8.8.8.8
nameserver 192.168.111.23
# nameserver 192.168.111.1

It looks like what is happening is that the local nameserver is being prepended before each existing nameserver line instead of just the first. I think this is because of https://github.com/openshift/machine-config-operator/commit/09fab1e853418bfd8624db0a617411603e7b6876

Version-Release number of MCO (Machine Config Operator) (if applicable): NA

Platform (AWS, VSphere, Metal, etc.): On-prem

Are you certain that the root cause of the issue being reported is the MCO (Machine Config Operator)?
(Y/N/Not sure): Yes, it's the prepender script that lives in MCO.

How reproducible: Always.

Did you catch this issue by running a Jenkins job? If yes, please list:
1. Jenkins job:

2. Profile:

Steps to Reproduce:
1. Deploy cluster
2. Modify DNS settings to have multiple servers. I used kubernetes-nmstate to add a DNS server.
3.

Actual results: Duplicate local nameserver entries.

Expected results: Only one local nameserver entry.

Comment 6 errata-xmlrpc 2022-03-12 04:40:54 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 (Moderate: OpenShift Container Platform 4.10.3 security update), 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://access.redhat.com/errata/RHSA-2022:0056


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