This commit updates subcloud error reporting command
'dcmanager subcloud errors' in order to provide information in some
upgrade error scenarios.
Some sysinv error responses are added also to the command, same as
strategy_step details, and could be improved in the future.
Test Plan:
PASS:
Generate two management affecting alarms on subcloud.
Create and apply upgrade strategy.
Verify that after strategy fails, dcmanager subcloud
errors command returns error message and 'system
health-query-upgrade' information from subcloud.
PASS:
Upgrade dcmanager with invalid license
Modify the license file to make it invalid but readable.
When upgrade strategy fails,
run 'dcmanager subcloud errors <subcloud>' and check that
output display information related with the error.
PASS:
On the System Controller, change the compatible_version of
load to invalid one.
When upgrade strategy fails,
run 'dcmanager subcloud errors <subcloud>' and check that
output display information related with the error.
Check that stack trace is not lost and is available into
/var/log/dcmanager/orchestrator.log
PASS:
Modify subcloud rvmc information to invalid one.
When upgrade strategy fails,
run 'dcmanager subcloud errors <subcloud>' and check that
output display information regarding installation failed.
PASS:
Modify bootstrap subcloud information to make
migration failure.
When upgrade strategy fails,
Run 'dcmanager subcloud errors <subcloud>' and check that
output display information related with the error.
PASS:
Bypass activating upgrade step actions to make completing
upgrade fail.
Create and apply strategy.
Verify that completing upgrade fails and dcmanager subcloud
errors command shows exception from sysinv.
PASS:
Apply upgrade strategy after failed upgrade strategy.
Ensure subcloud is healthy for upgrade.
Check that dcmanager subcloud errors returns
'no errors present' after pre_check step.
Story: 2010271
Task: 46914
Signed-off-by: fperez <fabrizio.perez@windriver.com>
Change-Id: I5e2fa855778556d772bb29611604f9cd02a507ac