Bug 1685619
| Summary: | swift write() error when downloading container | ||
|---|---|---|---|
| Product: | Red Hat OpenStack | Reporter: | Damien Ciabrini <dciabrin> |
| Component: | openstack-tripleo-common | Assignee: | Emilien Macchi <emacchi> |
| Status: | CLOSED ERRATA | QA Contact: | Sasha Smolyak <ssmolyak> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 15.0 (Stein) | CC: | cschwede, emacchi, mabrams, mburns, michele, slinaber, tenobreg |
| Target Milestone: | Upstream M3 | Keywords: | Triaged |
| Target Release: | 15.0 (Stein) | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | openstack-tripleo-common-10.4.1-0.20190313060345.1377727.el8ost | Doc Type: | No Doc Update |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-09-21 11:20:27 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
While this happens after downloading data from Swift, it doesn't look like a Swift issue to me, more like a py3 issue in tripleo-common when writing data to disk. Therefore re-assigning this BZ. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2019:2811 |
Description of problem: When trying to deploy an OSP15 overcloud, mistral get data from swift, and breaks due to the way python3 interprets the data: _id=033badf6-7ab3-4478-ae68-969ed531e3ec, action_cls='<class 'mistral.actions.action_factory.DownloadConfigAction'>', attributes='{}', params='{'work_dir': '/var/lib/mistral/overcloud', 'container_config': 'overcloud-config'}'] write() argument must be str, not bytes: TypeError: write() argument must be str, not bytes 2019-03-02 07:14:32.715 1 ERROR mistral.executors.default_executor Traceback (most recent call last): 2019-03-02 07:14:32.715 1 ERROR mistral.executors.default_executor File "/usr/lib/python3.6/site-packages/mistral/executors/default_executor.py", line 114, in run_action 2019-03-02 07:14:32.715 1 ERROR mistral.executors.default_executor result = action.run(action_ctx) 2019-03-02 07:14:32.715 1 ERROR mistral.executors.default_executor File "/usr/lib/python3.6/site-packages/tripleo_common/actions/config.py", line 124, in run 2019-03-02 07:14:32.715 1 ERROR mistral.executors.default_executor self.work_dir) 2019-03-02 07:14:32.715 1 ERROR mistral.executors.default_executor File "/usr/lib/python3.6/site-packages/tripleo_common/utils/swift.py", line 93, in download_container 2019-03-02 07:14:32.715 1 ERROR mistral.executors.default_executor f.write(contents) 2019-03-02 07:14:32.715 1 ERROR mistral.executors.default_executor TypeError: write() argument must be str, not bytes 2019-03-02 07:14:32.715 1 ERROR mistral.executors.default_executor Version-Release number of selected component (if applicable): had-04.ha.lab.eng.bos.redhat.com:5000/openstack-mistral-executor:20190226.1 How reproducible: always Steps to Reproduce: 1. deploy an osp15 overcloud Actual results: mistral breaks while downloading swift data Expected results: shouldn't fail Additional info: The breakage disappears when changing the following line in tripleo_common/utils/swift.py in download_container: with open(path, 'wb') as f: f.write(contents)