8 Commits

Author SHA1 Message Date
junfeng-li
38b4953e05 software deploy show implementation
This commit is to implement 'software deploy show'
Only one upgrade is allowed in the deployment every time.

[sysadmin@controller-0 ~(keystone_admin)]$ software deploy show
From Release  To Release  Reboot Required    State
============  ==========  ===============  =========
   23.09        24.03           Yes        deploying

Test Plan:
PASS: built and installed the iso and ran the command
          with deploy in progress
PASS: built and installed the iso and ran the command
          without deploy in progress

Task: 49134
Story: 2010676

Change-Id: I292837f1b9b39afbc589a9cae08b4c4b7f363b5e
Signed-off-by: junfeng-li <junfeng.li@windriver.com>
2023-12-05 15:34:40 +00:00
Zuul
169e36b686 Merge "Add upgrade support to software upload-dir" 2023-11-07 20:48:13 +00:00
Zuul
d8a10335bc Merge "Add --force option to deploy precheck" 2023-11-07 14:11:20 +00:00
Heitor Matsui
31ed091cbc Add --force option to deploy precheck
This commit adds an optional parameter '--force' to command
"software deploy precheck" to ignore alarms with lower severity
and non-mgmt affecting.

Test Plan:
PASS: force creation of a non-mgmt affecting alarm, such as [1],
      run deploy precheck without '--force' option and verify the
      command returns failure by the presence of alarms
PASS: same operation as the previous test case, but using '--force'
      option, and verify the command returns success and absence of
      alarms
PASS: force creation of a mgmt affecting alarm, such as [2], run
      deploy precheck with and without '--force' option and verify
      the command returns failure by the presence of mgmt affecting
      alarms in both cases

[1] Non Mgmt Affecting Alarm Example:
Alarm ID: 100.104
Text: File System threshold exceeded ; threshold 80.00%, actual 84.12%

[2] Mgmt Affecting Alarm Example:
Alarm ID: 100.101
Text: Platform CPU threshold exceeded ; threshold 95.00%, actual 100.00%

Depends-on: https://review.opendev.org/c/starlingx/config/+/899750

Story: 2010676
Task: 49032

Change-Id: Ic4d327c3b072ce0f60e20ba7467ae6d9f4eb5bd4
Signed-off-by: Heitor Matsui <heitorvieira.matsui@windriver.com>
2023-11-06 12:29:28 -03:00
Jessica Castelino
23b2afdc15 Support is-available, is-deployed and is-committed software CLI
This commit enables 'software is-available', 'software is-deployed'
and 'software is-committed' CLI commands and API endpoints within
USM.

Test Plan:
[PASS] software is-applied <release list>
[PASS] software is-deployed <release list>
[PASS] software is-committed <release-list>

Story: 2010676
Task: 49033
Change-Id: I9b718a2dbbbd53ce999724cfd4d549e65d680df1
Signed-off-by: Jessica Castelino <jessica.castelino@windriver.com>
2023-11-03 20:33:33 +00:00
junfeng-li
7cf3496453 Add upgrade support to software upload-dir
Details: This commit allows 'software upload-dir' to upload
release iso and sig files from the given folder.

Test Plan:

PASS: upload iso/sig files from a folder
PASS: upload patches from a different folder

Task: 48983
Story: 2010676
Change-Id: Ie6179b6f0f9193983556ab6eae4353154aba6ca8
Signed-off-by: junfeng-li <junfeng.li@windriver.com>
2023-10-23 18:19:58 +00:00
Heitor Matsui
ef0fe15e2d Create software deploy precheck endpoint
This commit:
- Creates the "software deploy precheck" endpoint
- Implements a couple TODOs on the precheck code
- Replaces some hard-coded variables for constants
- Replaces "system" commands to retrieve system health
  for sysinv client calls
- Creates separate health check classes for general and
  upgrade-specific health checks
- Renames standalone precheck module to "deploy-precheck"
- Allows precheck module to receive keystone credentials
  as parameters so that the precheck can be run against a
  remote host (Use Case: system controller running precheck
  against subclouds, but mind that DC support will be added
  on a future commit)
- Creates an utility module that can be imported by standalone
  USM upgrade scripts (copied to the ISO by [1])

Test Plan
PASS: run "software deploy precheck" and verify it returning
      correctly, and verify that health checks output are valid
      given the current system status

Story: 2010676
Task: 48902

Depends-on: https://review.opendev.org/c/starlingx/update/+/898474
Relates-to: [1] https://review.opendev.org/c/starlingx/tools/+/897484

Change-Id: I4d04804c1b1e147f486434df23a291c6d315842b
Signed-off-by: Heitor Matsui <heitorvieira.matsui@windriver.com>
2023-10-18 16:22:50 -03:00
Jessica Castelino
af133fec2f Build Software Client python wheels package
USM needs to build a python wheels package containing ONLY the
‘software’ cli client for inclusion in the Remote CLI Container.

Test Plan:
PASS Build software-client package
PASS Build ISO
PASS Install ISO
PASS Run "software list" and "software upload"

Story: 2010676
Task: 48851
Change-Id: Idb6d69a66d625291094501cacdb0bb84f511f81d
Signed-off-by: Jessica Castelino <jessica.castelino@windriver.com>
2023-10-05 20:16:14 +00:00