Bug 2091856

Summary: “Edit BootSource” action should have more explicit information when disabled
Product: Container Native Virtualization (CNV) Reporter: Leon Kladnitsky <lkladnit>
Component: DocumentationAssignee: Avital Pinnick <apinnick>
Status: CLOSED CURRENTRELEASE QA Contact: Leon Kladnitsky <lkladnit>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.11.0CC: apinnick, bgaydos, cnv-qe-bugs, gouyang, rsdeor, upalatuc, ycui, yfrimanm, yzamir
Target Milestone: ---Keywords: Reopened
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:
: 2092951 (view as bug list) Environment:
Last Closed: 2023-01-16 14:45:01 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
kebab action menu
none
Red Hat Template that doesn’t use source reference
none
Red Hat Template that uses source reference
none
Custom Template that doesn’t use source reference
none
Custom Template that uses source reference none

Description Leon Kladnitsky 2022-05-31 07:54:52 UTC
Created attachment 1885428 [details]
kebab action menu

Description of problem: When "Edit BS" action is disabled in template kebab it should has helper text with the reason why it's disabled, see attached screenshot


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Yifat Menchik 2022-05-31 10:01:17 UTC
@apinnick can you please advise? Thank you.

Comment 2 Avital Pinnick 2022-05-31 10:16:23 UTC
@yfrimanm 
Unless I am missing something, I think it is self-explanatory. The user cannot edit Red Hat Supported or Red Hat Provided templates in any way, including changing the boot source. This is in the documentation: https://docs.openshift.com/container-platform/4.10/virt/vm_templates/virt-creating-vm-template.html

If a user wants to edit the boot source, they would have to first clone the template. Then it becomes a User Supported or User Provided template. 

If this were a tooltip, you could add a line about cloning the template. I do not think you will have enough room on a menu to add more text.

Comment 3 Yifat Menchik 2022-06-01 12:48:07 UTC
@apinnick this is more complexed than that so I will schedule a meeting to get the accurate explanations from @yzamir

Comment 5 Yifat Menchik 2022-06-02 15:25:30 UTC
We agreed about 3 states for Edit of the Boot Source:
1. Edit Boot source - this will affect only the selected template 
2. Edit Boot reference - this will change the Boot source that may be used by other templates
3. Edit Boot source (action is disabled) in case the Boot source can't be edited

Comment 6 Ugo Palatucci 2022-06-03 08:23:45 UTC
@yzamir don't think we can do point 1. We would understand if other templates have the same source. But the other two are great :-)

Yaacov what do you think?

Comment 7 Yifat Menchik 2022-06-06 13:37:21 UTC
Created attachment 1887184 [details]
Red Hat Template that doesn’t use source reference

Comment 8 Yifat Menchik 2022-06-06 13:37:52 UTC
Created attachment 1887185 [details]
Red Hat Template that uses source reference

Comment 9 Yifat Menchik 2022-06-06 13:39:03 UTC
Created attachment 1887186 [details]
Custom Template that doesn’t use source reference

Comment 10 Yifat Menchik 2022-06-06 13:39:31 UTC
Created attachment 1887187 [details]
Custom Template that uses source reference

Comment 12 Ronen 2022-06-08 08:37:36 UTC
We decided to split the operations:
Edit boot source - Affects only the specific template - Can be done only on non-RH templates
Edit boot reference - Can be done only when the template is using a boot reference and will change the reference (may affect multiple templates)

Comment 13 Yifat Menchik 2022-06-08 09:09:55 UTC
Please see the attached 4 use cases for the drop down menu regarding splitting the Boot source into: Edit boot source and Edit boot source reference:
Red Hat Template that doesn’t use source reference
Red Hat Template that uses source reference
Custom Template that doesn’t use source reference
Custom Template that uses source reference

Comment 14 Ugo Palatucci 2022-06-08 14:01:08 UTC
Guys, we've talked a little bit with the CNV storage team.

if we change the source and the DataSource is part of a DataImportCron, the cron job will detect a change in the storage digest and will retrieve the original content discarding the changes.
Since removing the DataSource from the DiC is not an option, we have to disable the edit if the DataSource is part of a DiC.

Comment 15 Ugo Palatucci 2022-06-09 08:02:10 UTC
What do you think if we create two different descriptions when 'Edit boot source reference' is disabled?

- 'Template does not use boot source reference' when template does not have a boot source reference obv
- 'Boot source reference cannot be edited' when the boot source reference is in DiC

@yfrimanm ?

Comment 16 Yifat Menchik 2022-06-09 09:06:54 UTC
@upalatuc Looks good to me, but can you please send a link to view this before you implement?
Thanks.

Comment 17 Ugo Palatucci 2022-06-09 09:32:27 UTC
I've created a pr here (https://github.com/kubevirt-ui/kubevirt-plugin/pull/581) 
It's on hold so will not be merged until is okay for you

Comment 18 Yifat Menchik 2022-06-09 10:11:43 UTC
Thank you @upalatuc. Looks great!

Comment 20 Ugo Palatucci 2022-07-05 13:31:01 UTC
Hei @apinnick the capitalization was fixed here: https://github.com/kubevirt-ui/kubevirt-plugin/pull/596.

Don't know why this pr is not attached

Comment 21 Avital Pinnick 2022-07-05 16:08:20 UTC
(In reply to Ugo Palatucci from comment #20)
> Hei @apinnick the capitalization was fixed here:
> https://github.com/kubevirt-ui/kubevirt-plugin/pull/596.
> 
> Don't know why this pr is not attached

I changed the status of this bug to "New" so that the "Edit BootSource" info would be added to the documentation. This is not connected with your PR. I hope that makes every thing clearer.

Comment 24 Bob Gaydos 2022-09-21 23:27:39 UTC
Thanks @ctomasko, will do.

Comment 25 Bob Gaydos 2022-11-22 21:49:44 UTC
Hi @lkladnit -

Please review https://github.com/openshift/openshift-docs/pull/53119 

If you approve, I can go to peer review and merge/pick from 4.8-4.12.

Direct doc preview link: https://53119--docspreview.netlify.app/openshift-enterprise/latest/virt/vm_templates/virt-editing-vm-template.html

Thanks,

Bob

Comment 36 errata-xmlrpc 2022-12-01 21:10:21 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 (Moderate: OpenShift Virtualization 4.11.1 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:8750

Comment 38 Leon Kladnitsky 2023-01-15 10:44:03 UTC
Verified on kubevirt-console-plugin-container-v4.12.0-182

Comment 39 Avital Pinnick 2023-01-16 14:45:01 UTC
Changes approved and merged.