Commit ee01f4d
committed
webadmin: fix template creation resource issues
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]>1 parent cc21354 commit ee01f4d
File tree
2 files changed
+6
-8
lines changed- frontend/webadmin/modules/uicommonweb/src/main/java/org/ovirt/engine/ui/uicommonweb/models/vms
2 files changed
+6
-8
lines changedLines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1326 | 1326 | | |
1327 | 1327 | | |
1328 | 1328 | | |
1329 | | - | |
1330 | | - | |
1331 | | - | |
1332 | | - | |
1333 | | - | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
1334 | 1332 | | |
1335 | 1333 | | |
1336 | 1334 | | |
| |||
2193 | 2191 | | |
2194 | 2192 | | |
2195 | 2193 | | |
2196 | | - | |
| 2194 | + | |
2197 | 2195 | | |
2198 | 2196 | | |
2199 | 2197 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1694 | 1694 | | |
1695 | 1695 | | |
1696 | 1696 | | |
1697 | | - | |
1698 | 1697 | | |
| 1698 | + | |
1699 | 1699 | | |
1700 | 1700 | | |
1701 | 1701 | | |
1702 | 1702 | | |
1703 | 1703 | | |
1704 | 1704 | | |
1705 | 1705 | | |
1706 | | - | |
1707 | 1706 | | |
| 1707 | + | |
1708 | 1708 | | |
1709 | 1709 | | |
1710 | 1710 | | |
| |||
0 commit comments