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

Bug 2090178

Summary: VM SSH command generated by UI points at api VIP
Product: OpenShift Container Platform Reporter: Yaacov Zamir <yzamir>
Component: Console Kubevirt PluginAssignee: Aviv Turgeman <aturgema>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.10CC: aturgema, cnv-qe-bugs, cwilkers, gouyang, lisowski
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2081182 Environment:
Last Closed: 2022-08-10 11:14:09 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: 2081182    
Bug Blocks: 2095217    

Description Yaacov Zamir 2022-05-25 10:12:10 UTC
+++ This bug was initially created as a clone of Bug #2081182 +++

Description of problem:
Under the details page of a VM with SSH exposed there is a User credentials section with a copy to clipboard button specifying an ssh command in the form:

ssh user@api-hostname -p <nodeport>

In the case of my IPI installed baremetal cluster, this never works for me. The api VIP is grabbed by the control plane and attempts to reach nodeports on that IP fail. If I change to a worker node's hostname or IP, it will work. 

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

How reproducible:
Always 

Steps to Reproduce:
1. Create VM from template (e.g. Fedora) using wizard
2. Select checkbox to expose SSH to the VM
3. Follow through to create VM and select details page.
4. Copy and attempt to use User credentials ssh command

Actual results:
Timeout

Expected results:
Ssh connection to VM

Additional info:
Several others have run into this as well. I am not sure whether it is an IPI only problem.

Comment 2 Yaacov Zamir 2022-05-26 13:22:12 UTC
moving to assign because the fix in https://github.com/openshift/console/pull/11567 show the vm ip, which is not accessible from outside the cluster

fix should be:
  const command = `ssh ${user && `${user}@`}${consoleHostname} -p ${servicePort}`;

but is:
  const command = `ssh ${user && `${user}@`}${nodeInternalIPAddress || consoleHostname} -p ${servicePort}`;

Comment 4 Yaacov Zamir 2022-05-31 05:30:54 UTC
*** Bug 2089400 has been marked as a duplicate of this bug. ***

Comment 6 Guohua Ouyang 2022-06-09 10:14:50 UTC
move this bug to verified as this is 4.10.z only bug

Comment 8 errata-xmlrpc 2022-08-10 11:14:09 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.11.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:5069