Merge "Support removing cinder-backup from pcmk control"

This commit is contained in:
Zuul 2021-04-22 20:31:38 +00:00 committed by Gerrit Code Review
commit 09e844f71c
4 changed files with 43 additions and 2 deletions

View File

@ -247,6 +247,38 @@ outputs:
name: virt_sandbox_use_netlink name: virt_sandbox_use_netlink
persistent: yes persistent: yes
state: yes state: yes
deploy_steps_tasks:
- name: Clean up when switching cinder-backup from pcmk to active-active
when:
- step|int == 1
become: true
block:
- name: Check if cinder-backup is running under pacemaker
command: "pcs status"
register: cinder_backup_pcs_status
check_mode: false
failed_when: false
changed_when: false
- when:
- '"cinder-backup" in cinder_backup_pcs_status.stdout'
block:
- name: Remove the openstack-cinder-backup pcs resource
pacemaker_resource:
resource: openstack-cinder-backup
state: delete
run_once: true
- name: Identify the cinder-backup pcmklatest container image
shell: "{{container_cli}} images | awk '$1 ~ \"cinder-backup\" && $2 == \"pcmklatest\" {print $1\":\"$2}'"
register: cinder_backup_pcmklatest_image
check_mode: false
changed_when: false
- name: Remove the cinder-backup pcmklatest container image
command: "{{container_cli}} rmi {{cinder_backup_pcmklatest_image.stdout}}"
when:
- cinder_backup_pcmklatest_image.stdout|length > 0
external_upgrade_tasks: external_upgrade_tasks:
- when: - when:
- step|int == 1 - step|int == 1

View File

@ -0,0 +1,2 @@
resource_registry:
OS::TripleO::Services::CinderBackup: ../deployment/cinder/cinder-backup-container-puppet.yaml

View File

@ -1,4 +1,3 @@
resource_registry: resource_registry:
OS::TripleO::Services::CinderBackup: ../deployment/cinder/cinder-backup-pacemaker-puppet.yaml OS::TripleO::Services::CinderBackup: ../deployment/cinder/cinder-backup-pacemaker-puppet.yaml
# For non-pcmk managed implementation # Use cinder-backup-active-active.yaml for non-pcmk managed implementation
# OS::TripleO::Services::CinderBackup: ../deployment/cinder/cinder-backup-container-puppet.yaml

View File

@ -0,0 +1,8 @@
---
features:
- |
The Cinder Backup service can be switched from running active/passive
under pacemaker, to active-active mode where it runs simultaneously on
every node on which it's deployed. Note that the service will be restarted
when switching modes, which will interrupt any backup operations currently
in progress.