update/software/software
Luis Eduardo Bonatti 32250d9b59 Implement versioned deploy precheck script
This commit is to include a versioned deploy precheck script into
/opt/software/scripts/rel-<sw_version> to be able to run the correct
precheck code for a specific release.

Along with this commit, the precheck api is changed to use the new
location of the script, and the precheck script is changed to add
support to patch-only prechecks, and as a consequence, minor wording
changes were done to return more accurate messages to the user.

1. For the iso upload scenario:
The upload process will copy all scripts under
<iso_root>/upgrades/software-deploy to /opt/software/rel-<ver>/scripts

2. For the patch upload scenario:
The upload process will check if patch contains the deploy-precheck
script. If it does, then the script is copied to
/opt/software/rel-<ver>/scripts, if not then a symlink will be created
to the patch 'required patch' versioned precheck script.

Notes:
- iso (prepatched or not) will always come with deploy-precheck script
- <ver> assumes the format MM.mm.pp

Test Plan:
PASS: Upload multiples patches, both with and without precheck
      scripts, and verify the versioned directories are created
      and the precheck script is created as expected
PASS: Run deploy precheck for an iso release and verify the upgrade
      precheck output is returned as expected
PASS: Run deploy precheck for a patch release and verify the patch
      precheck output is returned as expected

Depends-on: https://review.opendev.org/c/starlingx/metal/+/911595

Story: 2010676
Task: 49263

Change-Id: I04ff89d43579fd71592f7ec534db57a1ead79483
Signed-off-by: Luis Eduardo Bonatti <LuizEduardo.Bonatti@windriver.com>
Co-signed-off-by: Heitor Matsui <heitorvieira.matsui@windriver.com>
2024-03-14 09:41:28 -03:00
..
api Fix in_sync_controller endpoint respond decode err 2024-03-04 21:48:32 +00:00
authapi Create 2nd thread to handle USM REST API requests 2024-03-01 14:39:33 +00:00
db Create 2nd thread to handle USM REST API requests 2024-03-01 14:39:33 +00:00
templates USM State Machine 2023-06-29 17:53:39 +00:00
tests Remove duplicate load import script copy 2024-02-28 17:38:51 -03:00
utilities Improve logging for deploy python scripts 2024-02-28 11:00:50 -03:00
__init__.py Package the pecan templates with the code 2023-07-17 15:33:45 +00:00
apt_utils.py Fix pep8 errors 2024-01-23 20:22:42 +00:00
base.py Update unit tests for new software component 2023-05-01 21:09:15 +00:00
certificates.py Setup controller and agent processes for "software" 2023-04-20 19:22:30 +00:00
config.py Use "apt-ostree" to manage software deploy start 2024-01-10 21:23:24 +00:00
constants.py Implement versioned deploy precheck script 2024-03-14 09:41:28 -03:00
exceptions.py Implement versioned deploy precheck script 2024-03-14 09:41:28 -03:00
messages.py deploy state changed update 2024-02-23 13:43:09 +00:00
ostree_utils.py Add retry logic for mount 2023-11-29 21:09:06 +00:00
release_data.py Create release_data wrapper classes 2024-02-14 18:35:35 +00:00
release_signing.py Setup controller and agent processes for "software" 2023-04-20 19:22:30 +00:00
release_verify.py Setup controller and agent processes for "software" 2023-04-20 19:22:30 +00:00
software_agent.py Create message class to sync deploy state between controllers 2024-02-16 15:51:49 +00:00
software_controller.py Implement versioned deploy precheck script 2024-03-14 09:41:28 -03:00
software_entities.py deploy state changed update 2024-02-23 13:43:09 +00:00
software_functions.py Implement versioned deploy precheck script 2024-03-14 09:41:28 -03:00
software_worker.py Create wrapper to run commands and log structured output 2023-11-24 16:26:07 -03:00
sysinv_utils.py Implement USM software deploy start for upgrade 2023-12-27 16:07:53 -03:00
utils.py deploy state changed update 2024-02-23 13:43:09 +00:00