Bug 2000787

Summary: Adding a BYOH node with a different DNS address than the hostname fails
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: Windows ContainersAssignee: Mohammad Saif Shaikh <mohashai>
Status: CLOSED ERRATA QA Contact: gaoshang <sgao>
Severity: low Docs Contact:
Priority: high    
Version: 4.9CC: aos-bugs, jvaldes, mankulka, team-winc
Target Milestone: ---   
Target Release: 4.8.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-09-21 11:11:45 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: 1995684    
Bug Blocks:    

Description OpenShift BugZilla Robot 2021-09-02 22:44:54 UTC
+++ This bug was initially created as a clone of Bug #1995684 +++

Description of problem:
Adding a BYOH node using a DNS address that is different than the hostname results in an error such as:
```
2021-08-19T15:05:54.094Z	DEBUG	controller-runtime.manager.events	Warning	{"object": {"kind":"ConfigMap","namespace":"openshift-windows-machine-config-operator","name":"windows-instances","uid":"29d12cf0-eb29-4712-ba56-7e27e99a899a","apiVersion":"v1","resourceVersion":"525987"}, "reason": "InstanceSetupFailure", "message": "error configuring host with address dhcp-host-90.cloud.chx: error getting node object: unable to find node with address dhcp-host-90.cloud.chx: timed out waiting for the condition"}
```

This is due to the node status object not having the given address present in it:
```
status:
  addresses:
  - address: 192.168.1.90
    type: ExternalIP
  - address: 192.168.1.90
    type: InternalIP
  - address: dhcp-host-90
    type: Hostname
```

This can be worked around by using the instance's IP address in the windows-instances ConfigMap instead.

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Try to configure a BYOH Windows instance using a DNS address that is different from the instance's hostname.
2. The error will appear in the WMCO logs and/or the windows-instance ConfigMap events.

Actual results:
Error as seen above

Expected results:
No error, instance is fully configured as a node.

Additional info:
This can be fixed by doing a DNS lookup of the address, and using the IP to locate the node.

Comment 2 gaoshang 2021-09-08 11:39:03 UTC
This bug has been verified on OCP 4.8.0-0.nightly-2021-09-06-042819, thanks.

Steps:
1, On UPI baremetal cluster, configure BYOH Windows instance with DNS name in configmap, make sure DNS name is different with hostname.

PS C:\Users\Administrator> nslookup 10.0.48.121
Server:  ip-10-0-0-2.us-east-2.compute.internal
Address:  10.0.0.2

Name:    ip-10-0-48-121.us-east-2.compute.internal
Address:  10.0.48.121

PS C:\Users\Administrator> hostname
sgao-win2

2, Check BYOH Windows instance is configured as a node

Note: Found BYOH Windows instance got deconfigured immediately when ready, another Bug 2001547 is opened to track it.

Comment 4 errata-xmlrpc 2021-09-21 11:11:45 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 (Windows Container Support for Red Hat OpenShift 3.1.0 product release), 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-2021:3215