Bug 2168111 - VM template loses storage information if a required parameter has no value
Summary: VM template loses storage information if a required parameter has no value
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: User Experience
Version: 4.12.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.13.0
Assignee: Ugo Palatucci
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-08 08:11 UTC by Juan Orti
Modified: 2023-09-19 04:33 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-05-18 02:57:30 UTC
Target Upstream Version:
Embargoed:
upalatuc: needinfo-


Attachments (Terms of Use)
template.yaml (3.08 KB, text/plain)
2023-02-08 08:14 UTC, Juan Orti
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CNV-25158 0 None None None 2023-02-08 08:12:49 UTC
Red Hat Knowledge Base (Solution) 6997206 0 None None None 2023-02-08 08:29:34 UTC
Red Hat Product Errata RHSA-2023:3205 0 None None None 2023-05-18 02:57:47 UTC

Description Juan Orti 2023-02-08 08:11:37 UTC
Description of problem:
If a VM template has any parameter that is required but does not provide a default value, the storage disk source is lost.

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

How reproducible:
Always

Steps to Reproduce:
1. Create a VM template with a required parameter and no default value, for example:

~~~
parameters:
  - description: SSH pubkey for the cloud-init user
    name: CLOUD_USER_SSH_KEY
    required: true
~~~

2. In the console, go to Virtual Machines -> Create from catalog -> Select template -> Customize Virtual Machine.

Actual results:
CLOUD_USER_SSH_KEY is empty and required as expected, however in Storage -> Disk source, the details of the source storage has been lost.

Expected results:
I expect that "Template default" is selected in Storage -> Disk source. 

Additional info:

Comment 1 Juan Orti 2023-02-08 08:14:51 UTC
Created attachment 1942824 [details]
template.yaml

Comment 2 Guohua Ouyang 2023-02-10 03:43:24 UTC
I could reproduce the issue, but I double about whether it's a valid scenario because it sets a required parameter in the template but not provide the data for the required parameter.

Comment 6 Guohua Ouyang 2023-03-23 05:32:11 UTC
The required parameter 'CLOUD_USER_SSH_KEY' is displaying on page now, but the parameter is not processed.
Create a VM from it cannot see the key or secret about it.

@Ugo @Tal
Do we need further fix for the problem?

Comment 8 Guohua Ouyang 2023-03-23 10:00:22 UTC
Missed one part while creating the template, retest it with the YAML from the attachment, the ssh key is actually in the VM YAML.

Comment 10 errata-xmlrpc 2023-05-18 02:57: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 (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

Comment 11 Red Hat Bugzilla 2023-09-19 04:33:25 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


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