dcmanager subcloud backup creates multiple directories under one release

Bug #1998500 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

There is no semantic check to prevent backup operation when there is already a backup create operation in progress. When you create subcloud backup for group 2 times in a row, it ends up creating a new release directory under the existing release directory, also it ends up creating 2 new backup files.

------- Severity

Minor: Doesnt affect the functionality but the existing file is not deleted

------- Steps to Reproduce

1. Execute backup create when the backup create already in progress using --group option

------- Expected Behavior

The second backup create option is either ignored or stopped using a semantic check.

------- Actual Behavior

Backup directory structures are not created as per requirement. Unwanted files are left after the backup operation

------- Reproducibility

Reproducible

------- System Configuration

DC System

Changed in starlingx:
status: New → In Progress
Changed in starlingx:
assignee: nobody → André Dexheimer Carneiro (andre-dexheimercarneiro)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to distcloud (master)

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

commit fe50d060c8fe282af3079fadca7ad80c232a2ea2
Author: Andre Carneiro <email address hidden>
Date: Mon Nov 28 11:20:36 2022 -0300

    Add check to prevent concurrent backup operations

    This commit adds semantic check to avoid concurrent backup and
    restore operations on the same subcloud. This check is used twice:
    - By the API, to return an error if all the subclouds, specified using
    either --subcloud or --group options, have an ongoing backup and
    restore operation.
    - By the backend, to filter out any subclouds where backup and
    restore operations are in progress so that concurrent
    operations aren't triggered.

    Test Plan:
    1. PASS - Validate that concurrent backup create operations can't be
    triggered on a subcloud using the --subcloud option.
    2. PASS - Validate that the API returns an error if all the subclouds
    specified have an ongoing backup create operation.
    3. PASS - Validate that concurrent backup operations aren't started on
    any subclouds when using the --group option.
    4. PASS - Validate that concurrent backup restore operations can't be
    triggered on a subcloud using the --subcloud option.
    5. PASS - Validate that the API returns an error if all the subclouds
    specified have an ongoing backup restore operation.
    6. PASS - Validate that concurrent backup restore operations aren't
    started on any subclouds when using the --group option.

    Closes-Bug: 1998500

    Signed-off-by: Andre Carneiro <email address hidden>
    Change-Id: Ic11de20d7a323c400070cc41131b81dc5e3ddd56

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

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

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

commit b4e4877feda4851de7b5bbf5bc940551086462ca
Author: Tee Ngo <email address hidden>
Date: Thu Jun 8 16:27:59 2023 -0400

    Update invalid deploy states for restore list

    Add DEPLOY_STATE_PRE_INSTALL state to the list to disallow restore
    request while the subcloud is in pre-install state. This is an
    enhancement to commit
    https://review.opendev.org/c/starlingx/distcloud/+/865853.

    Test Plan:
      - Verify successful subcloud backup and restore with this change.
      - Make a subcloud restore with install request. While it's in
        pre-install, repeat the same restore request. Verify that the
        second request is rejected.

    Closes-Bug: 1998500
    Signed-off-by: Tee Ngo <email address hidden>
    Change-Id: I2c25408e84d63eca8fb4de8bddf88fe6bcc85976

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.