Bug 1983695

Summary: Size of the hostname was preventing proper DNS resolution of the worker node names
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: NetworkingAssignee: Ben Nemec <bnemec>
Networking sub component: mDNS QA Contact: Aleksandra Malykhin <amalykhi>
Status: CLOSED ERRATA Docs Contact:
Severity: high    
Priority: high CC: amalykhi, amcdermo, aos-bugs, bnemec, gferrazs, hpokorny, mkalinin, vfarias, vvoronko
Version: 4.6.zKeywords: Triaged
Target Milestone: ---   
Target Release: 4.7.z   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-09-01 18:23:56 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On: 1915122    
Bug Blocks: 1896751, 1983690    

Comment 2 Aleksandra Malykhin 2021-08-22 15:14:41 UTC
Verified on  4.7.0-0.nightly-2021-08-21-153346

The verification flow:

1. change hostname to new longer one on master-0-0

[core@master-0-0 ~]$ sudo hostnamectl set-hostname masteraaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-0.ocp-edge-cluster-0.qe.lab.redhat.com
[core@master-0-0 ~]$ hostname

2. restart mdns pod

[core@master-0-0 ~]$ sudo vi /etc/kubernetes/manifests/mdns-publisher.yaml (changed value of the deletionGracePeriodSeconds - pod restarted)

3. check log file on the master:
oc logs -n openshift-kni-infra mdns-publisher-master-0-0.ocp-edge-cluster-0.qe.lab.redhat.com                         

time="2021-08-22T15:12:43Z" level=info msg="Publishing with settings" collision_avoidance=hostname ip="fd2e:6f44:5dd8::6c"
time="2021-08-22T15:12:43Z" level=info msg="Binding interface" name=br-ex
time="2021-08-22T15:12:43Z" level=debug msg="Changing service name" new="ocp-edge-cluster-0 Workstation-masteraaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-0" original="ocp-edge-cluster-0 Workstation"
time="2021-08-22T15:12:43Z" level=info msg="Publishing service" domain=local. hostname=masteraaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-0.local. name="ocp-edge-cluster-0 Workstation-masteraaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-0" port=42424 ttl=3200 type=_workstation._tcp
time="2021-08-22T15:12:43Z" level=info msg="Truncating long service name 'ocp-edge-cluster-0 Workstation-masteraaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-0' to 'ocp-edge-cluste06bed01003bbb7ff2136e424e3bc1cceaaaaaaaaaaaaaa-0'"
time="2021-08-22T15:12:43Z" level=info msg="Zeroconf registering service" name=ocp-edge-cluste06bed01003bbb7ff2136e424e3bc1cceaaaaaaaaaaaaaa-0
time="2021-08-22T15:12:43Z" level=info msg="Zeroconf setting service ttl" name=ocp-edge-cluste06bed01003bbb7ff2136e424e3bc1cceaaaaaaaaaaaaaa-0 ttl=3200

the new hostname is changed to random word in the middle as per request.

Comment 5 errata-xmlrpc 2021-09-01 18:23:56 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.7.28 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.