Luis Eduardo Bonatti b5b0f1bfce Create a "software-deploy-set-failed" command line utility
This commit creates a script to set the deploy to failed state. It can
be used in cases of a state remains stuck for some reason i.e reboot.
A more sophisticated solution in on track to be implemented in the
future.

The utility requires root privilege and only run on active controller.
It should display to user the current state and warn the operation
consequences and also a confirmation to be executed. At the end it will
inform the next legit operation to be taken.

Test Plan:
PASS: Execute script in non-active controller.
PASS: Execute script in active controller.
PASS: Execute script with confirm argument.
PASS: Build Pkg, Build ISO, Install.

PASS: Executed sudo software-deploy-failed with success for this
scenarios:

deploy state: start
deploy state: activate
deploy state: activate-rollback

PASS: sudo software-deploy-failed fail in case of missing hostname
argument for this scenarios:

deploy state: host
deploy state: host-done
deploy state: host-rollback

PASS: Executed sudo software-deploy-set-failed with success with
--hostname/-h <hostname> option for this scenarios:
deploy state: start | host state: pending
deploy state: host | host state: deploying
deploy state: host | host state: deployed
deploy state: host done | host state: deployed

Story: 2010676
Task: 51130

Change-Id: I3ab01460496ba72ebd9941a725945aac92adf749
Signed-off-by: Luis Eduardo Bonatti <luizeduardo.bonatti@windriver.com>
2024-10-22 11:39:44 -03:00

47 lines
1.3 KiB
INI

[metadata]
name = software
version = attr: software.VERSION
summary = Unified Software Management
description = file: README.rst
author = StarlingX Team
author_email = starlingx-discuss@lists.starlingx.io
home_page = https://www.starlingx.io/
license_files = LICENSE
classifiers =
Environment :: OpenStack
Intended Audience :: Information Technology
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.9
[options]
packages = find:
python_requires = >=3.9
install_requires =
pycryptodomex
[options.packages.find]
exclude =
software.tests*
[options.package_data]
* =
templates/*
[options.entry_points]
console_scripts =
software-controller-daemon = software.software_controller:main
software-agent = software.software_agent:main
software-migrate = software.utilities.migrate:migrate
software-deploy-update = software.utilities.update_deploy_state:update_state
software-deploy-activate = software.utilities.activate:activate
software-deploy-activate-rollback = software.utilities.activate_rollback:activate_rollback
software-deploy-set-failed = software.utilities.deploy_set_failed:deploy_set_failed
[wheel]
universal = 1