glance.tests.functional.v2.test_images.TestImages.test_download_random_access failed

Bug #1447463 reported by John Haan
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Glance
Invalid
Critical
Unassigned

Bug Description

The error message is below.

Traceback (most recent call last):
  File "tools/colorizer.py", line 326, in <module>
    if runner.run(test).wasSuccessful():
  File "/usr/lib/python2.7/unittest/runner.py", line 158, in run
    result.printErrors()
  File "tools/colorizer.py", line 305, in printErrors
    self.printErrorList('FAIL', self.failures)
  File "tools/colorizer.py", line 315, in printErrorList
    self.stream.writeln("%s" % err)
  File "/usr/lib/python2.7/unittest/runner.py", line 24, in writeln
    self.write(arg)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 600-602: ordinal not in range(128)

There is get method from glance server.

response = requests.get(path, headers=headers)

The type of text in this response is unicode, which is '\x1f\x8b\x08\x00\x00\x00\x00\x00\x02\xff\x8b\x02\x00gW\xbcY\x01\x00\x00\x00'

ascii codec can't encode this unicode type.

This issue is also related other unit test like test_image_life_cycle.

Revision history for this message
Pawel Koniszewski (pawel-koniszewski) wrote :

Rising importance to critical too bring more attention - gate is failing every time. I haven't found why yet.

Changed in glance:
importance: Undecided → Critical
Revision history for this message
June Yi (gochist) wrote :

Here's more meaningful log.

~/glance# testr run glance.tests.functional.v2.test_images.TestImages.test_image_lifecycle
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-160} \
${PYTHON:-python} -m subunit.run discover -t ./ ./glance/tests --list
running=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-160} \
${PYTHON:-python} -m subunit.run discover -t ./ ./glance/tests --load-list /tmp/tmpXW9DOl
======================================================================
FAIL: glance.tests.functional.v2.test_images.TestImages.test_image_lifecycle
tags: worker-0
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/root/glance/glance/tests/functional/v2/test_images.py", line 398, in test_image_lifecycle
    self.assertEqual('ZZZZZ', response.text)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 350, in assertEqual
    self.assertThat(observed, matcher, message)
  File "/usr/local/lib/python2.7/dist-packages/testtools/testcase.py", line 435, in assertThat
    raise mismatch_error
testtools.matchers._impl.MismatchError: !=:
reference = 'ZZZZZ'
actual = u'\x1f?\x08\x00\x00\x00\x00\x00\x02???\x02\x02\x00?i??\x05\x00\x00\x00'
Ran 1 tests in 8.668s (-0.060s)
FAILED (id=7, failures=1)

Louis Taylor (kragniz)
Changed in glance:
status: New → Confirmed
Changed in glance:
assignee: nobody → Pawel Koniszewski (pawel-koniszewski)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Changed in glance:
status: Confirmed → In Progress
Revision history for this message
Pawel Koniszewski (pawel-koniszewski) wrote :

The problem is new requests library version - 2.6.1. Review is just to confirm what I found in my local env.

Changed in glance:
status: In Progress → Confirmed
Changed in glance:
assignee: Pawel Koniszewski (pawel-koniszewski) → nobody
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on glance (master)

Change abandoned by Pawel Koniszewski (<email address hidden>) on branch: master
Review: https://review.openstack.org/176771
Reason: It installed version from global requirements so I won't validate it there. However, in my local environment requests 2.6.0 works very well.

Revision history for this message
Nikhil Komawar (nikhil-komawar) wrote :
Revision history for this message
Pawel Koniszewski (pawel-koniszewski) wrote :

requests 2.6.2 is out. I'll keep watching zuul. First change that used requests 2.6.2 failed - https://jenkins07.openstack.org/job/gate-glance-python27/1294/ - however, I don't know if it is related. I'll wait for another change set.

Revision history for this message
Ian Cordasco (icordasc) wrote :

The gate has been passing as far as I've seen. I'll wait until tomorrow to mark this as invalid.

Revision history for this message
Pawel Koniszewski (pawel-koniszewski) wrote :

I agree with you Ian, looks that new version of requests (2.6.2) solved this issue.

Thierry Carrez (ttx)
no longer affects: glance/kilo
Revision history for this message
Kamil Rykowski (kamil-rykowski) wrote :

Yup, the check & gate are working stable again. Thanks for fast reaction!

Revision history for this message
Pawel Koniszewski (pawel-koniszewski) wrote :

It is no longer valid so marking as invalid.

Changed in glance:
status: Confirmed → Won't Fix
status: Won't Fix → Invalid
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.