From 6264f17c9282076c4c2d615b0afec055da3451c1 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 (cherry picked from commit adfe3858aa700751cc5a7812125fca9839395ffb) (cherry picked from commit defd3953d8d9369bd213d3de12b56ac378c9bcb3) (cherry picked from commit b5b1bc5473306e41390b07c442762cd8829e392f) 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 7108a4695..5ec994ba1 100644 --- a/devstack/lib/watcher +++ b/devstack/lib/watcher @@ -338,6 +338,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 b58b6949b..a6b1f54d1 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -38,6 +38,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