Resource limits check sometimes enforced when using forced scheduling

Bug #1231963 reported by Phil Day
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Fix Released
Medium
Phil Day

Bug Description

Resource limit checks on a compute manager are based on the contents of
filter_properites[‘limits’]. This in turn is populated by the scheduler after the
host has been selected by scheduler.utils.populate_filter_properties. The limits
value is taken from the host_state, which is maintained as a local data in the
host manager. The host_state limits values are populated by the various filters,
for example the ram filter sets limits[‘memory_mb’] based on its configuration.

In the case of scheduling to a forced host the filters are bypassed, so the contents
of the host_state[‘limits’] value depends on whether the scheduler has already
placed a non-forced instance onto that host (and thus run the filters to populate
the limits). If it has then the compute manager will impose the limits, if it
hasn’t then the limits will be empty and there will be no check.

As forcing bypasses the filters and is a privileged operation the limits should
always be cleared in the filter_properties in this case

Tags: scheduler
Phil Day (philip-day)
Changed in nova:
assignee: nobody → Phil Day (philip-day)
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/48666

Matt Riedemann (mriedem)
Changed in nova:
status: New → In Progress
tags: added: scheduler
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (master)

Reviewed: https://review.openstack.org/48666
Committed: http://github.com/openstack/nova/commit/d24df3bb7194f0ebdbd48b7c4bacd9285469f5a5
Submitter: Jenkins
Branch: master

commit d24df3bb7194f0ebdbd48b7c4bacd9285469f5a5
Author: Phil Day <email address hidden>
Date: Fri Sep 27 14:22:34 2013 +0000

    Resource limits check sometimes enforced for forced scheduling

    Resource limit checks on a compute manager are based on the
    contents of filter_properites['limits']. This in turn is
    populated by the scheduler after the host has been selected by
    scheduler.utils.populate_filter_properties. The limits value
    is taken from the host_state, which is maintained as a local data
    in the host manager. The host_state limits values are populated
    by the various filters, for example the ram filter sets
    limits['memory_mb'] based on its configuration.

    In the case of scheduling to a forced host the filters are
    bypassed, so the contents of the host_state['limits'] value
    depends on whether the scheduler has already placed a non-forced
    instance onto that host (and thus run the filters to populate the
    limits). If it has then the compute manager will impose the
    limits, if it hasn't then the limits will be empty and there will
    be no check.

    As forcing bypasses the filters and is a privileged operation the
    limits should always be cleared in the filter_properties in this
    case to avoid the limit check on the compute manager.

    Fixed bug: 1231963

    Change-Id: Ic7ff5d1fc652a8bdf6a0cf8e6ef063d9f2e7ab16

Phil Day (philip-day)
Changed in nova:
milestone: none → icehouse-3
status: In Progress → Fix Committed
importance: Undecided → Medium
Thierry Carrez (ttx)
Changed in nova:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in nova:
milestone: icehouse-3 → 2014.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.