Merge "Check that redis is removed prior to FFU"

This commit is contained in:
Zuul 2022-01-12 01:13:13 +00:00 committed by Gerrit Code Review
commit 70aaf86eef
4 changed files with 32 additions and 1 deletions

View File

@ -189,6 +189,25 @@ outputs:
state: present
when: {get_param: EnableInstanceHA}
upgrade_tasks:
# Since Wallaby, Redis is not deployed by defaut anymore
- name: pre-check to ensure redis is removed if the service is disabled
when:
- step|int == 0
- '"redis" not in enabled_services|list'
tags:
- never
- system_upgrade
- system_upgrade_prepare
become: true
# prior to OS upgrade, don't assume the cluster is running,
# probe the CIB file directly instead
shell: |
export CIB_file=/var/lib/pacemaker/cib/cib.xml
if crm_resource -r redis-bundle -q &>/dev/null; then
echo "Redis resource present in pacemaker but disabled by default in TripleO" >&2
echo "Delete the resource in pacemaker or enable the redis service before upgrading" >&2
exit 1
fi
- name: upgrade step 0
when: step|int == 0
block:

View File

@ -17,7 +17,6 @@ resource_registry:
OS::TripleO::Services::MySQL: ../deployment/database/mysql-pacemaker-puppet.yaml
OS::TripleO::Services::OsloMessagingRpc: ../deployment/rabbitmq/rabbitmq-messaging-rpc-pacemaker-puppet.yaml
OS::TripleO::Services::OsloMessagingNotify: ../deployment/rabbitmq/rabbitmq-messaging-notify-shared-puppet.yaml
OS::TripleO::Services::Redis: ../deployment/database/redis-pacemaker-puppet.yaml
OS::TripleO::Services::OVNDBs: ../deployment/ovn/ovn-dbs-pacemaker-puppet.yaml
parameter_defaults:

View File

@ -0,0 +1,6 @@
# Environment file to deploy the Redis in a pacemaker cluster.
# As Redis is no longer deployed by default, this file is only
# necessary if you upgrade an existing overcloud or if you implicitely
# rely on Redis
resource_registry:
OS::TripleO::Services::Redis: ../deployment/database/redis-pacemaker-puppet.yaml

View File

@ -0,0 +1,7 @@
---
upgrade:
- |
Redis is now disabled by default in new deployments, so existing
deployments have to delete the redis resource in pacemaker prior to
upgrade, or include the new environment file ha-redis.yaml if they
still implicitely depend on redis.