Bug 1877822

Summary: The OS which already has a golden image can not be selected in upload screen
Product: OpenShift Container Platform Reporter: Tomas Jelinek <tjelinek>
Component: Console Kubevirt PluginAssignee: Tomas Jelinek <tjelinek>
Status: CLOSED ERRATA QA Contact: Guohua Ouyang <gouyang>
Severity: high Docs Contact:
Priority: high    
Version: 4.6CC: alitke, aos-bugs, danken, gouyang, mcarleto
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: ux_issue
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-10-27 16:39:36 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 Tomas Jelinek 2020-09-10 14:07:04 UTC
Description of problem:
If I try to select an OS which already has a golden image in the PVC->upload screen, I can not. And there is no indication as of how to update it or delete it.

What we should do instead is to let the user to pick it (keep the "default image  already exists label in the list"), and if it is selected, disable the screen and explain that "This operating system already has an image associated. You can go to the PVC screen to delete it". The "PVC screen" part should be a clickable link which brings you to the correct namespace.

Comment 1 Dan Kenigsberg 2020-09-10 14:39:38 UTC
Note that uploading should be atomic. We must not upload data to the PV which is referred to by the template, as cloning it mid-way would create corrupted VMs. Fabian suggested to upload to a new PV and then swap the PV reference in the "golden" PVC. Finally, the old PV can be scheduled for deletion once nothing reads from it.

Comment 2 Matt 2020-09-11 19:55:53 UTC
Ideally the user would see that OS has an existing source but they should be able to select it. 
Here's a design for what I'm thinking
https://xd.adobe.com/view/2d9ea5e4-2d79-4cf6-a89c-f91ca15a762e-78cd/

Comment 3 Tomas Jelinek 2020-09-13 17:31:16 UTC
(In reply to Dan Kenigsberg from comment #1)
> Note that uploading should be atomic. We must not upload data to the PV
> which is referred to by the template, as cloning it mid-way would create
> corrupted VMs. 

@Adam, I think CDI should make sure that you can not clone an image while something is being uploaded to. Am I right?

> Fabian suggested to upload to a new PV and then swap the PV
> reference in the "golden" PVC. Finally, the old PV can be scheduled for
> deletion once nothing reads from it.

Comment 5 Guohua Ouyang 2020-09-22 02:34:31 UTC
verified on master, it alerts user need to delete the existing pvc.

Comment 8 errata-xmlrpc 2020-10-27 16:39:36 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 Container Platform 4.6 GA 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/RHBA-2020:4196