diff options
author | Davanum Srinivas <davanum@gmail.com> | 2012-10-24 21:56:49 -0400 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2012-10-27 01:19:36 +0000 |
commit | 27a5753dd3766b5535e0248d48c9bb555379dd12 (patch) | |
tree | 58346c99c778f10e3a388ab1827fea548042d20e /nova/scheduler/driver.py | |
parent | 80d32286bdb5b886197e03fc8ad924d27c1ae122 (diff) | |
download | nova-27a5753dd3766b5535e0248d48c9bb555379dd12.tar.gz nova-27a5753dd3766b5535e0248d48c9bb555379dd12.tar.xz nova-27a5753dd3766b5535e0248d48c9bb555379dd12.zip |
Fix check for memory_mb
assert_compute_node_has_enough_memory should check memory_mb is None or not
_assert_dest_node_has_enough_disk should check available_mb as well
Fixes bug 884842
Change-Id: Ieaa33efd50bb84f1b475c437b26af1302fdfd19f
Diffstat (limited to 'nova/scheduler/driver.py')
-rw-r--r-- | nova/scheduler/driver.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nova/scheduler/driver.py b/nova/scheduler/driver.py index 5cbe925c5..90e1a004b 100644 --- a/nova/scheduler/driver.py +++ b/nova/scheduler/driver.py @@ -329,7 +329,7 @@ class Scheduler(object): mem_inst = instance_ref['memory_mb'] avail = avail - used - if avail <= mem_inst: + if not mem_inst or avail <= mem_inst: instance_uuid = instance_ref['uuid'] reason = _("Unable to migrate %(instance_uuid)s to %(dest)s: " "Lack of memory(host:%(avail)s <= " |