"exclude_dirs" option is not excluding a directory from the CC backup

Bug #2039682 reported by Joseph Vazhappilly
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Joseph Vazhappilly

Bug Description

Brief Description
-----------------
When performing a backup for the Central Controller the current behavior generates a backup with platform configurations, the data within "/opt/dc-vault/" directory, and optionally the container images exists in the local registry.

There is an option within the backup playbook (exclude_dirs) that should exclude a specific directory from the backup. However, this option is not working properly, and it didn't excluding the subcloud backups directory we are trying to exclude "/opt/dc-vault/**".

Severity
--------
<Major: System/Feature is usable but degraded>

Steps to Reproduce
------------------
Perform a backup on the CC with an option that exclude /opt/dc-vault/ directory and its contents

ansible-playbook /usr/share/ansible/stx-ansible/playbooks/backup.yml -e 'ansible_become_pass=<> admin_password=<>’ -e "backup_registry_filesystem=true" -e "exclude_dirs=/opt/dc-vault/**,/opt/dc-vault"

Expected Behavior
------------------
The "/opt/dc-vault/" directory and all its contents should be excluded from the CC backup archives, when we use the "exclude_dirs" option.

Actual Behavior
----------------
The "/opt/dc-vault/" directory and all its contents is included by default in the CC backup, even if we use the "exclude_dirs" option.

Reproducibility
---------------
100%

System Configuration
--------------------
Multi-node system (DC)

Branch/Pull Time/Commit
-----------------------
master

Last Pass
---------
NA

Timestamp/Logs
--------------
NA

Test Activity
-------------
Developer Testing

Workaround
----------
NA

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-playbooks (master)
Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to ansible-playbooks (master)

Reviewed: https://review.opendev.org/c/starlingx/ansible-playbooks/+/898738
Committed: https://opendev.org/starlingx/ansible-playbooks/commit/549a7cec8d2714e9953a5d15ef367ebf1723ff9e
Submitter: "Zuul (22348)"
Branch: master

commit 549a7cec8d2714e9953a5d15ef367ebf1723ff9e
Author: Joseph Vazhappilly <email address hidden>
Date: Wed Oct 18 08:42:00 2023 -0400

    Support 'exclude_dirs' for dc-vault backup

    When performing a backup, the option 'exclude_dirs' may be
    specified to exclude directories from backup. Currently this
    option is supported only in platform backup. This change
    adds support for 'exclude_dirs' option for dc-vault &
    openstack backup. Some directories like /opt/dc-vault are
    restricted from exclusion as it is required for phased
    operations.

    Example usage: ansible-playbook /usr/share/ansible/\
    stx-ansible/playbooks/backup.yml \
    -e 'ansible_become_pass=<> admin_password=<>' \
    -e "exclude_dirs=/opt/dc-vault/backups/**,/opt/dc-vault/loads"

    Test Plan:
    PASS: Verify backup playbook with & without 'exclude_dirs'
    PASS: Verify dc-vault & openstack backup contents
    PASS: Verify Backup and Restore from DC System Controller
    PASS: Verify restricted directories are not excluded

    Closes-Bug: 2039682

    Change-Id: I15bba7b45e83a4a301ab72808a3e4dc1712976cb
    Signed-off-by: Joseph Vazhappilly <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
assignee: nobody → Joseph Vazhappilly (jvazhapp)
importance: Undecided → Medium
tags: added: stx.9.0 stx.distcloud stx.update
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.