Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 2112086

Summary: [hybrid-overlay] AWS EC2 metadata service not available in host's vNIC for Windows
Product: OpenShift Container Platform Reporter: jvaldes
Component: NetworkingAssignee: jvaldes
Networking sub component: ovn-kubernetes QA Contact: Mike Fiedler <mifiedle>
Status: CLOSED ERRATA Docs Contact:
Severity: urgent    
Priority: high CC: jvaldes, mifiedle, surya
Version: 4.10   
Target Milestone: ---   
Target Release: 4.12.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 2112100 (view as bug list) Environment:
Last Closed: 2023-01-17 19:53:39 UTC Type: Bug
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:    
Bug Blocks: 2112100    

Description jvaldes 2022-07-28 18:44:02 UTC
Description of problem:
AWS EC2 metadata service not available in host's vNIC for Windows after hybrid-overlay is configured and running as a Windows service.

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

How reproducible:
Always

Steps to Reproduce:
1. Spin a 4.10 IPI cluster in AWS
2. Install WMCO from Operator-Hub  with all the requirements
3. Deploy a Windows machineSet with Windows Server 2022
4. SSH into a Windows machine and check for the metadata endpoint is reachable before the machine joins as a worker node.
  4.1 Run the following scripts from an existing linux worker node

```
# query the metadata service to fetch the hostname
ssh -o StrictHostKeyChecking=no -i <key.pem> <username>@<internal_IP> powershell.exe -Command "Invoke-WebRequest -UseBasicParsing http://169.254.169.254/latest/meta-data/hostname" 
```

```
# get network routes and look for 169.254.169.254
ssh -o StrictHostKeyChecking=no -i <key.pem> <username>@<internal_IP> powershell.exe -Command "Get-NetRoute" 
```
where <key.pem> is the private key to SSH into the Windows machine, <username> is the Windows username, and <internal_IP is the internal IP of the Windows machine.

5. Wait for WMCO to start hybrid-overlay as a Windows service

6. SSH into a Windows machine and check again the metadata endpoint


Actual results:
AWS EC2 metadata service is not available in host's vNIC after hybrid-overlay is running as a Windows service.


Expected results:
AWS EC2 metadata service should be available in host's vNIC after hybrid-overlay running as a Windows service.

Additional info:

Comment 1 jvaldes 2022-07-28 18:48:44 UTC
Upstream PR with the proposed fix: https://github.com/ovn-org/ovn-kubernetes/pull/3074

Downstream merge PR: https://github.com/openshift/ovn-kubernetes/pull/1214

Comment 2 Surya Seetharaman 2022-07-29 13:05:26 UTC
Moving to POST state; assigning to jvaldes who is the author of PR.

Comment 3 jvaldes 2022-08-03 17:06:15 UTC
Downstream merge PR merged. https://github.com/openshift/ovn-kubernetes/pull/1214

Comment 5 jvaldes 2022-08-22 04:48:31 UTC
As a workaround, you can SSH into the Windows instance first, switch to PowerShell and then invoke the command. As an example and based on the above output, the steps are:

1- SSH into the Windows instance
ssh -o StrictHostKeyChecking=no -i ./openshift-qe.pem Administrator.compute.internal 


2- Change to PowerShell
C:\Users\Administrator> powershell.exe


3- Invoke the command directly in PowerShell
PS C:\Users\Administrator> Invoke-WebRequest -UseBasicParsing http://169.254.169.254/latest/meta-data/hostname

Comment 6 Mike Fiedler 2022-09-20 15:17:55 UTC
Verified on 4.12.0-0.nightly-2022-09-20-040107 using steps in comment 5

PS C:\Users\Administrator> Invoke-WebRequest -UseBasicParsing http://169.254.169.254/latest/meta-data/hostname


StatusCode        : 200
StatusDescription : OK
Content           : ip-10-0-132-226.us-east-2.compute.internal
RawContent        : HTTP/1.1 200 OK
                    Connection: close
                    Accept-Ranges: none
                    Content-Length: 42
                    Content-Type: text/plain
                    Date: Tue, 20 Sep 2022 15:16:35 GMT
                    Last-Modified: Tue, 20 Sep 2022 14:48:23 GMT
                    Server: EC2ws...

Comment 9 errata-xmlrpc 2023-01-17 19:53:39 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 (Moderate: OpenShift Container Platform 4.12.0 bug fix and 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.

https://access.redhat.com/errata/RHSA-2022:7399