Bug 1995684 - Adding a BYOH node with a different DNS address than the hostname fails
Summary: Adding a BYOH node with a different DNS address than the hostname fails
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Windows Containers
Version: 4.9
Hardware: Unspecified
OS: Unspecified
high
low
Target Milestone: ---
: 4.9.0
Assignee: Mohammad Saif Shaikh
QA Contact: gaoshang
URL:
Whiteboard:
Depends On:
Blocks: 2000787
TreeView+ depends on / blocked
 
Reported: 2021-08-19 15:36 UTC by Sebastian Soto
Modified: 2021-10-28 17:41 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: WMCO used the raw user-provided instance address when creating BYOH Windows nodes Consequence: BYOH Windows instances would not be configured to join an OpenShift cluster Fix: Ensures user provided DNS names resolve to valid IPv4 addresses, and using the resolved value when creating associated nodes Result: Allows BYOH instances with differing hostnames and DNS addresses to be configured as Windows Nodes
Clone Of:
Environment:
Last Closed: 2021-10-28 17:41:17 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift windows-machine-config-operator pull 655 0 None None None 2021-09-02 14:37:24 UTC
Red Hat Product Errata RHBA-2021:3702 0 None None None 2021-10-28 17:41:40 UTC

Description Sebastian Soto 2021-08-19 15:36:51 UTC
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 1 Mansi Kulkarni 2021-09-03 18:07:00 UTC
Marking VERIFIED for release-4.8 PR to merge, will move back to ON_QA.

Comment 2 gaoshang 2021-09-06 11:25:30 UTC
This bug has been verified on OCP 4.9.0-0.nightly-2021-09-05-204238, 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.55.187
Server:  ip-10-0-0-2.us-east-2.compute.internal
Address:  10.0.0.2

Name:    ip-10-0-55-187.us-east-2.compute.internal
Address:  10.0.55.187

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

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 7 errata-xmlrpc 2021-10-28 17:41:17 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 4.0.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:3702


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