This bug has been migrated to another issue tracking site. It has been closed here and may no longer be being monitored.

If you would like to get updates for this issue, or to participate in it, you may do so at Red Hat Issue Tracker .
Bug 2327315 - backup playbook are not clearning /var/tmp/rear.* but the default path is now /var/tmp which leaves stale files there
Summary: backup playbook are not clearning /var/tmp/rear.* but the default path is now...
Keywords:
Status: CLOSED MIGRATED
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: tripleo-ansible
Version: 17.1 (Wallaby)
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: z5
: 17.1
Assignee: Juan Badia Payno
QA Contact: Archana Singh
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2024-11-19 16:54 UTC by David Hill
Modified: 2024-12-23 16:17 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2024-12-23 16:17:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker OSP-33082 0 None None None 2024-11-19 16:54:37 UTC
Red Hat Issue Tracker OSP-33300 0 None None None 2024-12-23 16:17:49 UTC
Red Hat Issue Tracker   OSPRH-12673 0 None None None 2024-12-23 16:17:27 UTC

Description David Hill 2024-11-19 16:54:13 UTC
backup playbook are not clearning /var/tmp/rear.* but the default path is now /var/tmp which leaves stale files each time a backup is taken.   Here's a patch that should fix that :

[dhill@knox backup_and_restore]$ git diff
diff --git a/tripleo_ansible/roles/backup_and_restore/defaults/main.yml b/tripleo_ansible/roles/backup_and_restore/defaults/main.yml
index 5110452b..ebd30b38 100644
--- a/tripleo_ansible/roles/backup_and_restore/defaults/main.yml
+++ b/tripleo_ansible/roles/backup_and_restore/defaults/main.yml
@@ -47,7 +47,7 @@ tripleo_backup_and_restore_clients_nets: ['192.168.24.0/24', '10.0.0.0/24', '172
 tripleo_backup_and_restore_shared_storage_subfolders: []
 tripleo_backup_and_restore_rear_simulate: false
 tripleo_backup_and_restore_using_uefi_bootloader: 0
-tripleo_backup_and_restore_exclude_paths_common: ['/data/*', '/tmp/*', '{{ tripleo_backup_and_restore_shared_storage_folder }}/*']
+tripleo_backup_and_restore_exclude_paths_common: ['/data/*', '/tmp/*', '/var/tmp/*', '{{ tripleo_backup_and_restore_shared_storage_folder }}/*']
 tripleo_backup_and_restore_exclude_paths_controller_non_bootstrapnode: false
 tripleo_backup_and_restore_exclude_paths_controller: ['/var/lib/mysql/*']
 tripleo_backup_and_restore_exclude_paths_compute: ['/var/lib/nova/instances/*']
diff --git a/tripleo_ansible/roles/backup_and_restore/tasks/run_backup.yml b/tripleo_ansible/roles/backup_and_restore/tasks/run_backup.yml
index c7ec32a7..51b489ac 100644
--- a/tripleo_ansible/roles/backup_and_restore/tasks/run_backup.yml
+++ b/tripleo_ansible/roles/backup_and_restore/tasks/run_backup.yml
@@ -83,6 +83,7 @@
   shell: |
     set -o pipefail
     rm -rf /tmp/rear.* || true
+    rm -rf /var/tmp/rear.* || true
     rm -rf /var/lib/rear/output/*
   failed_when: false
   tags:

Comment 1 David Hill 2024-11-19 16:55:10 UTC
It appears to have changed with this commit:
~~~
commit 6778e4e5dbd73cf54b3dd8e7542c2d37d6ca99e5
Author: Juan Larriba <jlarriba>
Date:   Mon Apr 11 16:09:36 2022 +0200

    ReaR needs specific configuration in RHEL9 with LVM
    
    As RHEL9 has changed both the ReaR version (up to 2.6) and the provided
    images are using lvm by default, both ReaR and the OS need little tuning
    to be able to work. This patch leaves ReaR and the OS with the
    appropiate configuration to work on RHEL9.
    
    Change-Id: I49adc830bf9f4a32832a565214e4a586c514a988
    (cherry picked from commit f04924812a8950b1b5d9cf06761847248cdee9e2)
~~~

Comment 2 Juan Badia Payno 2024-12-16 13:15:01 UTC
As a workaround the variable tripleo_backup_and_restore_exclude_paths_common can be configured,
Once rear was executed the directories /var/tmp/rear.* can be cleaned.


Note You need to log in before you can comment on or make changes to this bug.