Python UnicodeDecodeError in undercloud.py

Bug #1544150 reported by Juan Manuel Torres on 2016-02-10
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tripleo
High
Unassigned

Bug Description

Execute in CentOS 7:
openstack undercloud install

Error:
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 750, in install
_run_instack(instack_env)
File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 636, in _run_instack
_run_live_command(args, instack_env, 'instack')
File "/usr/lib/python2.7/site-packages/instack_undercloud/undercloud.py", line 341, in _run_live_command
line = process.stdout.readline().decode()
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 74: ordinal not in range(128)

Get it to work changing line 341:
line = process.stdout.readline().decode('utf-8')

I use: https://github.com/openstack/instack-undercloud/tree/stable/liberty
undercloud.py: https://github.com/openstack/instack-undercloud/blob/stable/liberty/instack_undercloud/undercloud.py

description: updated
description: updated
Ben Nemec (bnemec) wrote :

This was fixed on master: https://review.openstack.org/#/c/270983/ It just needs a backport.

Reviewed: https://review.openstack.org/292409
Committed: https://git.openstack.org/cgit/openstack/instack-undercloud/commit/?id=85eb5a6fd68b1dc74b0c317e7050c2d5a659543f
Submitter: Jenkins
Branch: stable/liberty

commit 85eb5a6fd68b1dc74b0c317e7050c2d5a659543f
Author: Ben Nemec <email address hidden>
Date: Thu Jan 21 18:57:02 2016 +0000

    Explicitly decode to utf-8

    CI is currently failing on UnicodeDecodeErrors during the undercloud
    install. I can't reproduce locally, but hopefully this will fix
    the problem.

    Closes-Bug: 1544150
    Change-Id: I780629059d7375df727cab28dfa219a7c9c20af7
    (cherry picked from commit 3fdd07eb644e94adb1a958229c524dc1a45fc67f)

tags: added: in-stable-liberty

Witch decode('utf-8') i solution the problem.

They added the solution to code: https://github.com/openstack/instack-undercloud/blob/master/instack_undercloud/undercloud.py#L391

Brent Eagles (beagles) on 2016-06-14
Changed in tripleo:
status: New → Fix Committed
status: Fix Committed → Confirmed
status: Confirmed → Fix Committed
Changed in tripleo:
importance: Undecided → High
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers