rbd StopIteration Incompatible with py37

Bug #1815335 reported by Attila Fazekas
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
glance_store
Fix Released
Medium
Cyril Roelandt

Bug Description

glance with ceph backed failed during

$ stestr run tempest.api.image.v2.test_images.BasicOperationsImagesTest.test_deactivate_reactivate_image .

https://github.com/openstack/glance_store/blob/db75918208ed8e8f6754cb5377196f781745d533/glance_store/_drivers/rbd.py#L244

Related PEP:
https://www.python.org/dev/peps/pep-0479/

Feb 09 16:30:31 f29-dev-02 glance-api[9702]: 2019-02-09 16:30:31.166 9842 INFO eventlet.wsgi.server [req-883a29ae-b94e-4f84-84a2-0785166c6b24 331d3b4e54b84dec818f60c8811779bf 643c8c215d184bc18c06f8842b3b3ead - >
Feb 09 16:30:31 f29-dev-02 glance-api[9702]: File "/usr/local/lib/python3.7/site-packages/glance_store/_drivers/rbd.py", line 244, in __iter__
Feb 09 16:30:31 f29-dev-02 glance-api[9702]: raise StopIteration()
Feb 09 16:30:31 f29-dev-02 glance-api[9702]: StopIteration
Feb 09 16:30:31 f29-dev-02 glance-api[9702]: The above exception was the direct cause of the following exception:
Feb 09 16:30:31 f29-dev-02 glance-api[9702]: Traceback (most recent call last):
Feb 09 16:30:31 f29-dev-02 glance-api[9702]: File "/usr/local/lib/python3.7/site-packages/eventlet/wsgi.py", line 563, in handle_one_response
Feb 09 16:30:31 f29-dev-02 glance-api[9702]: for data in result:
Feb 09 16:30:31 f29-dev-02 glance-api[9702]: File "/opt/stack/glance/glance/notifier.py", line 403, in _get_chunk_data_iterator
Feb 09 16:30:31 f29-dev-02 glance-api[9702]: for chunk in data:
Feb 09 16:30:31 f29-dev-02 glance-api[9702]: RuntimeError: generator raised StopIteration
Feb 09 16:30:31 f29-dev-02 glance-api[9702]:

Revision history for this message
Cyril Roelandt (cyril-roelandt) wrote :

I proposed a patch: https://review.openstack.org/#/c/636194/

Could you test it and confirm that it fixes your issue?

Changed in glance-store:
assignee: nobody → Cyril Roelandt (cyril-roelandt)
Changed in glance-store:
status: New → Confirmed
importance: Undecided → Medium
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance_store (master)

Reviewed: https://review.openstack.org/636194
Committed: https://git.openstack.org/cgit/openstack/glance_store/commit/?id=d54ee8437fc2d74573229ce21789b6eb4acb4a45
Submitter: Zuul
Branch: master

commit d54ee8437fc2d74573229ce21789b6eb4acb4a45
Author: Cyril Roelandt <email address hidden>
Date: Mon Feb 11 18:56:21 2019 +0100

    Do not raise StopIteration

    The current code will not work in Python3.7 because of PEP479. This
    commit fixes it so that it works with both 3.6 and 3.7.

    [1] https://www.python.org/dev/peps/pep-0479/

    Closes-bug: #1815335
    Change-Id: I6adf23e0569db8655806a07d53c5000f5fd0918f

Changed in glance-store:
status: Confirmed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance_store 0.28.0

This issue was fixed in the openstack/glance_store 0.28.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.