B&R ansible inventory files not removed after succesfull operation

Bug #1997276 reported by Gustavo Herzmann
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
Gustavo Herzmann

Bug Description

Brief Description
-----------------
The ansible inventory files created during a backup and restore operation are not being removed after the operation ends. They should be removed after a successful operation, only remaining if it fails (for troubleshooting purposes).

Severity
--------
Minor: System/Feature is usable with minor issue

Steps to Reproduce
------------------
01. Create a new backup:
dcmanager subcloud-backup create --local-only --registry-images --subcloud subcloud6 --backup-values backup_values.yml

02. Restore the subcloud using the backup:
dcmanager subcloud-backup restore --with-install --local-only --registry-images --restore-values restore_values.yml --subcloud subcloud6

03. Check the /var/opt/dc/ansible directory for any of the following files:
subcloud6_backup_create_values.yml
subcloud6_backup_restore_values.yml
subcloud6_backup_delete_values.yml

Expected Behavior
------------------
The files should be removed after a successful B&R operation.

Actual Behavior
----------------
The files are not removed.

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

System Configuration
--------------------
Distributed cloud

Branch/Pull Time/Commit
-----------------------
2022-11-05 master

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

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

Test Activity
-------------
NA.

Workaround
----------
NA.

Changed in starlingx:
assignee: nobody → Gustavo Herzmann (gherzman)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to distcloud (master)

Fix proposed to branch: master
Review: https://review.opendev.org/c/starlingx/distcloud/+/865194

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to distcloud (master)

Reviewed: https://review.opendev.org/c/starlingx/distcloud/+/865194
Committed: https://opendev.org/starlingx/distcloud/commit/1bd7701eae9b352c7bb0be6f8784c5bbae88fddd
Submitter: "Zuul (22348)"
Branch: master

commit 1bd7701eae9b352c7bb0be6f8784c5bbae88fddd
Author: Gustavo Herzmann <email address hidden>
Date: Mon Nov 21 16:36:46 2022 -0300

    Remove B&R inventory files after successful operation

    Removes the following B&R inventory files from /var/opt/dc/ansible
    after a successful operation (backup, restore or delete):
    - <subcloud>_backup_create_values.yml
    - <subcloud>_backup_restore_values.yml
    - <subcloud>_backup_delete_values.yml

    Test plan:
    PASS: Execute 'dcmanager subcloud-backup create ...' and verify that
    the <subcloud>_backup_create_values.yml file was removed;
    PASS: Execute 'dcmanager subcloud-backup restore ...' and verify that
    the <subcloud>_backup_restore_values.yml file was removed;
    PASS: Execute 'dcmanager subcloud-backup delete ...' and verify that
    the <subcloud>_backup_delete_values.yml file was removed;

    Closes-Bug: #1997276

    Signed-off-by: Gustavo Herzmann <email address hidden>
    Change-Id: I292452f508d0d896f761bd0f55ec8963026a1e2b

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Low
tags: added: stx.8.0 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.