Bug 2168486

Summary: "Restore template settings" is disabled while editing VM's CPU/Mem
Product: Container Native Virtualization (CNV) Reporter: Guohua Ouyang <gouyang>
Component: User ExperienceAssignee: Hilda Stastna <hstastna>
Status: CLOSED ERRATA QA Contact: Shijie Xue <sxue>
Severity: high Docs Contact:
Priority: high    
Version: 4.12.0CC: gouyang, ycui
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:
: 2180334 (view as bug list) Environment:
Last Closed: 2023-05-18 02:57:30 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:
Bug Depends On:    
Bug Blocks: 2180334    

Description Guohua Ouyang 2023-02-09 07:11:10 UTC
Description of problem:
"Restore template settings" is disabled while editing VM's CPU/Mem

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


How reproducible:


Steps to Reproduce:
1. create a vm from catalog
2. edit the VM's CPU/Mem
3.

Actual results:
"Restore template settings" is disabled 

Expected results:
"Restore template settings" is enabled

Additional info:

Comment 1 Hilda Stastna 2023-02-28 17:56:47 UTC
Hi Guohua,

can you please, take a look at this? As this works as expected, in 4.13. "Restore template settings" is enabled and it does reset the settings to the templates' ones.
Thanks.

Comment 2 Guohua Ouyang 2023-03-01 01:25:08 UTC
I talked to Tal about the problem wasn't always happened, but when I checked it about 1 week ago, the problem is still happened.

I just find the root cause of the problem is the link of the VM's template is not correct, in the details tab of a VM which could see the issue, the link is '/k8s/ns/default/templates/rhel7-server-small', which should be '/k8s/ns/openshift/templates/rhel7-server-small'.

Reproduce steps:
1. Edit the boot source reference of RHEL7 template
2. Create a VM from RHEL7 template
3. "Restore template settings" is disabled in VM details tab
4. Click the template link, it does not open the template because it's not existing.

Comment 3 Hilda Stastna 2023-03-03 19:45:55 UTC
Note that with reproducing this bug, the following scenario occurs:
after clicking on "From template", when creating a VM from VirtualMachines list page, while "All projects" project/namespace set,
the namespace is changed to "default". IMO it should stay in "All Projects" namespace. WDYT, Guohua? Is that a bug, too? Thanks!

Comment 4 Hilda Stastna 2023-03-03 20:13:10 UTC
Also note that the root cause of this bug - incorrect link to the template in the VM's Details, is caused by the fact that when creating a VM,
the "label vm.kubevirt.io/template.namespace" is set incorrectly, its value is not the original template's namespace, but the VM's one.

Comment 5 Guohua Ouyang 2023-03-06 00:45:42 UTC
(In reply to Hilda Stastna from comment #3)
> Note that with reproducing this bug, the following scenario occurs:
> after clicking on "From template", when creating a VM from VirtualMachines
> list page, while "All projects" project/namespace set,
> the namespace is changed to "default". IMO it should stay in "All Projects"
> namespace. WDYT, Guohua? Is that a bug, too? Thanks!

While creating a pod under "All projects", it also changes to the ns "default".
So I would say let it be.

Comment 7 Hilda Stastna 2023-03-23 18:15:05 UTC
Just a note this BZ was fixed by
https://github.com/kubevirt-ui/kubevirt-plugin/pull/1106

Comment 8 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