update key-revocation image failed due to importing firmware: 'int' object has no attribute 'encode'
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
StarlingX |
Fix Released
|
High
|
Al Bailey |
Bug Description
Brief Description
-----------------
dcmanager fw-update-strategy apply key-revocation image failed due to importing firmware: 'int' object has no attribute 'encode'
Severity
--------
Major
Steps to Reproduce
------------------
on subcloud3: system host-device-
system --os-region-name SystemController device-image-upload ssl_csk1_cancel.bin key-revocation 8086 0b30 --revoke-key-id 1
system --os-region-name SystemController device-image-apply 3cc0ad4f-
dcmanager fw-update-strategy create --max-parallel-
dcmanager fw-update-strategy apply
Expected Behavior
------------------
subcloud3 updates ssl_csk1_cancel.bin successfully.
Actual Behavior
----------------
update failed due to failed due to importing firmware: 'int' object has no attribute 'encode'
Reproducibility
---------------
not sure
System Configuration
-------
Lab-name: DC-3
Branch/Pull Time/Commit
-------
2020-07-31_20-00-00
Last Pass
---------
N/A
Timestamp/Logs
--------------
on subcloud3:
[sysadmin@
+------
| Property | Value |
+------
| uuid | 36bee9f7-
| label_key | subcloud3 |
| label_value | 11 |
+------
on SystemController:
[sysadmin@
+------
| Property | Value |
+------
| uuid | 3cc0ad4f-
| bitstream_type | key-revocation |
| pci_vendor | 8086 |
| pci_device | 0b30 |
| bitstream_id | None |
| key_signature | None |
| revoke_key_id | 1 |
| name | None |
| description | None |
| image_version | None |
| applied | False |
| applied_labels | |
+------
[sysadmin@
+------
| Property | Value |
+------
| uuid | 3cc0ad4f-
| bitstream_type | key-revocation |
| pci_vendor | 8086 |
| pci_device | 0b30 |
| bitstream_id | None |
| key_signature | None |
| revoke_key_id | 1 |
| name | None |
| description | None |
| image_version | None |
| applied | True |
| applied_labels | [{u'subcloud3': u'11'}] |
+------
[sysadmin@
+------
| Field | Value |
+------
| strategy type | firmware |
| subcloud apply type | None |
| max parallel subclouds | 4 |
| stop on failure | False |
| state | initial |
| created_at | 2020-08-
| updated_at | None |
+------
[sysadmin@
+------
| Field | Value |
+------
| strategy type | firmware |
| subcloud apply type | None |
| max parallel subclouds | 4 |
| stop on failure | False |
| state | applying |
| created_at | 2020-08-
| updated_at | 2020-08-
+------
[sysadmin@
+------
| cloud | stage | state | details | started_at | finished_at |
+------
| subcloud1 | 3 | applying fw update strategy | apply phase is 16% complete | 2020-08-04 23:59:04.558906 | None |
| subcloud3 | 3 | failed | importing firmware: 'int' object has no attribute 'encode' | 2020-08-04 23:59:04.564468 | 2020-08-04 23:59:06.111814 |
| subcloud2 | 4 | initial | | None | None |
| subcloud4 | 4 | initial | | None | None |
+------
Test Activity
-------------
Functional Testing
This is a stacktrace in the logs that may be related to this:
2020-08-04 23:59:05.982 428684 INFO dcmanager. manager. states. base [req-bfa9924a- 60ed-4dbf- 8740-55b624a8ce c5 - - - - -] Stage: 3, State: importing firmware, Subcloud: subcloud3, Details: Uploading image:3cc0ad4f- 7e3a-432a- bb97-2c43286566 35 manager. fw_update_ orch_thread [req-bfa9924a- 60ed-4dbf- 8740-55b624a8ce c5 - - - - -] Failed! Stage: 3, State: importing firmware, Subcloud: subcloud3: AttributeError: 'int' object has no attribute 'encode' manager. fw_update_ orch_thread Traceback (most recent call last): manager. fw_update_ orch_thread File "/usr/lib/ python2. 7/site- packages/ dcmanager/ manager/ fw_update_ orch_thread. py", line 391, in perform_ state_action manager. fw_update_ orch_thread next_state = state_operator. perform_ state_action( strategy_ step) manager. fw_update_ orch_thread File "/usr/lib/ python2. 7/site- packages/ dcmanager/ manager/ states/ firmware/ importing_ firmware. py", line 119, in perform_ state_action manager. fw_update_ orch_thread region) .upload_ device_ image(bitstream file, fields) manager. fw_update_ orch_thread File "/usr/lib/ python2. 7/site- packages/ dccommon/ drivers/ openstack/ sysinv_ v1.py", line 796, in upload_device_image manager. fw_update_ orch_thread **fields) manager. fw_update_ orch_thread File "/usr/lib64/ python2. 7/site- packages/ cgtsclient/ v1/device_ image.py" , line 46, in upload manager. fw_update_ orch_thread return self._upload_ multipart( self._path( ), dict(file=file), data=data) manager. fw_update_ orch_thread File "/usr/lib64/ python2. 7/site- packages/ cgtsclient/ common/ base.py" , line 62, in _upload_multipart manager. fw_update_ orch_thread 'POST', url, body=body, data=data) manager. fw_update_ orch_thread File "/usr/lib64/ python2. 7/site- packages/ cgtsclient/ common/ http.py" , line 307, in upload_ request_ with_multipart manager. fw_update_ orch_thread enc = MultipartEncode r(fields) manager. fw_update_ orch_thread File "/usr/lib64/ python2. 7/site- packages/ requests_ toolbelt/ multipart/ encoder. py", line 125, in __init__ manager. fw_update_ orch_thread self._prepare_ parts() manager. fw_update_ orch_thread File "/usr/lib64/ python2. 7/site- packages/ requests_ toolbelt/ multipart/ encoder. py", line 246, in _prepare_parts manager. fw_update_ orch_thread self.parts = [Part.from_field(f, enc) for f in self._iter_ fields( )]
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.109 428684 ERROR dcmanager.
2020-08-04 23:59:06.10...