From 1fc29c9ed7f6a4f1041edd675f48d0450e530867 Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Mon, 29 Jun 2026 10:12:00 +0200 Subject: [PATCH] Select valkey over redis from 2025.2 Upstream kolla-ansible replaced redis with valkey at stable/2025.2 (the redis role/playbook is gone), so deploy/upgrade of "redis" fails on 2025.2 while "valkey" is absent on 2025.1 and older. testbed deploys and upgrades across releases, so the choice must be made per release. Add a valkey_or_redis() helper to include.sh that reads the active OpenStack release from the kolla-ansible image label and echoes "valkey" for 2025.2+ (and master) or "redis" for 2025.1/2024.x. Each infra script resolves it once into a key_value_store variable and applies that. On upgrade to 2025.2, "osism apply -a upgrade valkey" runs the valkey role's upgrade tasks, which migrate the redis data into valkey and remove the old redis containers automatically -- no manual teardown needed. Add valkey_master_password to the kolla test secrets (valkey's own auth; its config also reads redis_master_password to sync during migration), using its own distinct test value. Assisted-by: Claude:claude-opus-4-8 Signed-off-by: Roger Luethi --- environments/kolla/secrets.yml | 1 + scripts/deploy-baremetal.sh | 4 +++- scripts/deploy/200-infrastructure.sh | 4 +++- scripts/include.sh | 12 ++++++++++++ scripts/upgrade/200-infrastructure.sh | 4 +++- 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/environments/kolla/secrets.yml b/environments/kolla/secrets.yml index 2deeb528c..0992facf9 100644 --- a/environments/kolla/secrets.yml +++ b/environments/kolla/secrets.yml @@ -652,6 +652,7 @@ rabbitmq_password: password rally_database_password: RUFKPzTRYhPW3ZeQBf7dTaoOq4RMcjPQctzxefSi rbd_secret_uuid: 5a2bf0bf-e1ab-4a6a-bc32-404bb6ba91fd redis_master_password: QHNA1SZRlOKzLADhUd5ZDgpHfQe6dNfr3bwEdY24 +valkey_master_password: 22vLVyeTJ1fkgVdfjesrPeY5PxPQvOOWoDHWzxxQ sahara_database_password: PtBpvrXbskbKlJuzkLjWfAmmVEYlO7XYzLm8tOmi sahara_keystone_password: 2hI2w1BuVEEck4BAMmMSxCJcIaDTvl73o5YQboFM searchlight_keystone_password: UMyLfPZF1UkLArS58vHx6VSn4AcAFrPHTBsMV9Ra diff --git a/scripts/deploy-baremetal.sh b/scripts/deploy-baremetal.sh index cb1bee98d..5fcb3d361 100755 --- a/scripts/deploy-baremetal.sh +++ b/scripts/deploy-baremetal.sh @@ -53,11 +53,13 @@ osism apply wait-for-connection -l testbed-resource-nodes -e ireallymeanit=yes # pull images osism apply -r 2 -e custom baremetal-pull-images +key_value_store=$(valkey_or_redis) + osism apply common osism apply loadbalancer osism apply openstackclient osism apply memcached -osism apply redis +osism apply "$key_value_store" osism apply mariadb osism apply rabbitmq diff --git a/scripts/deploy/200-infrastructure.sh b/scripts/deploy/200-infrastructure.sh index d73f51cfa..c277c78a5 100755 --- a/scripts/deploy/200-infrastructure.sh +++ b/scripts/deploy/200-infrastructure.sh @@ -6,12 +6,14 @@ source /opt/configuration/scripts/manager-version.sh OPENSTACK_VERSION=$(docker inspect --format '{{ index .Config.Labels "de.osism.release.openstack" }}' kolla-ansible) +key_value_store=$(valkey_or_redis) + osism apply openstackclient osism apply common osism apply loadbalancer osism apply opensearch osism apply memcached -osism apply redis +osism apply "$key_value_store" osism apply mariadb osism apply rabbitmq osism apply openvswitch diff --git a/scripts/include.sh b/scripts/include.sh index 34fe6fb27..f94604fb9 100644 --- a/scripts/include.sh +++ b/scripts/include.sh @@ -24,3 +24,15 @@ sync_inventory() { osism reconciler sync fi } + +# Select the key-value store service for the active OpenStack release. Upstream +# kolla-ansible replaced redis with valkey at 2025.2; older releases still ship +# redis. The release is read from the kolla-ansible image label. +valkey_or_redis() { + local openstack_version + openstack_version=$(docker inspect --format '{{ index .Config.Labels "de.osism.release.openstack" }}' kolla-ansible 2>/dev/null) + case "$openstack_version" in + 2023.*|2024.*|2025.1) echo redis ;; + *) echo valkey ;; + esac +} diff --git a/scripts/upgrade/200-infrastructure.sh b/scripts/upgrade/200-infrastructure.sh index b3638c07a..b8d8fe2c1 100755 --- a/scripts/upgrade/200-infrastructure.sh +++ b/scripts/upgrade/200-infrastructure.sh @@ -4,12 +4,14 @@ set -e source /opt/configuration/scripts/include.sh +key_value_store=$(valkey_or_redis) + osism apply openstackclient osism apply -a upgrade common osism apply -a upgrade loadbalancer osism apply -a upgrade opensearch osism apply -a upgrade memcached -osism apply -a upgrade redis +osism apply -a upgrade "$key_value_store" osism apply -a upgrade mariadb osism apply -a upgrade rabbitmq osism apply -a upgrade openvswitch