-
Notifications
You must be signed in to change notification settings - Fork 291
webadmin: fix template creation resource issues #1034
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
7891a13 to
ad61bf1
Compare
|
Updated commit message to be more detailed and include author signature "signed-off-by" |
|
Please structure your commit message following the guidelines provided in CONTRIBUTING.adoc |
ad61bf1 to
ee01f4d
Compare
|
Updated commit message to follow the guidelines provided in CONTRIBUTING.adoc:
|
Fixes an issue where creating a template from a VM or VM snapshot can result in incorrect vCPU values and potentially incorrect memory values in the template. With this change, VmListModel.onNewTemplate() now runs model.validate() so that "Create Template" could fail fast if the VM model is invalid, instead of creating a template with wrong memory/CPU settings. Furthermore, getTotalCpuCores() is now called inside a callback function in order to avoid a race condition. Signed-off-by: Guoyong Zhang <[email protected]>
ee01f4d to
86be6e5
Compare
|
Can this please be reviewed and considered for merge? Thank you |
|
You suggest that this issue only surfaces when the VM is set to something else then "Other OS". Why is this? |
|
When the VM is set to "Other OS", we found that there are less calls to the faulty VmModelBehaviorBase.updateMemory() and updateTotalCpuCores() functions. There are less UnitVmModel.oSType_SelectedItemChanged invocations if the VM is set to "Other OS". oSType_SelectedItemChanged calls VmModelBehaviorBase.updateMemory() and updateTotalCpuCores(). Thus there are less calls to VmModelBehaviorBase.updateMemory() and updateTotalCpuCores(). As a result, the bug doesn't or almost never occurs when the VM is set to "Other OS". By incorrect vCPU and memory, we mean that the user specified settings for "Total Virtual CPUs" and "Memory Size" are set to some value other than what the user specifies when creating the template. In some test runs, for example, I set the vCPU value to 3 but after creating the template, the vCPU value was 1. |
Issues
This results in incorrect vCPU values and potentially incorrect memory values when creating a template from a VM or VM snapshot. This does not occur if the VM has its operating system set to "Other OS".
Changes introduced with this PR
Manual tests performed
Are you the owner of the code you are sending in, or do you have permission of the owner?
yes