Bug 2090178 - VM SSH command generated by UI points at api VIP
Summary: VM SSH command generated by UI points at api VIP
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Console Kubevirt Plugin
Version: 4.10
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: 4.11.0
Assignee: Aviv Turgeman
QA Contact: Guohua Ouyang
: 2089400 (view as bug list)
Depends On: 2081182
Blocks: 2095217
TreeView+ depends on / blocked
Reported: 2022-05-25 10:12 UTC by Yaacov Zamir
Modified: 2022-08-10 11:14 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 2081182
Last Closed: 2022-08-10 11:14:09 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Github openshift console pull 11567 0 None Merged Bug 2090178: Fix SSH command string 2022-06-08 08:36:45 UTC
Github openshift console pull 11599 0 None Merged Bug 2090178: Fix SSH command string 2022-06-08 08:36:46 UTC
Red Hat Product Errata RHSA-2022:5069 0 None None None 2022-08-10 11:14:28 UTC

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):

How reproducible:

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:

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.


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