Comment 2 for bug 2031670

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

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

commit 94b9a609798019cf4141dc5ea5121728c113d313
Author: Gustavo Pereira <email address hidden>
Date: Thu Aug 17 12:05:33 2023 -0300

    Fix offline subcloud backup delete

    This commit fixes the issue that prevented a removal of a
    subcloud backup stored on central storage when the subcloud
    is offline.

    The _create_subcloud_inventory_file() function queries the
    subcloud for the bootstrap-address to write the ansible
    inventory file, this is not possible when the subcloud is
    offline.
    When the local_only flag is False, the playbook runs locally
    on the system controller, so the subcloud inventory is not
    needed. This commit skips the inventory file creation when
    local_only is False.

    Test Plan:

    PASS - Deploy a subcloud, create a subcloud backup
    stored on central storage and shutdown the subcloud.
    After the subcloud is offline run dcmanager subcloud
    backup delete command.

    PASS - Deploy a subcloud, create a subcloud backup
    stored in local storage with --local-only parameter
    set. Run delete command to remove the created backup.

    Closes-bug: 2031670

    Change-Id: I7f7f3441c5b6cd3aa9f89a676283c9d33d410aaa
    Signed-off-by: Gustavo Pereira <email address hidden>