Cinder DriverFilter run_evaluator() should check volume driver name instead of volume backend name

Bug #1461770 reported by Chhavi Agarwal
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Medium
Huang Zhiteng

Bug Description

This defect is raised as a part of discussion on the below blueprint
https://review.openstack.org/#/c/182980/

Huang Zhiteng May 18 6:52 AM

Patch Set 2: Code-Review-1

Chhavi, what you have describe is a bug of DriverFilter. It shouldn't use volume backend name as indicator whether or not to run_evaluator(). A more appropriate check should be checking the volume driver name and probably version. Again, it is just a bug in a non-default filter. It doesn't imply that is how cinder filter scheduler works. Try my previous suggestion with default scheduler filters.

Changed in cinder:
assignee: nobody → Chhavi Agarwal (chhagarw)
Jay Bryant (jsbryant)
Changed in cinder:
status: New → Confirmed
importance: Undecided → Medium
milestone: none → liberty-3
milestone: liberty-3 → liberty-2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

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

Changed in cinder:
assignee: Chhavi Agarwal (chhagarw) → Huang Zhiteng (zhiteng-huang)
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

Reviewed: https://review.openstack.org/188543
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=b32091192b7af7b0fccab1e078480ec38ada7bcc
Submitter: Jenkins
Branch: master

commit b32091192b7af7b0fccab1e078480ec38ada7bcc
Author: Zhiteng Huang <email address hidden>
Date: Thu Jun 4 11:23:58 2015 -0700

    DriverFilter: don't check volume_backend_name

    Currently DriverFilter checks if host_state.volume_backend_name
    matches type.extra_specs.volume_backend_name. The same check has
    already been done in CapabilitiesFilter and done more thoroughly and
    gracefully, for example, volume_backend_name can be a set of names
    not limited to one to one match. DriverFilter should just do one
    thing, that is evaluating filter_function supplied by backend.

    This change removes the volume_backend_name check from DriverFilter
    without touching its core function, thus has no impact on existing
    documentation because the checking of volume_backend_name is an
    undocumented side-effect of this filter. This change also reduces
    one warning log to debug log when no filter_function found in
    host_state, for the reason it would generate a lot of warning log
    for those backends don't supply filter_function.

    UpgradeImpact:
    DriverFilter had an undocumented side-effect before it evaluates
    filter_function - it checked if volume_backend_name in host_state
    reported by backend matches volume_backend_name in volume type
    extra specs, and if they don't, the backend would fail to pass
    the filter. Now that this side-effect has been removed, it
    would impact users only under following circumstance: 1) user
    enabled DriverFilter but not CapabilitiesFilter; 2) user relied
    on DriverFilter to filter backends based on exact match of
    'volume_backend_name' in type extra spec. If unfortunately this
    is the case for user, enabling CapabilitiesFilter by adding
    it to 'scheduler_default_filters' configure option and restart
    cinder scheduler service then everything should work just fine.
    CapabilitiesFilter actually does a much better job checking
    volume_backend_name.

    Change-Id: Ie5c48587368856faa538eebb1b6611d464bd69bd
    Closes-bug: #1461770

Changed in cinder:
status: In Progress → Fix Committed
Mike Perez (thingee)
Changed in cinder:
milestone: liberty-2 → liberty-1
Thierry Carrez (ttx)
Changed in cinder:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: liberty-1 → 7.0.0
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related blueprints

Remote bug watches

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