Bug 2233049 - Preferred value is not overwritten by value in VM spec
Summary: Preferred value is not overwritten by value in VM spec
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: Infrastructure
Version: 4.14.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: 4.14.0
Assignee: Lee Yarwood
QA Contact: Roni Kishner
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-08-21 09:37 UTC by vsibirsk
Modified: 2023-11-08 14:06 UTC (History)
3 users (show)

Fixed In Version: v4.14.0-379
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-08 14:06:16 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker CNV-32271 0 None None None 2023-08-21 18:09:53 UTC
Red Hat Product Errata RHSA-2023:6817 0 None None None 2023-11-08 14:06:27 UTC

Description vsibirsk 2023-08-21 09:37:34 UTC
Description of problem:
Preferred value from VirtualMachinePreference is not overwritten by value in VirtualMachine spec

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

How reproducible:
100%

Steps to Reproduce:
1.Create a VM with VMPreference in spec (for e.g. win11 vm with windows.11 preference)
2.Overwrite a preferred value in VM spec (for e.g. secureBoot: false)
3.Start VM

Actual results:
Preferred value is not overwritten by value in VM spec

Expected results:
Preferred value is overwritten by value in VM spec

Additional info:
Issue also reproduces on 4.13

Comment 1 Jed Lejosne 2023-08-21 18:07:52 UTC
I was able to reproduce this on the latest kubevirt.
Looking at the code, this seems to be an oversight, that might only affect EFI secure boot and BIOS serial.
Everything else I looked at only sets preferences if the user hasn't set the corresponding value(s) in the VM spec.

Comment 2 Lee Yarwood 2023-08-21 19:53:11 UTC
(In reply to Jed Lejosne from comment #1)
> I was able to reproduce this on the latest kubevirt.
> Looking at the code, this seems to be an oversight, that might only affect
> EFI secure boot and BIOS serial.
> Everything else I looked at only sets preferences if the user hasn't set the
> corresponding value(s) in the VM spec.

ACK yeah this is a valid bug, I've posted the following to fix this:

https://github.com/kubevirt/kubevirt/issues/10313

https://github.com/kubevirt/kubevirt/pull/10314

Comment 3 Roni Kishner 2023-09-19 10:01:09 UTC
Verified on CNV-v4.14.0.rhel9-1914

Comment 5 errata-xmlrpc 2023-11-08 14:06: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 (Important: OpenShift Virtualization 4.14.0 Images security and bug fix 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:6817


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