From cf24cb24a2f7811231319cda0406d889498314e3 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Tue, 2 Apr 2024 23:45:11 +0900 Subject: [PATCH] Test redis sentinel coordination backend tooz 6.1.0 introduced support for authentication and SSL for Redis Sentinel connections. Switch the coordination backend to Sentinel to test this deployment pattern. Note that redis storage driver in gnocchi does not yet support SSL and authentication for Sentinel so it still continues using Redis. Change-Id: Ie429773523280aa15d2da3eec9bd775364b44333 --- README.md | 3 ++- fixtures/scenario002.pp | 3 +++ manifests/config.pp | 25 ++++++++++++++++++++++++- manifests/gnocchi.pp | 2 +- 4 files changed, 30 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0f50814ec..e482643c2 100644 --- a/README.md +++ b/README.md @@ -52,7 +52,7 @@ scenario](#all-in-one). | nova | rbd | X | X | rbd | X | X | | placement | X | X | X | X | X | X | | neutron | ovs | ovs | ovn | ovs | ovn | ovs | -| cinder | rbd | iscsi | | | iscsi | iscsi | +| cinder | rbd | iscsi | | | iscsi | iscsi | | manila | | | | cephfs | lvm | | | ceilometer | X | X | | | | | | aodh | X | X | | | | | @@ -84,6 +84,7 @@ scenario](#all-in-one). | om rpc | rabbit | rabbit | rabbit | rabbit | rabbit | rabbit | | om notify | rabbit | rabbit | rabbit | rabbit | rabbit | rabbit | | oslo.cache | redis | sentinel | memcache | memcache | memcache | memcache | +| tooz | redis | sentinel | redis | redis | redis | (redis) | When the Jenkins slave is created, the *run_tests.sh* script will be executed. This script will execute *install_modules.sh* that prepare /etc/puppet/modules diff --git a/fixtures/scenario002.pp b/fixtures/scenario002.pp index 6f5da52eb..acb17fc91 100644 --- a/fixtures/scenario002.pp +++ b/fixtures/scenario002.pp @@ -24,10 +24,12 @@ case $facts['os']['family'] { 'Debian': { $ipv6 = false $cache_backend = 'memcached' + $tooz_backend = 'redis' } 'RedHat': { $ipv6 = false $cache_backend = 'redis_sentinel' + $tooz_backend = 'redis_sentinel' } default: { fail("Unsupported osfamily (${facts['os']['family']})") @@ -39,6 +41,7 @@ class { 'openstack_integration::config': ssl => $ssl, ipv6 => $ipv6, cache_backend => $cache_backend, + tooz_backend => $tooz_backend, } if $ssl { include openstack_integration::cacert diff --git a/manifests/config.pp b/manifests/config.pp index 6ca5291d9..89c3678d3 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -20,12 +20,17 @@ # (optional) The oslo.cache backend # Defaults to 'memcached'. # +# [*tooz_backend*] +# (optional) The tooz backend +# Defaults to 'redis' +# class openstack_integration::config ( $ssl = false, $ipv6 = false, $rpc_backend = 'rabbit', $notify_backend = 'rabbit', $cache_backend = 'memcached', + $tooz_backend = 'redis', ) { include openstack_integration::params @@ -89,7 +94,7 @@ class openstack_integration::config ( default => false, } - $tooz_url = os_url({ + $redis_url = os_url({ 'scheme' => 'redis', 'password' => 'a_big_secret', 'host' => $ip_for_url, @@ -99,6 +104,24 @@ class openstack_integration::config ( } }) + $sentinel_url = os_url({ + 'scheme' => 'redis', + 'password' => 'a_big_secret', + 'host' => $ip_for_url, + 'port' => '26379', + 'query' => { + 'sentinel' => 'mymaster', + 'sentinel_password' => 'a_big_secret', + 'ssl' => $ssl, + 'sentinel_ssl' => $ssl, + } + }) + + $tooz_url = $tooz_backend ? { + 'redis_sentinel' => $sentinel_url, + default => $redis_url, + } + $ovn_nb_connection = "${ovn_proto}:${ip_for_url}:6641" $ovn_sb_connection = "${ovn_proto}:${ip_for_url}:6642" } diff --git a/manifests/gnocchi.pp b/manifests/gnocchi.pp index 91a5e9a7e..b4a887587 100644 --- a/manifests/gnocchi.pp +++ b/manifests/gnocchi.pp @@ -118,7 +118,7 @@ class openstack_integration::gnocchi ( swift_key => 'a_big_secret', } class { 'gnocchi::storage::incoming::redis': - redis_url => $::openstack_integration::config::tooz_url, + redis_url => $::openstack_integration::config::redis_url, } } 'file': {