_assert_compute_node_has_enough_memory doesn't support ram overcommit

Bug #1068258 reported by Joe Breu
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
High
Hans Lindgren

Bug Description

Cluster configuration

compute-nodeA (4GB) of RAM reported in OS as 4010MB
1 instance launched using 2048MB RAM

compute-nodeB (4GB) of RAM reported in OS as 4010MB
2 instances launched using 2048MB RAM each

With this configuration it is not possible to migrate an instance from compute-nodeB to compute-nodeA and the scheduler reports the following:

2012-10-18 17:34:51 WARNING nova.scheduler.manager [req-ce210164-9c16-4b3a-81ab-56dfd3c52803 f8f84ef1468540fc9dfa85fcf16c53a4 29715cb8427146aeb36841b4cbc8f728] Failed to schedule_live_migratio
n: Migration error: Unable to migrate 15ca5cf7-649a-4f78-a554-9b83907eafc2 to rhel-compute1: Lack of memory(host:1962 <= instance:2048)
2012-10-18 17:34:51 ERROR nova.rpc.amqp [req-ce210164-9c16-4b3a-81ab-56dfd3c52803 f8f84ef1468540fc9dfa85fcf16c53a4 29715cb8427146aeb36841b4cbc8f728] Exception during message handling
2012-10-18 17:34:51 TRACE nova.rpc.amqp Traceback (most recent call last):
2012-10-18 17:34:51 TRACE nova.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/rpc/amqp.py", line 253, in _process_data
2012-10-18 17:34:51 TRACE nova.rpc.amqp rval = node_func(context=ctxt, **node_args)
2012-10-18 17:34:51 TRACE nova.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/scheduler/manager.py", line 97, in _schedule
2012-10-18 17:34:51 TRACE nova.rpc.amqp context, ex, *args, **kwargs)
2012-10-18 17:34:51 TRACE nova.rpc.amqp File "/usr/lib64/python2.6/contextlib.py", line 23, in __exit__
2012-10-18 17:34:51 TRACE nova.rpc.amqp self.gen.next()
2012-10-18 17:34:51 TRACE nova.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/scheduler/manager.py", line 92, in _schedule
2012-10-18 17:34:51 TRACE nova.rpc.amqp return driver_method(*args, **kwargs)
2012-10-18 17:34:51 TRACE nova.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/scheduler/driver.py", line 218, in schedule_live_migration
2012-10-18 17:34:51 TRACE nova.rpc.amqp disk_over_commit)
2012-10-18 17:34:51 TRACE nova.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/scheduler/driver.py", line 301, in _live_migration_dest_check
2012-10-18 17:34:51 TRACE nova.rpc.amqp disk_over_commit)
2012-10-18 17:34:51 TRACE nova.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/scheduler/driver.py", line 389, in assert_compute_node_has_enough_resources
2012-10-18 17:34:51 TRACE nova.rpc.amqp instance_ref, dest)
2012-10-18 17:34:51 TRACE nova.rpc.amqp File "/usr/lib/python2.6/site-packages/nova/scheduler/driver.py", line 422, in assert_compute_node_has_enough_memory
2012-10-18 17:34:51 TRACE nova.rpc.amqp raise exception.MigrationError(reason=reason % locals())
2012-10-18 17:34:51 TRACE nova.rpc.amqp MigrationError: Migration error: Unable to migrate 15ca5cf7-649a-4f78-a554-9b83907eafc2 to rhel-compute1: Lack of memory(host:1962 <= instance:2048)
2012-10-18 17:34:51 TRACE nova.rpc.amqp

/etc/nova/nova.conf:
compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler
scheduler_available_filters=nova.scheduler.filters.standard_filters
scheduler_default_filters=AvailabilityZoneFilter,RamFilter,ComputeFilter,CoreFilter,SameHostFilter,DifferentHostFilter
ram_allocation_ratio=1.5

Revision history for this message
Russell Bryant (russellb) wrote :

What nova version?

Changed in nova:
status: New → Incomplete
importance: Undecided → High
Revision history for this message
Hans Lindgren (hanlind) wrote :

This bug exists in trunk as well as stable/folsom.

Changed in nova:
status: Incomplete → Confirmed
Hans Lindgren (hanlind)
Changed in nova:
assignee: nobody → Hans Lindgren (hanlind)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (master)

Fix proposed to branch: master
Review: https://review.openstack.org/19369

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/19369
Committed: http://github.com/openstack/nova/commit/3783cf3cc9c571beb9c75e5b0e39bf449520aaf3
Submitter: Jenkins
Branch: master

commit 3783cf3cc9c571beb9c75e5b0e39bf449520aaf3
Author: Hans Lindgren <email address hidden>
Date: Wed Jan 9 16:01:52 2013 +0100

    Add support for memory overcommit in live-migration

    Override the live-migration memory check in FilterScheduler and
    make it use RamFilter for checking available memory on target
    host.

    Resolves bug 1068258.

    Change-Id: I3002b8330e595ce71e2718b2091d3b0b99747707

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in nova:
milestone: none → grizzly-3
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to nova (stable/folsom)

Fix proposed to branch: stable/folsom
Review: https://review.openstack.org/22871

Thierry Carrez (ttx)
Changed in nova:
milestone: grizzly-3 → 2013.1
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.