Skip to content

Commit 4705861

Browse files
notartomotherwiseguy
authored andcommitted
Explicitly set scheduler_available_filters
Tempest's scheduler_available_filters has a special 'all' value that is understood to mean 'all filters are enabled' by various tempest tests. However, what it really means is 'the default nova filters are enabled.' In an effort to help clean that up, this patch explicitly sets scheduler_available_filters to nova's $FILTERS. Because $FILTERS is now used in both lib/nova and lib/tempest, it is renamed $NOVA_FILTERS. Change-Id: I6ffc1e9989cd61d666f9c1db9c94fbabd7151918 Related-bug: 1628443
1 parent 3b5477d commit 4705861

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

lib/nova

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ FORCE_CONFIG_DRIVE=${FORCE_CONFIG_DRIVE:-"False"}
103103
# should work in most cases.
104104
SCHEDULER=${SCHEDULER:-filter_scheduler}
105105

106-
# The following FILTERS contains SameHostFilter and DifferentHostFilter with
106+
# The following NOVA_FILTERS contains SameHostFilter and DifferentHostFilter with
107107
# the default filters.
108-
FILTERS="RetryFilter,AvailabilityZoneFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,SameHostFilter,DifferentHostFilter"
108+
NOVA_FILTERS="RetryFilter,AvailabilityZoneFilter,ComputeFilter,ComputeCapabilitiesFilter,ImagePropertiesFilter,ServerGroupAntiAffinityFilter,ServerGroupAffinityFilter,SameHostFilter,DifferentHostFilter"
109109

110110
QEMU_CONF=/etc/libvirt/qemu.conf
111111

@@ -423,7 +423,7 @@ function create_nova_conf {
423423
iniset $NOVA_CONF wsgi api_paste_config "$NOVA_API_PASTE_INI"
424424
iniset $NOVA_CONF DEFAULT rootwrap_config "$NOVA_CONF_DIR/rootwrap.conf"
425425
iniset $NOVA_CONF scheduler driver "$SCHEDULER"
426-
iniset $NOVA_CONF filter_scheduler enabled_filters "$FILTERS"
426+
iniset $NOVA_CONF filter_scheduler enabled_filters "$NOVA_FILTERS"
427427
if [[ $SCHEDULER == "filter_scheduler" ]]; then
428428
iniset $NOVA_CONF scheduler workers "$API_WORKERS"
429429
fi

lib/tempest

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,11 @@ function configure_tempest {
372372
iniset $TEMPEST_CONFIG compute-feature-enabled block_migration_for_live_migration ${USE_BLOCK_MIGRATION_FOR_LIVE_MIGRATION:-False}
373373
iniset $TEMPEST_CONFIG compute-feature-enabled live_migrate_back_and_forth ${LIVE_MIGRATE_BACK_AND_FORTH:-False}
374374
iniset $TEMPEST_CONFIG compute-feature-enabled attach_encrypted_volume ${ATTACH_ENCRYPTED_VOLUME_AVAILABLE:-True}
375+
376+
if [[ -n "$NOVA_FILTERS" ]]; then
377+
iniset $TEMPEST_CONFIG compute-feature-enabled scheduler_enabled_filters ${NOVA_FILTERS}
378+
fi
379+
375380
if is_service_enabled n-cell; then
376381
# Cells doesn't support shelving/unshelving
377382
iniset $TEMPEST_CONFIG compute-feature-enabled shelve False

0 commit comments

Comments
 (0)