Remove duplicate code with aggregate filters

Bug #1301340 reported by Sahid Orentino on 2014-04-02
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Compute (nova)
Sahid Orentino

Bug Description

Some filters are using the same logic to handle per-aggregate options. We should create helper to remove this duplicate code and help to implement new filters based on aggregates

Filters that needs to be addressed:
 * AggregateRamFilter
 * AggregateCoreFilter,
 * AggregateTypeAffinityFilter

Changed in nova:
status: New → In Progress
Phil Day (philip-day) wrote :

I don't think its just a question of removing duplicated code - doing any DB queries in a filter (like looking up aggregate membership for a host) is a major performance issue at scale as the filter is run once per host.

The aggregate information should be extracted by the host manager and passed into the filters as part of the host state

Phil a bug has been reported for the performance impact:

Submitter: Jenkins
Branch: master

commit 878f767b9e1cdc2b57858c41d973dd087f37bbaa
Author: Sahid Orentino Ferdjaoui <email address hidden>
Date: Mon Mar 3 17:35:35 2014 +0100

    Add helpers to create per-aggregate filters

    This patchset introduce a new file of utility methods
    to deal with aggregate metadata.
    As well it updates related filters to use this new logic.
    * AggregateRamFilter
    * AggregateCoreFilter,
    * AggregateTypeAffinityFilter

    Closes-Bug: #1301340
    Change-Id: I5e4aebe9e61cfbdc7b9e6b5de0788fc6670eb936

Changed in nova:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2014-06-11
Changed in nova:
milestone: none → juno-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-10-16
Changed in nova:
milestone: juno-1 → 2014.2
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers