Bug 2059724 - On-prem prepender dispatcher script overwrites DNS search settings
Summary: On-prem prepender dispatcher script overwrites DNS search settings
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Machine Config Operator
Version: 4.10
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 4.7.z
Assignee: Christoph Stäbler
QA Contact: Aleksandra Malykhin
URL:
Whiteboard:
: 2038383 (view as bug list)
Depends On: 2058789
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-03-01 20:03 UTC by OpenShift BugZilla Robot
Modified: 2022-04-06 10:50 UTC (History)
10 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-03-22 15:13:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift machine-config-operator pull 2977 0 None open [release-4.7] Bug 2059724: Prepend to search domains instead of replacing 2022-03-02 20:15:16 UTC
Red Hat Product Errata RHBA-2022:0873 0 None None None 2022-03-22 15:13:48 UTC

Comment 4 Aleksandra Malykhin 2022-03-20 10:58:59 UTC
4.7.0-202201261123

Verified on 
[kni@provisionhost-0-0 ~]$ oc get clusterversion
NAME      VERSION   AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.7.45    True        False         4m50s   Cluster version is 4.7.45

NMState version 4.7.0-202201261123

1. Deploy the cluster
2. Install nmstate operator from the UI console

[kni@provisionhost-0-0 ~]$  oc -n openshift-nmstate get csv
NAME                                             DISPLAY                       VERSION              REPLACES   PHASE
kubernetes-nmstate-operator.4.7.0-202201261123   Kubernetes NMState Operator   4.7.0-202201261123              Succeeded

3. Apply the network policy
[kni@provisionhost-0-0 ~]$ oc apply -f dns.yaml 
nodenetworkconfigurationpolicy.nmstate.io/amdns created
[kni@provisionhost-0-0 ~]$ oc get nncp
NAME    STATUS
amdns   SuccessfullyConfigured

4. Go to the node and verify that the resolv.conf was updated

[kni@provisionhost-0-0 ~]$ ssh core@worker-0-1
[core@worker-0-1 ~]$ cat /etc/resolv.conf 
# Generated by KNI resolv prepender NM dispatcher script
search ocp-edge-cluster-0.qe.lab.redhat.com example.com
nameserver 192.168.123.98
nameserver 8.8.8.8
nameserver 192.168.123.1



====================================
cat dns.yaml
apiVersion: nmstate.io/v1beta1
kind: NodeNetworkConfigurationPolicy
metadata:
  name: amdns
spec:
  nodeSelector:
    kubernetes.io/hostname: worker-0-1
  desiredState:
    dns-resolver:
      config:
        search:
        - example.com
        server:
        - 8.8.8.8
    interfaces:
    - name: enp0s3
      type: ethernet
      state: up
      ipv4:
        auto-dns: false
        enabled: true
        dhcp: true

Comment 6 errata-xmlrpc 2022-03-22 15:13:27 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 (OpenShift Container Platform 4.7.45 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/RHBA-2022:0873

Comment 7 Christoph Stäbler 2022-03-30 08:16:47 UTC
*** Bug 2038383 has been marked as a duplicate of this bug. ***


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