Files
distcloud/distributedcloud/files
Gustavo Herzmann 27f1d09c18 Automatically trigger local restore after remote install
This commit automatically triggers the local restore after remote
subcloud installation during an auto-restore operation.

It also adds support for using a backup file initially stored on the
system controller by copying it to the miniboot.iso, which is then
transferred via kickstart to the subcloud [1].

[1]: https://review.opendev.org/c/starlingx/metal/+/951876

Test Plan:
Before running the following tests, prestage the subcloud for install
and create two backups, one with --local-only and another without it.
01. PASS - Run a subcloud restore with --auto. Verify that the subcloud
    is auto-restored with the backup stored inside the system
    controller.
02. PASS - Run a subcloud restore with --auto and --local-only. Verify
    that the subcloud is auto-restored with the local backup stored
    inside the subcloud.
03. PASS - Run a subcloud restore with --auto and force a failure
    during restore. Verify that the restore playbook detects the
    failure correctly.
04. PASS - Copy the local platform backup file to
    /opt/platform-backup/factory/<sw-version>/ and run a subcloud
    restore with --factory. Verify that the subcloud is restored using
    the backup stored in the factory directory.
05. PASS - After a subcloud is auto restored, verify that the
    /opt/platform-backup/auto-restore directory is removed.
06. PASS - After a subcloud is auto restored, restart the subcloud and
    verify that the dc-auto-restore systemd service is not triggered.
07. PASS - After a subcloud is auto restored, verify that the log file
    /var/log/auto-restore.log exists and contains all the logged data
    from the execute-restore.sh script and the restore playbook output.
08. PASS - Run the standard subcloud restore operation (without --auto
    or --factory) and verify that it's still working.
09. PASS - Verify that the temporary directory and all staged files are
    deleted after the subcloud install operation is complete.

Depends-On: https://review.opendev.org/c/starlingx/utilities/+/951881
Depends-On: https://review.opendev.org/c/starlingx/metal/+/951876

Story: 2011454
Task: 52361

Change-Id: I457801093b39c783bb61c1a531bddf8e877ec039
Signed-off-by: Gustavo Herzmann <gustavo.herzmann@windriver.com>
2025-06-18 16:04:53 -03:00
..
2024-07-24 18:37:25 +00:00
2025-03-14 15:48:19 -04:00