Browse Source

Merge "Support removing cinder-backup from pcmk control"

changes/44/787644/1
Zuul 3 weeks ago
committed by Gerrit Code Review
parent
commit
09e844f71c
4 changed files with 43 additions and 2 deletions
  1. +32
    -0
      deployment/cinder/cinder-backup-container-puppet.yaml
  2. +2
    -0
      environments/cinder-backup-active-active.yaml
  3. +1
    -2
      environments/cinder-backup.yaml
  4. +8
    -0
      releasenotes/notes/cinder-backup-active-active-2eb8f8cf612a7989.yaml

+ 32
- 0
deployment/cinder/cinder-backup-container-puppet.yaml View File

@ -247,6 +247,38 @@ outputs:
name: virt_sandbox_use_netlink
persistent: 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:
- when:
- step|int == 1


+ 2
- 0
environments/cinder-backup-active-active.yaml View File

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

+ 1
- 2
environments/cinder-backup.yaml View File

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

+ 8
- 0
releasenotes/notes/cinder-backup-active-active-2eb8f8cf612a7989.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.

Loading…
Cancel
Save