Bug 2203187

Summary: Add disk from "PVC (creates PVC)" is failed
Product: Container Native Virtualization (CNV) Reporter: Guohua Ouyang <gouyang>
Component: User ExperienceAssignee: Hilda Stastna <hstastna>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: medium Docs Contact:
Priority: high    
Version: 4.14.0CC: gouyang
Target Milestone: ---Keywords: Regression
Target Release: 4.14.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-06-20 13:41:05 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:
Attachments:
Description Flags
error while adding disk
none
The size is NaN on template's disk tab none

Description Guohua Ouyang 2023-05-11 13:12:25 UTC
Created attachment 1964012 [details]
error while adding disk

Description of problem:
Add disk from "PVC (creates PVC)" is failed with below error:
admission webhook "virtualmachines-mutator.kubevirt.io" denied the request: quantities must match the regular expression '^([+-]?[0-9.]+)([eEinumkKMGTP]*[-+]?[0-9]*)$'

The problem happens in catalog (while creating the VM -> VM disk tab) and VM disk tab (after the VM is created), not happen to template disk tab.

However, in the add disk modal, clear the size field and type with the same number, the problem is gone.

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


How reproducible:


Steps to Reproduce:
1. Add disk from "PVC (creates PVC)" 
2. Select and project and a PVC
3. Click Save

Actual results:
it failed to add the disk

Expected results:
Add disk from "PVC (creates PVC)" is okay.

Additional info:

Comment 1 Guohua Ouyang 2023-05-15 06:01:59 UTC
Created attachment 1964574 [details]
The size is NaN on template's disk tab

It also happens to template's disk modal:
1. add disk from pvc in template's disk tab
2. it shows "NaN" in the size column
3. create vm from this template will see the error in the bug description

Comment 2 Guohua Ouyang 2023-05-25 09:39:40 UTC
This is a regression caused by https://bugzilla.redhat.com/show_bug.cgi?id=2180666
Could also see the problem on 4.13.1 now as https://bugzilla.redhat.com/show_bug.cgi?id=2204527 is merged on 4.13.1
Need to fix it and backport to 4.13.1.

Comment 3 Guohua Ouyang 2023-05-29 03:54:16 UTC
Clone the issue to 4.13.1 in jira: https://issues.redhat.com/browse/CNV-29221

Comment 4 Hilda Stastna 2023-05-29 14:07:40 UTC
From what I've found when looking into this, I'd say this is not a regression in its original meaning.
The fix provided by https://bugzilla.redhat.com/show_bug.cgi?id=2180666 just revealed a hidden bug.
There can be more hidden bugs in this area.

Comment 5 Guohua Ouyang 2023-06-07 02:02:38 UTC
verified on kubevirt-console-plugin-rhel9-container-v4.14.0-1645

Comment 11 errata-xmlrpc 2023-06-20 13:41:05 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 (OpenShift Virtualization 4.13.1 Images), 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/RHEA-2023:3686