Failure in web-dowload doesn't put the image into error

Bug #1803299 reported by Thomas Herve
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
High
Abhishek Kekane

Bug Description

I tried to do an image import with the web-download method, but I put the wrong URI. In the glance logs I have:

HTTPError: HTTP Error 404: Not Found

The associated task is in failure. But my image isn't:

$ openstack image show b631db79-e542-4c62-86f3-39bf50fec22
...
status | importing
...

It'd be good if the status was synced correctly.

Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :

Hi Thomas,

Can you please add you api logs here?

Thank you!

Revision history for this message
Abhishek Kekane (abhishek-kekane) wrote :

Image doesn't have error state in glance, generally we reset status to queued in case of any error occurs, so in this case also we should reset it to queued state.

Changed in glance:
importance: Undecided → High
assignee: nobody → Abhishek Kekane (abhishek-kekane)
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/618093

Changed in glance:
status: New → In Progress
Revision history for this message
Thomas Herve (therve) wrote :

This is how it looks like:

Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/taskflow/engines/action_engine/executor.py", line 53, in _execute_task
    result = task.execute(**arguments)
  File "/usr/lib/python2.7/site-packages/glance/async_/flows/_internal_plugins/web_download.py", line 103, in execute
    data = script_utils.get_image_data_iter(self.uri)
  File "/usr/lib/python2.7/site-packages/glance/common/scripts/utils.py", line 141, in get_image_data_iter
    return urllib.request.urlopen(uri)
  File "/usr/lib64/python2.7/urllib2.py", line 154, in urlopen
    return opener.open(url, data, timeout)
  File "/usr/lib64/python2.7/urllib2.py", line 437, in open
    response = meth(req, response)
  File "/usr/lib64/python2.7/urllib2.py", line 550, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python2.7/urllib2.py", line 475, in error
    return self._call_chain(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 409, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 558, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
HTTPError: HTTP Error 404: Not Found

tags: added: rocky-backport-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/618093
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=94d3a0a14d574589f8d45c788a6f896cbcc09f41
Submitter: Zuul
Branch: master

commit 94d3a0a14d574589f8d45c788a6f896cbcc09f41
Author: Abhishek Kekane <email address hidden>
Date: Thu Nov 15 07:32:47 2018 +0000

    Failure in web-dowload kept image in importing state

    As of now if import using web-download method fails due to invalid
    uri, image remains in 'importing' state. As the image is in 'importing'
    state it is not of any use to end-user.

    Resetting it to queued state, so that user can try again uploading/importing
    data to the same image.

    Change-Id: Iaa26922a9cf5a419c3da23bdfc347a6fdf6cb549
    Closes-Bug: #1803299

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

Fix proposed to branch: stable/rocky
Review: https://review.openstack.org/643232

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 18.0.0.0rc1

This issue was fixed in the openstack/glance 18.0.0.0rc1 release candidate.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (stable/rocky)

Reviewed: https://review.openstack.org/643232
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=ec2969d9fba8dafb846f5c034f8c8267950f928c
Submitter: Zuul
Branch: stable/rocky

commit ec2969d9fba8dafb846f5c034f8c8267950f928c
Author: Abhishek Kekane <email address hidden>
Date: Thu Nov 15 07:32:47 2018 +0000

    Failure in web-dowload kept image in importing state

    As of now if import using web-download method fails due to invalid
    uri, image remains in 'importing' state. As the image is in 'importing'
    state it is not of any use to end-user.

    Resetting it to queued state, so that user can try again uploading/importing
    data to the same image.

    Conflicts:
        glance/tests/unit/async/flows/test_web_download.py

    Change-Id: Iaa26922a9cf5a419c3da23bdfc347a6fdf6cb549
    Closes-Bug: #1803299
    (cherry picked from commit 94d3a0a14d574589f8d45c788a6f896cbcc09f41)

tags: added: in-stable-rocky
Erno Kuvaja (jokke)
Changed in glance:
milestone: none → stein-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/glance 17.0.1

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