BnR - Subcloud restore for local installed fails due to missing install-values

Bug #2039111 reported by Victor Romano
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
StarlingX
Fix Released
Medium
Victor Romano

Bug Description

Brief Description
-----------------
BnR - Subcloud restore for local installed fails due to missing install-values

Error:

dcmanager subcloud-backup restore --subcloud subcloud2 --sysadmin-password Li69nux* --restore-values ~/restore-values_1.yaml
The server could not comply with the request since it is either malformed or otherwise incorrect. Data installation on subcloud2 is missing.
ERROR (app) Unable to restore subcloud backup

Severity
--------
Provide the severity of the defect.
<Major: System/Feature is usable but degraded>

Steps to Reproduce
------------------
Install SystemController
Deploy and manage subcloud
Backup subcloud
Locally reinstall subcloud
Attempt to restore via system controller

Expected Behavior
------------------
The subcloud should be restored successfully

Actual Behavior
----------------
The subcloud failed to be restored.

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

System Configuration
--------------------
DC with one subcloud

Branch/Pull Time/Commit
-----------------------
master

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

Timestamp/Logs
--------------
dcmanager subcloud-backup restore --subcloud subcloud2 --sysadmin-password Li69nux* --restore-values ~/restore-values_1.yaml
The server could not comply with the request since it is either malformed or otherwise incorrect. Data installation on subcloud2 is missing.
ERROR (app) Unable to restore subcloud backup

Test Activity
-------------
Regression

Workaround
----------
Update subcloud with install-values

dcmanger subcloud update --install-values <install-values file> --sysadmin-password <pwd> --bmc-password <pwd>

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/+/898017

Changed in starlingx:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to distcloud (master)

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

commit 041f52d4a183519d96781472aa208c00e301edfb
Author: Victor Romano <email address hidden>
Date: Wed Oct 11 20:12:57 2023 -0300

    Fix backup restore for locally installed subclouds

    When running "dcmanager subcloud-backup restore", there was a check
    for the presence of install values, preventing the restore of any
    subcloud that doesn't have said values in system controller db, like
    in a manual installation (without using --with-install).
    This commit changes this behavior and now it attempts to get
    the bootstrap_address with the following priority, returning an error
    if none of them are available:
    - Getting from restore_values
    - Getting from install_values
    - Getting from previous inventory file

    The restore_values should contain the bootstrap_address with the
    following format:

    bootstrap_address:
      subcloud1: 10.10.10.12
      subcloud2: 10.10.10.22
      subcloud3: 10.10.10.32
      <subcloud_name>: <subcloud_bootstrap_address>

    Test plan:
      All test cases were executed with a permutation of the following:
        - Providing a restore_values file with the bootstrap_address
        - Providing a restore_values file without the bootstrap_address
        - Providing the install_values
        - Don't provide neither restore_values or install_values
      Success cases:
      - PASS: Deploy a subcloud and take its backup. Manually reinstall
              the subcloud and run the "dcmanager subcloud-backup restore"
              command. Verify the subcloud was successfully restored.
      - PASS: Deploy a subcloud and take its backup. Run the
              "dcmanager subcloud-backup restore --with-install" command.
              Verify the subcloud was successfully restored.
      - PASS: Deploy two subclouds and add them in a group. Perform a group
              backup and after a group restore. Verify both subclouds were
              successfully restored.

      Failure cases:
      - PASS: Verify it's not possible to restore a subcloud that doesn't
              have the bootstrap_address in restore_values and doesn't
              have install_values in db or a previous inventory file in
              overrides folder.
      - PASS: Verify it's not possible to restore a subcloud that doesn't
              have install values with --with-install option. In a group
              operation, it's not possible to restore if any of the
              subclouds doesn't have install values.
      - PASS: Verify it's not possible to submit a restore request when
              the bootstrap_address is not defined correctly in
              restore_values, e.g. "bootstrap_address: 10.10.10.12"

    Closes-Bug: 2039111

    Change-Id: I17c561edde4670488c9e2951a2a5a18c114a0f8d
    Signed-off-by: Victor Romano <email address hidden>

Changed in starlingx:
status: In Progress → Fix Released
Ghada Khalil (gkhalil)
Changed in starlingx:
importance: Undecided → Medium
tags: added: stx.9.0 stx.distcloud stx.update
Changed in starlingx:
assignee: nobody → Victor Romano (vgluzrom)
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.