Kwarg 'filter_class_names' is never passed to HostManager#get_filtered_hosts

Bug #1403020 reported by zhangtralon on 2014-12-16
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Wishlist
Unassigned
Manila
Undecided
Unassigned
OpenStack Compute (nova)
Low
Matt Riedemann

Bug Description

the parameter filter_class_names from funciton get_filtered_hosts is not assigned values, so we always use the filters from CONF.scheduler_default_filters.

Changed in nova:
assignee: nobody → zhangtralon (zhangchunlong1)
summary: - the parameter filter_class_names from funciton get_filtered_hosts
+ the parameter 'filter_class_names' from function 'get_filtered_hosts'
doesn't work
summary: - the parameter 'filter_class_names' from function 'get_filtered_hosts'
- doesn't work
+ Kwarg 'filter_class_names' is never passed to
+ HostManager#get_filtered_hosts
Changed in nova:
status: New → Confirmed
tags: added: low-hanging-fruit

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

Changed in nova:
status: Confirmed → In Progress
no longer affects: cinder
Changed in nova:
importance: Undecided → Wishlist
no longer affects: cinder

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

Change abandoned by zhangtralon (<email address hidden>) on branch: master
Review: https://review.openstack.org/167137
Reason: the repeated submit

Change abandoned by John Garbutt (<email address hidden>) on branch: master
Review: https://review.openstack.org/143285
Reason: This patch seems to have stalled, lets abandon it.
Please restore the patch if that is no longer true.

Any questions, please catch me via email or on IRC johnthetubaguy

Changed in nova:
status: In Progress → Incomplete
Sean Dague (sdague) on 2016-02-20
Changed in nova:
status: Incomplete → New
status: New → Incomplete
assignee: zhangtralon (zhangchunlong1) → nobody
Matt Riedemann (mriedem) on 2016-04-18
tags: added: scheduler
Matt Riedemann (mriedem) wrote :

Added cinder and manila since cinder copied this from nova and manila copied it from cinder, and it doesn't look like it's used in any of the projects.

Matt Riedemann (mriedem) wrote :

This can't be removed from Nova because the scheduler_host_manager config option loads the plugin class from an entry point or classname, which could be using the filter_class_names kwarg.

Loading from a classname is deprecated in mitaka in nova, and will be removed in newton, but you still load the host manager from a plugin entry point, so we can't remove this from nova because external host managers could be using it.

Matt Riedemann (mriedem) on 2016-04-18
Changed in nova:
status: Incomplete → Confirmed

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

Changed in nova:
assignee: nobody → Matt Riedemann (mriedem)
status: Confirmed → In Progress
Matt Riedemann (mriedem) on 2016-04-18
Changed in nova:
importance: Wishlist → Low

Reviewed: https://review.openstack.org/307485
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=7e2f5c7d340a0131ac083ed036e417976d6342da
Submitter: Jenkins
Branch: master

commit 7e2f5c7d340a0131ac083ed036e417976d6342da
Author: Matt Riedemann <email address hidden>
Date: Mon Apr 18 17:17:30 2016 -0400

    Remove deprecated ability to load scheduler_host_manager from path

    The ability to load the scheduler_host_manager from a random
    classpath was deprecated in Mitaka. This removes that ability
    so that only the entrypoints in Nova's setup.cfg can be used
    to load the scheduler host manager.

    The scheduler_host_manager config option is updated to only
    allow the choices that are currently in the setup.cfg.

    And a release note is added for the upgrade impact of dropping
    the deprecated classpath loading ability.

    Change-Id: I886c74afac02d100d472b78522e8295748276e4d
    Related-Bug: #1403020

Changed in nova:
status: In Progress → Fix Released

Reviewed: https://review.openstack.org/307503
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=7f1ff4b226177dac8edc520c4b83a8b800b68cae
Submitter: Jenkins
Branch: master

commit 7f1ff4b226177dac8edc520c4b83a8b800b68cae
Author: Matt Riedemann <email address hidden>
Date: Mon Apr 18 17:42:42 2016 -0400

    Remove unused filter_class_names kwarg from get_filtered_hosts

    Nothing in tree* uses this and now that we've removed the
    plug point to load up random scheduler host managers via
    out of tree classpath, this should be safe to remove.

    *scheduler_host_manager is now only loaded up from the
    drivers in the nova.scheduler.host_manager namespace,
    which is just HostManager and IronicHostManager in Nova.
    It is possible to add your own out of tree host managers
    to that entrypoint to get around this, but Nova isn't
    supporting that type of interface anymore which is why we
    removed the ability to load custom host managers via the
    scheduler_host_manager config option.

    Change-Id: Id7b54e0879c43a820efd6bae78d0acf5f28fd384
    Closes-Bug: #1403020

This issue was fixed in the openstack/nova 14.0.0.0b1 development milestone.

shilpa (smanjara) on 2016-06-30
Changed in cinder:
assignee: nobody → shilpa (smanjara)
Huang Zhiteng (zhiteng-huang) wrote :

Cinder's FilterScheduler has a few places called get_filtered_hosts() but none of these invocations passed filter_class_names, however this doesn't necessary mean current host manager or filter scheduler needs fixing. Deployers may have out-of-tree scheduler driver does pass in customized filter_class_names which can make use of this type of flexibility. Therefore, I don't think we need to fix this 'bug' in Cinder.

Changed in cinder:
status: New → Won't Fix
importance: Undecided → Wishlist
Changed in cinder:
assignee: shilpa (smanjara) → nobody
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers