Skip to content

Commit

Permalink
webadmin: Refresh VM numa nodes when VM memory or CPU cores are changed
Browse files Browse the repository at this point in the history
When the total memory of a VM or the number of its CPU cores
is changed while editing, the numa nodes are changed
to fit the new values.

Change-Id: I9fee622ec205c6495885086b221482593b15eb7b
Bug-Url: https://bugzilla.redhat.com/1291064
Signed-off-by: Andrej Krejcir <akrejcir@redhat.com>
  • Loading branch information
akrejcir authored and tnisan committed Jan 10, 2017
1 parent c1111e0 commit 9ce0636
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2571,6 +2571,7 @@ private void headlessModeChanged() {
private void memSize_EntityChanged(Object sender, EventArgs args) {
behavior.updateMinAllocatedMemory();
if (getMemSize().getEntity() != null) {
setNumaChanged(true);
maxMemorySize.setEntity(getMemSize().getEntity() * DEFAULT_MAX_MEMORY_RATIO);
}
}
Expand All @@ -2580,6 +2581,7 @@ private void totalCPUCores_EntityChanged(Object sender, EventArgs args) {
removeCPUListeners();

behavior.totalCpuCoresChanged();
setNumaChanged(true);

// start listening again
addCPUListeners();
Expand Down

0 comments on commit 9ce0636

Please sign in to comment.