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.
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.
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/
(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.
verified on master, it alerts user need to delete the existing pvc.
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