"openstack overcloud config download" fails with Python3

Bug #1824225 reported by Emilien Macchi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Fix Released
High
Emilien Macchi

Bug Description

(undercloud) [stack@undercloud tripleo-heat-templates]$ openstack overcloud config download
Starting config-download export...
config-download export successful
Finished config-download export.
Exception occured while running the command
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/tripleoclient/command.py", line 30, in run
    super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/osc_lib/command/command.py", line 41, in run
    return super(Command, self).run(parsed_args)
  File "/usr/lib/python3.6/site-packages/cliff/command.py", line 184, in run
    return_code = self.take_action(parsed_args) or 0
  File "/usr/lib/python3.6/site-packages/tripleoclient/v1/overcloud_config.py", line 106, in take_action
    f.write(tarball_contents)
TypeError: write() argument must be str, not bytes
write() argument must be str, not bytes

Changed in tripleo:
assignee: nobody → Emilien Macchi (emilienm)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (master)

Fix proposed to branch: master
Review: https://review.openstack.org/651634

Changed in tripleo:
status: Triaged → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (master)

Reviewed: https://review.openstack.org/651634
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=ef0e50851536fee32f34ce8f4a8d88f4c39b7ada
Submitter: Zuul
Branch: master

commit ef0e50851536fee32f34ce8f4a8d88f4c39b7ada
Author: Emilien Macchi <email address hidden>
Date: Wed Apr 10 15:47:26 2019 -0400

    Make overcloud_config working with Python 3

    Open and write the content from the file in Swift as bytes and in read mode,
    otherwise Python 3 fails to open it as it comes as a string by default.

    Change-Id: Ie6abc2e58cc7f349881f1315e3a56af9a6814791
    Closes-Bug: #1824225

Changed in tripleo:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to python-tripleoclient (stable/stein)

Fix proposed to branch: stable/stein
Review: https://review.openstack.org/651808

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-tripleoclient (stable/stein)

Reviewed: https://review.openstack.org/651808
Committed: https://git.openstack.org/cgit/openstack/python-tripleoclient/commit/?id=3ae5ac60f3e71043925d11e26c2eaa586fbd83d7
Submitter: Zuul
Branch: stable/stein

commit 3ae5ac60f3e71043925d11e26c2eaa586fbd83d7
Author: Emilien Macchi <email address hidden>
Date: Wed Apr 10 15:47:26 2019 -0400

    Make overcloud_config working with Python 3

    Open and write the content from the file in Swift as bytes and in read mode,
    otherwise Python 3 fails to open it as it comes as a string by default.

    Change-Id: Ie6abc2e58cc7f349881f1315e3a56af9a6814791
    Closes-Bug: #1824225
    (cherry picked from commit ef0e50851536fee32f34ce8f4a8d88f4c39b7ada)

tags: added: in-stable-stein
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 12.0.0

This issue was fixed in the openstack/python-tripleoclient 12.0.0 release.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/python-tripleoclient 11.5.0

This issue was fixed in the openstack/python-tripleoclient 11.5.0 release.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.