From adfe3858aa700751cc5a7812125fca9839395ffb Mon Sep 17 00:00:00 2001 From: Douglas Viroel Date: Fri, 1 Aug 2025 10:56:10 -0300 Subject: [PATCH] Configure watcher tempest's microversion in devstack Adds a tempest configuration for min and max microversions supported by watcher. This help us to define the correct range of microversion to be tested on each stable branch. New microversion proposals should also increase the default max_microversion, in order to work with watcher-tempest-plugin microversion testing. Change-Id: I0b695ba4530eb89ed17b3935b87e938cadec84cc Signed-off-by: Douglas Viroel --- devstack/lib/watcher | 13 +++++++++++++ devstack/plugin.sh | 3 +++ 2 files changed, 16 insertions(+) diff --git a/devstack/lib/watcher b/devstack/lib/watcher index 0d9e07355..e3543b5a0 100644 --- a/devstack/lib/watcher +++ b/devstack/lib/watcher @@ -262,6 +262,19 @@ function stop_watcher { done } +# configure_tempest_for_watcher() - Configure Tempest for watcher +function configure_tempest_for_watcher { + # Set default microversion for watcher-tempest-plugin + # Please make sure to update this when the microversion is updated, otherwise + # new tests may be skipped. + TEMPEST_WATCHER_MIN_MICROVERSION=${TEMPEST_WATCHER_MIN_MICROVERSION:-"1.0"} + TEMPEST_WATCHER_MAX_MICROVERSION=${TEMPEST_WATCHER_MAX_MICROVERSION:-"1.4"} + + # Set microversion options in tempest.conf + iniset $TEMPEST_CONFIG optimize min_microversion $TEMPEST_WATCHER_MIN_MICROVERSION + iniset $TEMPEST_CONFIG optimize max_microversion $TEMPEST_WATCHER_MAX_MICROVERSION +} + # Restore xtrace $_XTRACE_WATCHER diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 17d6c1780..f58302080 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -36,6 +36,9 @@ if is_service_enabled watcher-api watcher-decision-engine watcher-applier; then # Start the watcher components echo_summary "Starting watcher" start_watcher + elif [[ "$1" == "stack" && "$2" == "test-config" ]]; then + echo_summary "Configuring tempest for watcher" + configure_tempest_for_watcher fi if [[ "$1" == "unstack" ]]; then