From 7dba1d9aa989760b190f1cf3bad2ed22bb2e2fc5 Mon Sep 17 00:00:00 2001 From: Aaron Lee Date: Mon, 26 Sep 2011 18:22:03 -0500 Subject: Raise InsufficientFreeMemory Kind of fixes bug 851374 & bug 858679 Raises InsufficientFreeMemory if an instance can't start because of that. This will cause the normal instance failure recovery to catch this problem, set the state, and log the error. This also removes instance_set_state from db/api.py as that was causing these exceptions in the first place. Change-Id: I199aa6900890531b175e28c3b93d8dfb88e135d0 --- nova/tests/test_xenapi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'nova/tests') diff --git a/nova/tests/test_xenapi.py b/nova/tests/test_xenapi.py index 2cacd2364..ec0104783 100644 --- a/nova/tests/test_xenapi.py +++ b/nova/tests/test_xenapi.py @@ -413,7 +413,7 @@ class XenAPIVMTestCase(test.TestCase): self.check_vm_params_for_linux() def test_spawn_not_enough_memory(self): - self.assertRaises(Exception, + self.assertRaises(exception.InsufficientFreeMemory, self._test_spawn, 1, 2, 3, "4") # m1.xlarge -- cgit