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>