Bug 1916907

Summary: dns-node-resolver corrupts /etc/hosts if internal registry is not in use
Product: OpenShift Container Platform Reporter: Ryan Fredette <rfredette>
Component: NetworkingAssignee: Ryan Fredette <rfredette>
Networking sub component: DNS QA Contact: Hongan Li <hongli>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: medium CC: amcdermo, aos-bugs, bbennett, bcroft, dpateriy, hongli, jerome.couradeau, mas-hatada, mfuruta, mjoseph, sbelmasg, tas
Version: 4.5   
Target Milestone: ---   
Target Release: 4.6.z   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Cause: Intermittent DNS errors Consequence: dns-node-resolver created invalid entries in the node's /etc/hosts file Fix: Filtering error messages out of DNS requests that eventually return a valid record Result: dns-node-resolver no longer creates invalid /etc/hosts entries
Story Points: ---
Clone Of: 1882485 Environment:
Last Closed: 2021-02-08 13:51:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1882485    
Bug Blocks:    

Comment 1 Hongan Li 2021-01-22 09:09:58 UTC
verified with a cluster launch by cluster-bot and passed

$ oc get clusterversion
NAME      VERSION                                           AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.6.0-0.ci.test-2021-01-22-080022-ci-ln-vimgw1t   True        False         9m51s   Cluster version is 4.6.0-0.ci.test-2021-01-22-080022-ci-ln-vimgw1t

$ oc edit configs.imageregistry.operator
(set spec.ManagementState.Removed)

$ oc -n openshift-image-registry get svc
NAME                      TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)     AGE
image-registry-operator   ClusterIP   None         <none>        60000/TCP   56m

$ oc debug node/ci-ln-vimgw1t-f76d1-lhh7x-master-0
Creating debug namespace/openshift-debug-node-n4drq ...
Starting pod/ci-ln-vimgw1t-f76d1-lhh7x-master-0-debug ...
To use host binaries, run `chroot /host`
Pod IP: 10.0.0.5
If you don't see a command prompt, try pressing enter.
sh-4.4# chroot /host
sh-4.4# 
sh-4.4# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
172.30.254.36 image-registry.openshift-image-registry.svc image-registry.openshift-image-registry.svc.cluster.local # openshift-generated-node-resolver
sh-4.4#

Comment 5 errata-xmlrpc 2021-02-08 13:51:25 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 (Important: OpenShift Container Platform 4.6.16 security and bug fix 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-2021:0308

Comment 8 Red Hat Bugzilla 2023-09-18 00:24:15 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days