distcloud/distributedcloud/dcmanager/orchestrator
Victor Romano 37b0ef020c Change SubcloudInstall class to use admin context
The SubcloudInstall class have the context as a parameter, using it
to access the keystone and sysinv clients. If the context expired,
which can happen in a group restore with a group with more than 100
subclouds, an invalid token is loaded from endpoint cache and the
SysinvClient initialization fails. This commit changes the
SubcloudInstall class to always use the admin context to allow
installation on subclouds that have been on queue for more time than
the context expiry time.

Additionally, a small bug regarding install cleanup was fix. If there
was an error while initializing the SubcloudInstall class, the
cleanup would be executed regardless and fail, because the class
wasn't initialized correctly. A conditional was added to only run
cleanup if it was initialized correctly.

Test plan:
  - Note: upgrade from stx8 to master is currently not functional,
          but since the changes were made on the installation part,
          the test could still be performed.
  - PASS: Run "dcmanager subcloud deploy install" normally and verify
          the installation completed successfully.
  - PASS: Run "dcmanager subcloud deploy install" adding a 2h sleep
          between the request and SubcloudInstall initialization and
          verify the installation completed successfully.
  - PASS: Upgrade a subcloud from stx8 to master normally and verify
          the installation part completed sucessfully.
  - PASS: Upgrade a subcloud from stx8 to master adding a 2h sleep
          between the request and SubcloudInstall initialization and
          verify the installation part completed sucessfully.

Closes-Bug: 2045139

Change-Id: Idcdf8faf755e655066927f543b75071afa9c43fc
Signed-off-by: Victor Romano <victor.gluzromano@windriver.com>
2023-12-01 14:34:18 -03:00
..
states Change SubcloudInstall class to use admin context 2023-12-01 14:34:18 -03:00
__init__.py Move dcmanager orchestration to a separate process 2020-09-14 11:17:06 -04:00
fw_update_orch_thread.py Remove standard WR License notice from StarlingX distributedcloud 2021-12-23 19:55:09 +00:00
kube_rootca_update_orch_thread.py Add features to kube-root-ca update orchestration 2021-10-06 08:01:33 -05:00
kube_upgrade_orch_thread.py Merge "DC kube upgrade robustness improvements" 2021-12-24 15:55:19 +00:00
orch_thread.py Add software client 2023-09-22 07:40:51 -03:00
patch_orch_thread.py Add the upload-only option to DC patch orchestration 2023-03-02 13:56:18 -03:00
prestage_orch_thread.py Add release optionality to subcloud prestage 2023-05-19 16:33:42 -04:00
rpcapi.py Increase RPC client timeout for subcloud backup delete 2022-11-21 21:07:51 +00:00
service.py Set open file limit for dcmanager services 2023-03-30 16:52:13 -03:00
software_orch_thread.py Create USM dummy states and tests 2023-10-11 14:15:48 +00:00
sw_update_manager.py Update prestage orchestration to use usm 2023-11-08 09:25:13 -03:00
sw_upgrade_orch_thread.py Add CA certificate transfer state to DC upgrade orchestration 2022-12-01 14:18:36 -05:00