Bug 2151053

Summary: The scripts tab of Windows VM cannot be saved
Product: Container Native Virtualization (CNV) Reporter: Guohua Ouyang <gouyang>
Component: User ExperienceAssignee: Ugo Palatucci <upalatuc>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.12.0CC: gouyang, upalatuc
Target Milestone: ---   
Target Release: 4.13.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-05-18 02:56:16 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:
Attachments:
Description Flags
cloud-init cannot be saved none

Description Guohua Ouyang 2022-12-06 01:10:03 UTC
Created attachment 1930316 [details]
cloud-init cannot be saved

Description of problem:
The scripts tab of Windows VM cannot be saved, the error for cloud-init is:
Error "spec.template.spec.volumes[2] must have exactly one source type set" for field "spec.template.spec.volumes[2]". 

The error for Authorized SSH Key is:
Error "spec.template.spec.accessCredentials[0] requires a configDrive volume to exist when the configDrive propagationMethod is in use." for field "spec.template.spec.accessCredentials[0].sshPublicKey.propagationMethod".

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


How reproducible:


Steps to Reproduce:
1. edit clout-init and ssh-key of a windows VM
2.
3.

Actual results:
the page cannot be save

Expected results:
it can save

Additional info:
The issue does not happen for sysprep

Comment 2 Ugo Palatucci 2023-03-01 14:11:50 UTC
Authorized SSH Key is probably already solved.
Not reproducible.

Fixing only for cloud-init

@gouyang

Comment 3 Guohua Ouyang 2023-03-02 01:55:17 UTC
I could still see the ssh error while adding a new secret or attaching existing secret to a windows VM.

Comment 4 Guohua Ouyang 2023-03-02 23:21:58 UTC
Hi Ugo, 
Could you check the Authorized SSH Key issue on windows VM again?

Comment 5 Ugo Palatucci 2023-03-03 13:37:15 UTC
Yes. I don't know what happened before. Now I'm able to reproduce the error

Comment 6 Ugo Palatucci 2023-03-03 13:44:44 UTC
Okay, now I understand the issue. 
On windows, we don't have cloud-init info by default, but to add the Auth SSH Key we need some kind of cloudInitConfigDrive information.

Does it make sense to do this? In another bug[1] we are adding labels for 'Linux only' and 'Windows only'
Probably i can resolve this bug by disabling the configuration of Auth SSH key for windows. 
WDYT? 

1. https://bugzilla.redhat.com/show_bug.cgi?id=2155403

@gouyang

Comment 7 Guohua Ouyang 2023-03-06 00:39:39 UTC
(In reply to Ugo Palatucci from comment #6)
> Okay, now I understand the issue. 
> On windows, we don't have cloud-init info by default, but to add the Auth
> SSH Key we need some kind of cloudInitConfigDrive information.
> 
> Does it make sense to do this? In another bug[1] we are adding labels for
> 'Linux only' and 'Windows only'
> Probably i can resolve this bug by disabling the configuration of Auth SSH
> key for windows. 
> WDYT? 
> 
> 1. https://bugzilla.redhat.com/show_bug.cgi?id=2155403
> 
> @gouyang


I'd love to see Syspre is only enabled for windows and SSH Key only enabled for Linux.

Comment 8 Guohua Ouyang 2023-03-06 01:59:18 UTC
Move the bug to verified and track the windows ssh key issue in #2155403

Comment 11 errata-xmlrpc 2023-05-18 02:56:16 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 Virtualization 4.13.0 Images security, bug fix, and enhancement 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:3205