Move the snapshots feature to optional/beta

Previously a commit[1] introduced a new way of doing backup, using
"snapshots", that do not require to bring down the whole controller to
take the backup. On that commit, the old way was removed, which do not
follow the deprecation procedure.

This commits reintroduces the old way of performing backups via stopping
the controllers and move the snapshots feature to an optional,
user-selected feature.

[1] https://review.opendev.org/c/openstack/tripleo-ansible/+/786380

Change-Id: I49944d585825b32052278cd865a74c46dcb5eaa4
This commit is contained in:
Juan Larriba
2021-05-07 12:02:30 +02:00
parent 3304f4ab35
commit 00a17ffb4a
7 changed files with 153 additions and 37 deletions

View File

@@ -0,0 +1,51 @@
---
# Copyright 2019 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
#
# Call to podman to list running containers then commit all state to
# disk. Once services state has been flushed dump the database then allow
# the backup to start.
- name: Enable pacemaker
command: pcs cluster start --all
when: enabled_galera
run_once: true
tags:
- bar_create_recover_image
- name: unPause database container
command: "{{ tripleo_container_cli }} unpause {{ tripleo_backup_and_restore_mysql_container }}"
when:
- tripleo_container_cli is defined
- not enabled_galera
- tripleo_backup_and_restore_mysql_container is defined
tags:
- bar_create_recover_image
- name: Gather Container Service Name
shell: |
set -o pipefail
/usr/bin/{{ tripleo_container_cli }} ps -a --filter='status=paused' --format '{{ '{{' }}.Names {{ '}}' }} '
register: container_services
changed_when: container_services.stdout is defined
tags:
- bar_create_recover_image
- name: unPause containers
command: "{{ tripleo_container_cli }} unpause {{ item }}"
with_items: "{{ container_services.stdout_lines }}"
when: tripleo_container_cli is defined
tags:
- bar_create_recover_image