Bug 2088034

Summary: Virtualization Overview crashes when a VirtualMachine has no labels
Product: Container Native Virtualization (CNV) Reporter: Jason Kincl <jkincl>
Component: User ExperienceAssignee: Matan Schatzman <mschatzm>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.10.0CC: cnv-qe-bugs, gouyang, jcall, lkladnit, mschatzm, yzamir
Target Milestone: ---   
Target Release: 4.11.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-09-14 19:34:26 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:

Description Jason Kincl 2022-05-18 17:23:42 UTC
Description of problem:

When a VirtualMachine has no labels at all, the Virtualization Overview page will crash because .metadata.labels doesn't exist on the object. When adding an arbitrary label to the object, the page stops crashing on load.

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

Installing OpenShift Virtualization with the HCO:
kubevirt-4.10.0

How reproducible:

Always

Steps to Reproduce:

1. Create a VirtualMachine with no labels
2. Navigate to the Virtualization Overview
3. Window will crash

Actual results:

Web console will show errors including:

TypeError: Cannot read properties of undefined (reading 'vm.kubevirt.io/template')

Expected results:

Web console loads normally

Additional info:

In order to fix the bug just apply any label to the VirtualMachine object

Comment 1 Leon Kladnitsky 2022-05-27 02:06:12 UTC
Verified on v4.11.0-388 OCP-4.11.0

Comment 4 errata-xmlrpc 2022-09-14 19:34:26 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.11.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-2022:6526