Bug 1809750 - 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.4.0
Assignee: Antoni Segura Puimedon
QA Contact: Nataf Sharabi
URL:
Whiteboard:
Depends On: 1807234
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-03-03 19:40 UTC by Dan Mace
Modified: 2022-08-04 22:39 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1807234
Environment:
Last Closed: 2020-05-04 11:44:29 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift coredns pull 26 0 None closed [release-4.4] Bug 1809750: Update coredns-mdns vendoring 2020-11-12 01:31:51 UTC
Red Hat Product Errata RHBA-2020:0581 0 None None None 2020-05-04 11:44:47 UTC

Description Dan Mace 2020-03-03 19:40:36 UTC
+++ This bug was initially created as a clone of Bug #1807234 +++

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.

--- Additional comment from Dan Mace on 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.

--- Additional comment from Ben Bennett on 2020-03-03 14:12:56 UTC ---

Toni, can you handle this one please?

--- Additional comment from Ben Nemec on 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.

--- Additional comment from Ben Nemec on 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 1 Dan Mace 2020-03-03 19:42:27 UTC
Backport of https://github.com/openshift/coredns/pull/25

Comment 6 Nataf Sharabi 2020-03-16 23:40:48 UTC
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-000")
5.Try to see if you can bound it into another ip address (just for test purposes)
6.find the mdns-publisher command: find / -name "mdns-publisher" | grep usr
7.open another session & ssh core@master-1 from kni@provisionhost
8.from master-1: watch -n 1 -d "nslookup master-0;nslookup <new name> "
9.from master-0: /var/lib/containers/storage/overlay/<con-id>/merged/usr/bin/mdns-publisher

You can see in the log the published service is coordinated with the name you have given:

[root@master-0 mdns]# /var/lib/containers/storage/overlay/a5b82797b04b8aa75e6beb80377a8ec48c3c72055c35f32cebacea04f1446916/merged/usr/bin/mdns-publisher --config _config.hcl 
INFO[0000] Publishing with settings                      collision_avoidance=hostname ip="fd2e:6f44:5dd8:c956::102"
INFO[0000] Binding interface                             name=enp5s0
INFO[0000] Publishing service                            domain=local. hostname=etcd-0.local. name="ocp-edge-cluster Etcd-master-0" port=2380 ttl=3200 type=_etcd-server-ssl._tcp
INFO[0000] Publishing service                            domain=local. hostname=master-000.local. name="ocp-edge-cluster Workstation-master-0" port=42424 ttl=3200 type=_workstation._tcp
INFO[0000] Publishing service                            domain=local. hostname=etcd-0.local. name="ocp-edge-cluster EtcdWorkstation-master-0" port=42424 ttl=300 type=_workstation._tcp

Comment 8 errata-xmlrpc 2020-05-04 11:44:29 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://access.redhat.com/errata/RHBA-2020:0581


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