Bug 2117803

Summary: Cannot edit ssh even vm is stopped
Product: Container Native Virtualization (CNV) Reporter: Guohua Ouyang <gouyang>
Component: User ExperienceAssignee: Hilda Stastna <hstastna>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: high Docs Contact:
Priority: high    
Version: 4.11.0CC: aturgema, dcadzow, gouyang, hstastna, tnisan, ycui
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: 2111335
: 2134668 (view as bug list) Environment:
Last Closed: 2023-01-24 13:39:30 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:

Comment 1 Guohua Ouyang 2022-08-17 08:24:53 UTC
The bug seems not happen on 4.12 but on 4.11.

Comment 2 Hilda Stastna 2022-08-25 20:06:35 UTC
Fixing:
https://github.com/kubevirt-ui/kubevirt-plugin/pull/822

Comment 3 Hilda Stastna 2022-10-13 12:38:09 UTC
Guohua,

this bug was originally fixed against 4.12 by https://github.com/kubevirt-ui/kubevirt-plugin/pull/822 and this ticket was used for that. 
I think we need to clone this if we want it for 4.11, and to correctly set this back to 4.12, as it was originally.

Comment 5 Guohua Ouyang 2022-10-14 00:31:07 UTC
(In reply to Hilda Stastna from comment #3)
> Guohua,
> 
> this bug was originally fixed against 4.12 by
> https://github.com/kubevirt-ui/kubevirt-plugin/pull/822 and this ticket was
> used for that. 
> I think we need to clone this if we want it for 4.11, and to correctly set
> this back to 4.12, as it was originally.

Comment 6 Guohua Ouyang 2022-10-14 00:37:26 UTC
Move this bug to 4.12 and clone new bug to 4.11.2: https://bugzilla.redhat.com/show_bug.cgi?id=2134668

Comment 7 Guohua Ouyang 2022-10-14 00:47:59 UTC
Tested it on latest 4.12 version, expose ssh service get different results for running and stopped VM.

- if the VM is running, expose the ssh service get: 
  ssh cloud-user.uit-412-1005.cnv-qe.rhcloud.com -p 30811
- if the VM is stopped, expose the ssh service get: 
  ssh console-openshift-console.apps.uit-412-1005.cnv-qe.rhcloud.com -p 30811

Comment 9 Guohua Ouyang 2022-10-18 00:49:35 UTC
(In reply to Hilda Stastna from comment #8)
> Guohua,
> 
> are you sure that the results should be the same?

Yes, If the username is not showing in the ssh command while the VM is stopped, it has no reason to copy it because it won't work, then I see no value to show the ssh command section on UI.

> I can see in the code - we get the user name by getting the cloud init
> credentials - and we need to know the VMI for that.
> And we need a running VM for that. Are we missing something? Thanks.

Can it just read the username from cloud-init part in the VM YAML?

Comment 10 Hilda Stastna 2022-10-19 18:59:02 UTC
Thank you, Guohua, for your reply. I will investigate it to find the best solution and will fix that asap.

Comment 11 Guohua Ouyang 2022-10-24 07:55:23 UTC
verified on v4.12.0-1507, the username is showing in the command while VM is running and stopped

Comment 16 errata-xmlrpc 2023-01-24 13:39:30 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 Virtualization 4.12.0 Images 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-2023:0408