mirror of
https://github.com/retspen/webvirtcloud
synced 2026-11-10 12:16:49 +00:00
fix(instances): a paused VM's memory is resized as a running VM's
Only a running VM counted as active, so a paused one (or one blocked, PM-suspended or shutting down) had its maximum and current memory written for the next boot and nothing applied live. Every active VM now has its current memory changed live and in its definition and keeps its maximum; a paused guest takes the new size once resumed. The quota check follows the same rule. Checked on a real guest: paused, shrunk, resumed, then grown back.
This commit is contained in:
parent
7b5c2cd057
commit
251ddbbec1
7 changed files with 55 additions and 9 deletions
|
|
@ -64,7 +64,7 @@ class MissingFieldTestCase(TestCase):
|
|||
self.assert_reported(self.post("resizevm_cpu", {"vcpu": "²", "cur_vcpu": "1"}))
|
||||
|
||||
def test_resize_memory_with_a_unicode_digit(self):
|
||||
self.assert_reported(self.post("resize_memory", {"memory_custom": "²", "cur_memory": "512"}))
|
||||
self.assert_reported(self.post("resize_memory", {"memory": "512", "cur_memory_custom": "²"}))
|
||||
|
||||
def test_set_qos_with_non_numeric_rate(self):
|
||||
self.assert_reported(self.post("set_qos", {"qos_direction": "inbound", "net-mac-0": "52:54:00:00:00:01", "qos_average": "fast"}))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue