Subcloud-backup delete resets backup datetime and status regardless if backup exists

Bug #2000320 reported by André Dexheimer Carneiro
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Low
André Dexheimer Carneiro

Bug Description

Brief Description

When a valid release is specified for the delete command but the backup doesn't exist, the backup_status and backup_datetime are reset.

Severity

Minor.

Steps to Reproduce

On a DC system, run subcloud-backup delete with a valid release for a backup which does not exist.

Expected Behavior

Backup status and datetime remain as they were.

Actual Behavior

Backup status and datetime are reset to 'unknown' and 'None' respectively.

Reproducibility

Reproducible.

System Configuration

<One node system, Two node system, Multi-node system, Dedicated storage, https, IPv4, IPv6 etc.>

Load info (eg: 2022-03-10_20-00-07)

Build from Dec 14th 2022.

Last Pass

None

Timestamp/Logs

Provide a snippet of logs if available and the timestamp when issue was seen.

Please indicate the unique identifier in the logs to highlight the problem

Attach the logs for debugging

Alarms

No alarms.

Test Activity

Feature Testing

Workaround

Describe workaround if available

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to ansible-playbooks (master)
Changed in starlingx:
status: New → In Progress
Changed in starlingx:
assignee: nobody → André Dexheimer Carneiro (andre-dexheimercarneiro)
Ghada Khalil (gkhalil)
tags: added: stx.distcloud stx.update
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to distcloud (master)

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

commit f141f0385910c1818e61402a23a1ed930216c64c
Author: Guilherme Costa <email address hidden>
Date: Tue Feb 14 22:03:41 2023 -0300

    Better message on SubcloudBackupOperationFailed

    The message when a Subcloud Backup Operation fails was not clear
    on how to check for errors, so a better message showing how to check
    the errors was added. Also, the error when a 'subcloud-backup delete'
    fails is now being displayed when using 'dcmanager subcloud error'

    Partial-Bug: 2000320

    Signed-off-by: Guilherme Costa <email address hidden>
    Change-Id: I62e3b5ff2b7328a68567b007351a22f7ccdf6286

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/+/868416
Committed: https://opendev.org/starlingx/ansible-playbooks/commit/267f76b81e9e3160132f7ee0b1c62c18d804cc6d
Submitter: "Zuul (22348)"
Branch: master

commit 267f76b81e9e3160132f7ee0b1c62c18d804cc6d
Author: Andre Carneiro <email address hidden>
Date: Wed Dec 21 16:15:08 2022 -0300

    Backup delete fails if backup path doesn't exist

    Adds a check to verify that the subcloud backup location exists before
    attempting to delete it. If the directory does not exist, the
    operation will now fail and return an error message to the user.

    Test Plan:
    1. PASS - Validate that the backup delete with --local-only option
    will fail if the backup folder does not exist locally on the subcloud.
    2. PASS - Validate that the backup delete will fail if the backup
    folder does not exist in the central System Controller.
    3. PASS - Validate that the backup delete with --local-only option
     will succeed if the backup directory exists locally on the subcloud.
    4. PASS - Validate that the backup delete will succeed if the backup
    directory exists in the central System Controller.
    5. PASS - Validate, on all cases above, that the backup datetime and
    backup status are only reset when the delete operation succeeds in
    finding and deleting the backup directory.

    Closes-Bug: 2000320

    Change-Id: I90b1e9b3df6b30aa0a37a7379d8a2e80d3c37974
    Signed-off-by: Andre Carneiro <email address hidden>
    Signed-off-by: Guilherme Costa <email address hidden>

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