Fix restoring dc-vault on a central controller

At this moment, when we do a restore procedure on a
DC system controller, the /opt/dc-vault directory will be
created under "/" filesystem. It should be created on
a separated filesystem, but that filesystem is available
only after an unlock of the controller.

The proposed solution is to create an additional restore
playbook for the dc-vault that will be manually run after
unlocking controller-0. The backup playbook will create
an additional archive with the contents of dc-vault, and
the dc-vault directory will be removed from the platform
backup.

The new playbook will be used like this:

ansible-playbook
/usr/share/ansible/stx-ansible/playbooks/restore_dc_vault.yml -e
"ansible_become_pass=Li69nux*" -e "admin_password=Li69nux*" -e
"initial_backup_dir=/home/sysadmin" -e
"backup_filename=localhost_dc_vault_backup_2021_02_02_11_46_09.tgz"

Closes-Bug: 1914258
Signed-off-by: Mihnea Saracin <Mihnea.Saracin@windriver.com>
Change-Id: I8fdd5b678e2296cd0ce98ea4dd91e2988beb200f
This commit is contained in:
Mihnea Saracin
2021-02-02 18:09:33 +02:00
parent 3babc1eed3
commit f2d20c15bb
7 changed files with 173 additions and 18 deletions

View File

@@ -0,0 +1,16 @@
---
#
# Copyright (c) 2021 Wind River Systems, Inc.
#
# SPDX-License-Identifier: Apache-2.0
#
- hosts: all
gather_facts: no
vars_files:
- host_vars/backup-restore/default.yml
roles:
- { role: common/prepare-env }
- { role: restore-dc-vault/prepare-env }
- { role: restore-dc-vault/restore-dc-vault-directory, become: yes }