update/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
..
debian Improve logging for deploy start shell scripts 2024-02-28 11:07:03 -03:00
scripts Implement versioned deploy precheck script 2024-03-14 09:41:28 -03:00
service-files Create message class to sync deploy state between controllers 2024-02-16 15:51:49 +00:00
software Implement versioned deploy precheck script 2024-03-14 09:41:28 -03:00
.coveragerc Upload skeleton for unified software management 2023-04-03 14:03:04 +00:00
Hacking.rst Upload skeleton for unified software management 2023-04-03 14:03:04 +00:00
LICENSE Upload skeleton for unified software management 2023-04-03 14:03:04 +00:00
README.rst Upload skeleton for unified software management 2023-04-03 14:03:04 +00:00
pylint.rc Add version to software-api and software client 2024-02-08 04:23:29 -05:00
requirements.txt Add version to software-api and software client 2024-02-08 04:23:29 -05:00
setup.cfg deploy state changed update 2024-02-23 13:43:09 +00:00
setup.py Bash completion for USM 2023-08-03 16:21:00 +00:00
test-requirements.txt Upload skeleton for unified software management 2023-04-03 14:03:04 +00:00
tox.ini update tox ignore list to skip H904 2023-10-18 17:14:49 +00:00

README.rst

software

StarlingX Unified Software Delivery and Management