Bug 2088034 - Virtualization Overview crashes when a VirtualMachine has no labels
Summary: Virtualization Overview crashes when a VirtualMachine has no labels
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: User Experience
Version: 4.10.0
Hardware: All
OS: All
medium
medium
Target Milestone: ---
: 4.11.0
Assignee: Matan Schatzman
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-05-18 17:23 UTC by Jason Kincl
Modified: 2023-11-13 08:11 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-14 19:34:26 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt-ui kubevirt-plugin pull 449 0 None open Bug 2088034: Add optional chaining to getTemplateToVMCountMap 2022-05-19 08:37:45 UTC
Red Hat Issue Tracker CNV-18442 0 None None None 2023-11-13 08:11:53 UTC
Red Hat Product Errata RHSA-2022:6526 0 None None None 2022-09-14 19:34:35 UTC

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


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