Brief Description
-----------------
Executing the subcloud deploy resume command after aborting a subcloud deployment during bootstrap results in a type error.
Severity
-----------------
Minor: System/Feature is usable with minor issue
Steps to Reproduce
-----------------
In a DC system:
1. Import the ISO
system --os-region-name SystemController load-import --active starlingx-intel-x86-64-cd.iso starlingx-intel-x86-64-cd.sig
2. Start the subcloud deployment
dcmanager subcloud add --bootstrap-address 10.10.20.12 --bootstrap-values bootstrap-values-subcloud1.yml --deploy-config deployment-config-subcloud1.yaml --sysadmin-password <password> --bmc-password <password> --install-values install-values-subcloud1.yml
3. Abort the subcloud deployment during the bootstrap stage
dcmanager subcloud deploy abort subcloud1
4. Execute the subcloud deploy resume
dcmanager subcloud deploy resume subcloud1 --bootstrap-address 10.10.20.12 --bootstrap-values bootstrap-values-subcloud1.yml --deploy-config deployment-config-subcloud1.yaml --sysadmin-password <password> --bmc-password <password> --install-values install-values-subcloud1.yml
Expected Behavior
-----------------
The subcloud deploy resume should be executed successfully and the subcloud should start the bootstrap process.
Actual Behavior
-----------------
The command execution fails with the message ERROR (app) b''.
Reproducibility
-----------------
100% Reproducible
System Configuration
-----------------
DC system with one subcloud
Last Pass
-----------------
N/A
Timestamp/Logs
-----------------
dcmanager-api.log
2024-05-15 19:06:08.651 21960 INFO dccommon.drivers.openstack.sdk_platform [req-042fc092-ed24-4ad9-92bd-3ace1e09f16a 0c9be6f5630544c89c65d3c4a1c81172 - - default default] The cached keystone token for subcloud RegionOne will expire soon 2024-05-15T19:03:06.000000Z
2024-05-15 19:06:08.652 21960 INFO dccommon.endpoint_cache [req-042fc092-ed24-4ad9-92bd-3ace1e09f16a 0c9be6f5630544c89c65d3c4a1c81172 - - default default] The cached keystone token for RegionOne will expire soon 2024-05-15T19:03:06.000000Z
2024-05-15 19:06:08.929 21960 INFO dccommon.endpoint_cache [req-042fc092-ed24-4ad9-92bd-3ace1e09f16a 0c9be6f5630544c89c65d3c4a1c81172 - - default default] Generated Master keystone client and master token as they are expiring soon
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor [req-042fc092-ed24-4ad9-92bd-3ace1e09f16a 0c9be6f5630544c89c65d3c4a1c81172 - - default default] Exception in AuditLoggingHook passed to event 'on_error': not indexable: TypeError: not indexable
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor Traceback (most recent call last):
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor File "/usr/lib/python3/dist-packages/pecan/core.py", line 683, in __call__
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor self.invoke_controller(controller, args, kwargs, state)
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor File "/usr/lib/python3/dist-packages/pecan/core.py", line 574, in invoke_controller
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor result = controller(*args, **kwargs)
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor File "/usr/lib/python3/dist-packages/dcmanager/api/controllers/v1/phased_subcloud_deploy.py", line 549, in patch
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor subcloud = self._deploy_resume(context, pecan.request, subcloud)
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor File "/usr/lib/python3/dist-packages/dcmanager/api/controllers/v1/phased_subcloud_deploy.py", line 470, in _deploy_resume
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor psd_common.pre_deploy_bootstrap(context, payload, subcloud,
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor File "/usr/lib/python3/dist-packages/dcmanager/common/phased_subcloud_deploy.py", line 1090, in pre_deploy_bootstrap
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor format_ip_address(payload)
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor File "/usr/lib/python3/dist-packages/dcmanager/common/phased_subcloud_deploy.py", line 724, in format_ip_address
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor if k in payload[consts.INSTALL_VALUES]:
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor File "/usr/lib/python3.9/cgi.py", line 573, in __contains__
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor raise TypeError("not indexable")
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor TypeError: not indexable
2024-05-15 19:06:09.012 21960 ERROR dcmanager.common.context.auditor
2024-05-15 19:06:09.013 21960 INFO dcmanager.common.context.auditor [req-042fc092-ed24-4ad9-92bd-3ace1e09f16a 0c9be6f5630544c89c65d3c4a1c81172 - - default default] Request id is not in request, setting it to an auto generated id.
2024-05-15 19:06:09.013 21960 INFO dcmanager.common.context.auditor [req-1b0c4fd3-cf3e-4974-9912-b9b5077c9a61 0c9be6f5630544c89c65d3c4a1c81172 7bacf79a63ae4a1599f369081d3a3124 - - -] 192.168.204.3 "PATCH /v1.0/phased-subcloud-deploy/subcloud1/resume HTTP/1.0" status: 200 len: 0 time: 0.3794286251068115 POST: NestedMultiDict([('install_values', FieldStorage('install_values', 'install-values-subcloud1.yml')), ('bootstrap-address', '10.10.20.12'), ('sysadmin_password', '******'), ('bmc_password', '******')]) host:192.168.204.2:8119 agent:python-requests/2.25.1 user: admin tenant: admin domain: Default
Alarms
-----------------
N/A
Workaround
-----------------
The key error raised is related to the install values. Because of that, running the resume command without it results in the correct behavior.
dcmanager subcloud deploy resume subcloud1 --bootstrap-address 10.10.20.12 --bootstrap-values bootstrap-values-subcloud1.yml --deploy-config deployment-config-subcloud1.yaml --sysadmin-password <password> --bmc-password <password> --install-values install-values-subcloud1.yml
Fix proposed to branch: master /review. opendev. org/c/starlingx /distcloud/ +/920598
Review: https:/