Value 'all' of CONF.compute_feature_enabled.scheduler_available_filters is misleading

Bug #1628443 reported by Ferenc Horváth
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tempest
Fix Released
Low
Ghanshyam Mann

Bug Description

It is confusing when CONF.compute_feature_enabled.scheduler_available_filters option [1] is set to ['all'] because it doesn't mean that all the existing filters are enabled. It is just the indication of the case when all of the available filters (from DEFAULT.scheduler_available_filters in nova.conf) are enabled.

Furthermore, the tempest.test.is_scheduler_filter_enabled(filter_name) function [2] shouldn't return True whenever 'all' is among the values of the scheduler_available_filters option, because this way even e.g. is_scheduler_filter_enabled('asdf') returns True, however 'asdf' is not even a valid filter.

[1] https://github.com/openstack/tempest/blob/master/tempest/config.py#L409
[2] https://github.com/openstack/tempest/blob/master/tempest/test.py#L177

description: updated
Revision history for this message
Anna Babich (ababich) wrote :

Kind of solution may be to carry a list of available scheduler filters from nova.conf to tempest.conf, but it requires changes in upstream gates' deployment scripts.

Revision history for this message
Ferenc Horváth (hferenc) wrote :

I would gladly implement the suggested changes in infra, but I fear that it would cause a lot of regression so before that I'm seeking for a simpler solution - maybe I could access nova's config from tempest somehow.

I would also be happy with a solution where my related test cases would be skipped with a properly working filter, but I would be able to run them on my own deployment on which the CONF.compute_feature_enabled.scheduler_available_filters option would be set up correctly.

Revision history for this message
Ghanshyam Mann (ghanshyammann) wrote :

Yea, 'all' as value in this options is confusing. Nova default value is not 'all' it is what all available in Nova. We can improve the help message of scheduler_available_filters in tempest conf.

On is_scheduler_filter_enabled()- yes, returning true on 'all' options not what it mean to be.
But it will not be possible to get all Nova available filter as there is no such API to get that list. Also its not good idea to fetch the list from Nova itself as it might skip test falsely (when nova upgrade in cloud disable some of the previously available filters).

1 way is to remove the 'all' as a value from this options and make users to configure filter list manually. But by that way this options will become difficult to configure as user has to fetch all the Nova available filter and prepare list. Which is making tempest very hard to configure so honestly saying I do not really prefer this way.

But on same note, is_scheduler_filter_enabled() function will be used by test case which should know what all filter they want to check and those should be among the what Nova available filters are.
I mean when any tests checking available filter with this method, while review we verify whether that filter is available in Nova or not. So that all tempest tests using this will be skipped properly when Nova options is configured properly.

So i feel improving the help message and a clear comments in is_scheduler_filter_enabled function should be enough.

Changed in tempest:
status: New → Confirmed
importance: Undecided → Low
assignee: nobody → Ghanshyam Mann (ghanshyammann)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tempest (master)

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

Changed in tempest:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tempest (master)

Reviewed: https://review.openstack.org/405064
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=5817e14f095173f013469ee44fd7a248800f3205
Submitter: Jenkins
Branch: master

commit 5817e14f095173f013469ee44fd7a248800f3205
Author: ghanshyam <email address hidden>
Date: Thu Dec 1 11:38:46 2016 +0900

    Improve help message for scheduler_available_filters

    Config option scheduler_available_filters default value
    'all' is not much clear as it doesn't mean that all the
    existing filters are enabled. It is just the indication
    of the case when all of the available filters
    (from DEFAULT.scheduler_available_filters in nova.conf)
    are enabled.

    Also add clear doc string for is_scheduler_filter_enabled
    function which is used to evaluate this option value.

    Change-Id: If9a52003309686cc257e62737e52c2cc52ddc659
    Closes-Bug: #1628443

Changed in tempest:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix proposed to tempest (master)

Related fix proposed to branch: master
Review: https://review.openstack.org/563015

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

Related fix proposed to branch: master
Review: https://review.openstack.org/570207

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on tempest (master)

Change abandoned by Artom Lifshitz (<email address hidden>) on branch: master
Review: https://review.openstack.org/563015

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Related fix merged to tempest (master)

Reviewed: https://review.openstack.org/570207
Committed: https://git.openstack.org/cgit/openstack/tempest/commit/?id=595ae16987f735a81f9c416c6cbbca915c79860d
Submitter: Zuul
Branch: master

commit 595ae16987f735a81f9c416c6cbbca915c79860d
Author: Artom Lifshitz <email address hidden>
Date: Wed May 23 10:19:18 2018 -0400

    Deprecate available filters in favor of enabled

    Previously, Tempest's default for scheduler_available_filters was
    'all'. This was different from Nova's default enabled_filters, which
    does *not* include all possible filters available in Nova. Thus, in a
    deployment where both options were kept at their default value,
    Tempest's is_scheduler_filter_enabled() would return True for all
    filters, even if those filters weren't enabled in Nova. In addition,
    the 'available' wording could be made clearer. This patch deprecates
    scheduler_available_filters, replacing it with
    scheduler_enabled_filters. The latter has its default value set to
    Nova's enabled_filters default.

    Related-bug: 1628443
    Change-Id: I5c87865dc650d383ee006d36b6d52cdd90577ab9

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.