Bug 2132793

Summary: Edited Template BSR is not saved
Product: Container Native Virtualization (CNV) Reporter: Leon Kladnitsky <lkladnit>
Component: User ExperienceAssignee: Ugo Palatucci <upalatuc>
Status: CLOSED CURRENTRELEASE QA Contact: Leon Kladnitsky <lkladnit>
Severity: medium Docs Contact:
Priority: high    
Version: 4.12.0CC: cnv-qe-bugs, gouyang, upalatuc
Target Milestone: ---   
Target Release: 4.12.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: 2022-11-21 02:45:40 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 Leon Kladnitsky 2022-10-06 17:44:47 UTC
Description of problem: When editing boot source rererence of Template, the changes are not saved


Version-Release number of selected component (if applicable): v4.12.0-131


How reproducible: always


Steps to Reproduce:
1. Select Template without source, e.g. windows11-desktop-large
2. Select Edit boot source reference from Actions menu
3. Provide boot reference, e.g. Registry/quay.io/containerdisks/centos:7-2009 or URL/http://cnv-qe-server.rhevdev.lab.eng.rdu2.redhat.com/files/cnv-tests/cirros-images/cirros-0.5.1-x86_64-disk.img
4. Save
5. Select Edit boot source reference from Actions menu again

Actual results: Changes are not saved


Expected results: Changes are saved, Template has "Source available" label in Templates list and Catalog


Additional info: related problem in 4.11: https://bugzilla.redhat.com/show_bug.cgi?id=2106179

Comment 1 Leon Kladnitsky 2022-10-26 20:18:24 UTC
The bug is fixed, you need to manually move this bug to ON_QA, so it can be verified.

Comment 2 Leon Kladnitsky 2022-10-27 08:37:54 UTC
Verified on v4.12.0-147

Comment 4 Leon Kladnitsky 2022-10-31 08:14:59 UTC
Regression in KCP v4.12.0-149.

The BSR is not saved, "Source available" label is not added to the Template, though the DV for it is created.

Comment 5 Guohua Ouyang 2022-11-07 11:35:17 UTC
DVs are garbage collected in 4.12, let's retest this on a newer CNV version.

Comment 6 Ugo Palatucci 2022-11-07 12:13:28 UTC
After the BSR change, the template list would not update its data.

Now the DV and PVC statuses are fetched only at the initial render and the resources are not in a 'watching' state.
if the resource change, the user will not have any clue unless change pages and return to the template list.


We could put some effort into having a responsive table (from a DV viewpoint) so that when the DV change, the template list will change accordingly.

But, when the user changes the BSR, the new data source will be fetched and the DV enter in a 'CloneInProgress' state before the 'Available' state. The DV can remain in a 'CloneInProgress' state before moving to 'Available' for quite some time. 
So, we'll never have an imminent 'Source available' label when submitting BSR even with a 'watching' state.
If we want to give 'feedback' to the user after the BSR submission, we could render a 'cloneInProgress' label.

Hope this clarify the situation

Comment 7 Guohua Ouyang 2022-11-16 11:50:24 UTC
We will use the jira card https://issues.redhat.com/browse/CNV-21974 to add label 'CloneInProgress' to template.

QE will test the boot source become "Source available" after editing the boot source reference.

Comment 8 Ugo Palatucci 2022-11-17 14:08:30 UTC
@gouyang so, can we close this bug?

Comment 9 Guohua Ouyang 2022-11-21 02:45:40 UTC
Close the bug as the source is available on the latest CNV build.