Bug 2172390 - Enable CPU and Memory editing in the side drawer when creating a VM from a template
Summary: Enable CPU and Memory editing in the side drawer when creating a VM from a te...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Container Native Virtualization (CNV)
Classification: Red Hat
Component: User Experience
Version: 4.13.0
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.14.0
Assignee: Hilda Stastna
QA Contact: Guohua Ouyang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-02-22 08:01 UTC by Guohua Ouyang
Modified: 2024-03-08 04:25 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2023-11-08 14:05:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github kubevirt-ui kubevirt-plugin pull 1275 0 None open [WIP] Bug 2172390: Enable CPU, Memory editing in the drawer 2023-04-24 19:27:41 UTC
Red Hat Issue Tracker CNV-26044 0 None None None 2023-02-22 08:03:02 UTC
Red Hat Product Errata RHSA-2023:6817 0 None None None 2023-11-08 14:05:33 UTC

Description Guohua Ouyang 2023-02-22 08:01:49 UTC
Description of problem:
Enable CPU and Memory editing in the side drawer when creating a VM from a template

UX doc: https://docs.google.com/document/d/134raBlCMKZJvpUDV0zb2gBqSoa4aRuB2OZVp-LrG2yU/edit 

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Tal Nisan 2023-03-01 09:46:19 UTC
Yifat, what's your take on it?

Comment 2 Yifat Menchik 2023-03-01 09:51:30 UTC
I created a design doc https://docs.google.com/document/d/134raBlCMKZJvpUDV0zb2gBqSoa4aRuB2OZVp-LrG2yU/edit

Comment 3 Ugo Palatucci 2023-04-21 14:59:40 UTC
@gouyang @yfrimanm 

Guys we have an issue. 
I have a template with 1 core, 2 sockets and 1 thread.
With this configuration we display just: 2 CPU as we multiply 1 x 2 x 1

In the Cpu Memory modal we edit just CPU CORES, so when I open the modal with this template, the core is 1.
If I increment to 2 Cores, the CPU at the end is 4: 2 x 2 x 1.


I think we are creating some confusion for the user at this point between Cores and CPU. What do you think?

My suggestion is to give the option to edit also sockets and threads in the modal and add a help icon with a popover that explain this multiplication as we do in other parts

Comment 8 Guohua Ouyang 2023-04-23 00:47:12 UTC
(In reply to Ugo Palatucci from comment #3)
> @gouyang @yfrimanm 
> 
> Guys we have an issue. 
> I have a template with 1 core, 2 sockets and 1 thread.
> With this configuration we display just: 2 CPU as we multiply 1 x 2 x 1
> 
> In the Cpu Memory modal we edit just CPU CORES, so when I open the modal
> with this template, the core is 1.
> If I increment to 2 Cores, the CPU at the end is 4: 2 x 2 x 1.
> 
> 
> I think we are creating some confusion for the user at this point between
> Cores and CPU. What do you think?
> 
> My suggestion is to give the option to edit also sockets and threads in the
> modal and add a help icon with a popover that explain this multiplication as
> we do in other parts

https://bugzilla.redhat.com/show_bug.cgi?id=2087540#c7

This is what we've discussed last time, the solution is:
1. CPU number is cores * sockets * threads
2. A help text is added to explain how the CPU number is calculated
3. In the modal, it changes the CPU to core and only core is enabled for editing

Comment 9 Ronen 2023-04-23 08:02:57 UTC
To simplify the VM definition we agreed that the user should not be able to change the sockets or threads in the UI.
We should focus on the vCPU and the backend will decide how to split them to cores/sockets and threads.
https://bugzilla.redhat.com/show_bug.cgi?id=2087540 saw about a similar issue and was resolved. We may need to see if it applies to this scenario as well

Comment 10 Yifat Menchik 2023-04-25 07:15:03 UTC
Please review the UX doc
https://docs.google.com/document/d/134raBlCMKZJvpUDV0zb2gBqSoa4aRuB2OZVp-LrG2yU/edit

Comment 11 Hilda Stastna 2023-04-25 20:12:12 UTC
> This is what we've discussed last time, the solution is:
> ...
> 2. A help text is added to explain how the CPU number is calculated
> ...

And where was the help text added to explain the CPU number calculations? I cannot see it anywhere implemented.
Or do we have some other design for that already? It isn't in the UX doc Yifat provided in the Comment 10.
Thanks.

Comment 12 Yifat Menchik 2023-04-27 13:21:55 UTC
Can we have something similar to the popover we have for CPU Mem in the VM Details page?
I mean add "?" next to the title with a popover saying:
CPUs = sockets X threads X cores.
This VirtualMachine currently has X sockets, X threads, and X cores.
WDYT?

Comment 13 Matan Schatzman 2023-04-30 08:48:56 UTC
(In reply to Yifat Menchik from comment #12)
> Can we have something similar to the popover we have for CPU Mem in the VM
> Details page?
> I mean add "?" next to the title with a popover saying:
> CPUs = sockets X threads X cores.
> This VirtualMachine currently has X sockets, X threads, and X cores.
> WDYT?

I think we should add a sentence referring to which value is edited in these fields. Like pop-over will be 
Cpus are determined by sockets X threads X cores.
This VirtualMachine currently has X sockets, X threads, and X cores.
Editing this field will change the cores quantity.

This is just a suggestion wdyt @yfrimanm , @rsdeor , @apinnick  ?

Comment 14 Ronen 2023-04-30 13:11:15 UTC
@mschatzm I believe this is what Yifat suggested. This is what we have now when changing the CPU/mem after the VM was created

Comment 15 Hilda Stastna 2023-05-02 18:12:58 UTC
Matan, Ronen, I've found we do already have something like that but IMO
'This VirtualMachine has {{sockets}} sockets, {{threads}} threads, and {{cores}} cores.'
is not applicable for template in catalog or for a VM that is just being created (Review
and create VirtualMachine page), because it would be misleading to the user ("which VM?
I haven't created any yet!"). I am not sure how to formulate such a sentence for each
specific case. I am leaving this as it is till we found some nice solution for that.

Comment 16 Ronen 2023-05-02 20:28:37 UTC
Hi Hilda, I think we can just change the sentence to say something like:
"'The VirtualMachine will have {{sockets}} sockets, ..."

Comment 17 Hilda Stastna 2023-05-10 18:57:15 UTC
Hi Yifat, Ronen,

I found that most of the existing help texts for CPU calculation are misleading/incorrect, except VM Details page,
because they say "This VirtualMachine..." when being on a Template Details.

This problem occurs for: VM Template, VMI, also when being on Review and create VirtualMachine page (customize VM).
I've better created a separate bug for that, where you can propose a solution:

PTAL https://bugzilla.redhat.com/show_bug.cgi?id=2196912

I also suggest adding missing help text for newly editable CPU | Memory field in the drawer within that new bug, not this one.
Maybe it would be good to use the sentence suggested in Comment 16 for that, maybe same also in Review and create VirtualMachine page,
as the VM is not really created yet in that stage of VM creation.

Thanks.

Comment 18 Yifat Menchik 2023-05-11 07:55:01 UTC
"I found that most of the existing help texts for CPU calculation are misleading/incorrect, except VM Details page, because they say "This VirtualMachine..." when being on a Template Details. >> I think that maybe we can change "This VirtualMachine..." to "The VirtualMachine created from this template will have...", but I think it requires docs review. @sjess please advise. 

"I also suggest adding missing help text for newly editable CPU | Memory field in the drawer within that new bug, not this one. Maybe it would be good to use the sentence suggested in Comment 16 for that, maybe same also in Review and create VirtualMachine page,
as the VM is not really created yet in that stage of VM creation." >> +1.

Comment 19 Ronen 2023-05-11 14:34:24 UTC
+1 on what Yifat said in comment 18.

Comment 20 Avital Pinnick 2023-05-24 09:27:36 UTC
I have some comments about the help text for CPU/memory:

1. The help text does not distinguish between singular and plural, so you will end up with mistakes like "This VirtualMachine has 2 sockets, 1 threads, and 1 cores." I'm not sure you can fix that at this point.
2. "X" in "sockets X threads X cores" looks weird. It would make more sense to use "sockets x threads x cores" or "sockets * threads * cores".
3. Re: VM that does not yet exist. I think the simplest solution is to use the future tense: "The VirtualMachine will have  ...", even though we do not often use the future tense in technical documentation. If you use the future tense, you do not need to say "... created from this template" because this is obvious from the context.

Some screenshots in the design doc have the label "CPUs cores". If this is current, please change to "CPU cores". "CPU" is an adjective modifying "cores". Adjectives do not have singular/plural forms.

Comment 21 Hilda Stastna 2023-05-24 09:37:19 UTC
Avital,

please add comments about help text to this BZ: https://bugzilla.redhat.com/show_bug.cgi?id=2196912 as it is related to help text itself. Thanks.

Comment 22 Guohua Ouyang 2023-05-29 02:14:15 UTC
Only one small issue is the button "Restore template settings" is disabled in the modal when the template is create from default yaml, however, if click the customize button and proceed to VM overview tab, the button is enabled normally while open the CPU/Mem modal.

Comment 23 Hilda Stastna 2023-05-29 10:15:17 UTC
Hi Guohua,

I recommend to open a separate bug for this as it looks like a bug in the CPU/Memory modal component itself.
We use this component in more places of the UI, where "CPU | Memory" field occurs. I wasn't changing the component
when working on this feature. Thanks.

Comment 24 Guohua Ouyang 2023-05-29 12:01:25 UTC
(In reply to Hilda Stastna from comment #23)
> Hi Guohua,
> 
> I recommend to open a separate bug for this as it looks like a bug in the
> CPU/Memory modal component itself.
> We use this component in more places of the UI, where "CPU | Memory" field
> occurs. I wasn't changing the component
> when working on this feature. Thanks.

Sounds fine, so move the bug to verified.

Comment 28 errata-xmlrpc 2023-11-08 14:05:04 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 (Important: OpenShift Virtualization 4.14.0 Images 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-2023:6817

Comment 29 Red Hat Bugzilla 2024-03-08 04:25:23 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 120 days


Note You need to log in before you can comment on or make changes to this bug.