Bug 1807234 - mDNS plugin overwrites SRV records
Summary: mDNS plugin overwrites SRV records
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Networking
Version: 4.4
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.5.0
Assignee: Antoni Segura Puimedon
QA Contact: Nataf Sharabi
URL:
Whiteboard:
Depends On:
Blocks: 1809750
TreeView+ depends on / blocked
 
Reported: 2020-02-25 21:11 UTC by Ben Nemec
Modified: 2022-08-04 22:39 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Feature: Arbitrary hostnames for baremetal deployments. Reason: Previously there was a dependency on having specific DNS names for master nodes. In order to eliminate that and allow deployers to use the hostnames they want, it was necessary to remove some name logic from the mdns plugin for coredns that forced the use of the old name scheme. Result: Deployers can use any legal hostname they want for master nodes.
Clone Of:
: 1809750 (view as bug list)
Environment:
Last Closed: 2020-08-04 18:02:24 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift coredns issues 24 0 None closed mDNS plugin overwrites SRV records 2021-01-08 12:43:17 UTC
Github openshift coredns pull 25 0 None closed Bug 1807234: Update coredns-mdns vendoring 2021-01-08 12:43:16 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-08-04 18:02:28 UTC

Description Ben Nemec 2020-02-25 21:11:45 UTC
Description of problem: When an mDNS host attempts to publish a SRV record, the mdns plugin to coredns is overwriting the specified value before returning it in queries. This behavior was added to address a use case that no longer exists (and was solved in a different way in any case), so we no longer need it. In addition it breaks some new functionality which requires that SRV records be published verbatim.

To reproduce, have a host publish a SRV mdns record for coredns-mdns to consume, then query for that record. If the original record is named foo.example.com, the value returned from the query will be something like etcd-foo.example.com.

Comment 1 Dan Mace 2020-03-03 13:59:31 UTC
Is https://github.com/openshift/coredns/pull/25 a fix for this? It's not associated with the bz.

Comment 2 Ben Bennett 2020-03-03 14:12:56 UTC
Toni, can you handle this one please?

Comment 3 Ben Nemec 2020-03-03 18:05:57 UTC
Yes, 25 is the fix for this, although I guess I need a copy of the bug targeted against 4.5 as well. I'll get it cloned.

Comment 4 Ben Nemec 2020-03-03 18:10:04 UTC
Oh, there is no 4.5 version available on bz yet. That's why I hadn't opened anything for it. This one was to allow backporting since we'll need it in 4.4, which is why I didn't reference it in the 4.5 PR.

Comment 8 Nataf Sharabi 2020-05-21 12:14:10 UTC
Tested on:

[kni@provisionhost-0-0 ~]$ oc version
Client Version: 4.5.0-0.nightly-2020-05-20-053050
Server Version: 4.5.0-0.nightly-2020-05-20-053050
Kubernetes Version: v1.18.2



According to Ben Nemec:

For the purposes of this bug, the main thing is to verify that the SRV record points at what you specify, not the hard-coded CNAME from coredns-mdns.

Therefore,

In order to verify:

1.login into master-0 from kni@provisionhost: ssh core@master-0
2.gain root access: sudo -s
3.copy the mdns configuration: cp /etc/mdns/config.hcl /etc/mdns/config1.hcl 
4.change the host_name in /etc/mdns/config1.hcl to another name (for example:"master-0-0-0")
5.run: sudo crictl ps | grep mdns
  6bee170740088       93b7d3550406466da140ce16bdbe635240993eaf6bd91df0bf8eec9bf3605ab2   12 minutes ago      
  Running             mdns-publisher                                1                   7e88cff203314
6.sudo crictl stop 6bee170740088
7.host -t SRV _etcd-server-ssl._tcp.ocp-edge-cluster-0.qe.lab.redhat.com

_etcd-server-ssl._tcp.ocp-edge-cluster-0.qe.lab.redhat.com has SRV record 0 10 2380 master-0-2.ocp-edge-cluster-0.qe.lab.redhat.com.
_etcd-server-ssl._tcp.ocp-edge-cluster-0.qe.lab.redhat.com has SRV record 0 10 2380 master-0-1.ocp-edge-cluster-0.qe.lab.redhat.com.
_etcd-server-ssl._tcp.ocp-edge-cluster-0.qe.lab.redhat.com has SRV record 0 10 2380 master-0-0-0.ocp-edge-cluster-0.qe.lab.redhat.com.

Note that the last record was updated to the new name in the config.hcl

Comment 10 errata-xmlrpc 2020-08-04 18:02:24 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.5 image release 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://access.redhat.com/errata/RHBA-2020:2409


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