Set redis-server version to 5.0 during upgrade
PROD-36960
Change-Id: Ic289e6a66fcd0e0206ae103d1c05dbc9da694884
diff --git a/tcp_tests/tests/system/test_mcp_update.py b/tcp_tests/tests/system/test_mcp_update.py
index 6c1c257..15a0586 100644
--- a/tcp_tests/tests/system/test_mcp_update.py
+++ b/tcp_tests/tests/system/test_mcp_update.py
@@ -180,6 +180,37 @@
LOG.info("Skipping WA for Alerta API key")
+@pytest.fixture
+def wa_redis_server_version_3_prod36960(reclass_actions, salt_actions):
+ version_pillar = "redis:server:version"
+ tgt = "I@{}".format(version_pillar)
+ pillar_file = "cluster/*/openstack/telemetry.yml"
+ redis_target_version = "5.0"
+
+ msg_nodes = salt_actions.get_minions_by_target(tgt)
+ if not msg_nodes:
+ LOG.info("dbs* nodes not found, skipping")
+ return
+ else:
+ msg_node = msg_nodes[0]
+
+ if str(salt_actions.get_single_pillar(
+ msg_node,
+ version_pillar)) == redis_target_version:
+ LOG.info("Redis-server is already '{}', skipping".format(
+ redis_target_version))
+ return
+
+ LOG.info("Setting redis-server version to '{}'".format(
+ redis_target_version))
+ reclass_actions.add_key(
+ "parameters.{}".format(version_pillar.replace(":", ".")),
+ redis_target_version,
+ pillar_file)
+ salt_actions.run_state(" or ".join(msg_nodes),
+ "saltutil.refresh_pillar")
+
+
@pytest.fixture(scope='class')
def enable_openstack_update(reclass_actions, salt_actions):
param = "parameters._param.openstack_upgrade_enabled"
@@ -197,7 +228,8 @@
@pytest.mark.usefixtures("switch_to_proposed_pipelines",
"update_to_tag",
"wa_for_galera_clustercheck_password_prod35705",
- "wa_for_alerta_password_prod35958")
+ "wa_for_alerta_password_prod35958",
+ "wa_redis_server_version_3_prod36960")
class TestUpdateMcpCluster(object):
"""
Following the steps in