download error when the image status is not active

Bug #1472449 reported by Long Quan Sha on 2015-07-08
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Medium
Darja Shakhray
Liberty
Undecided
Unassigned
Glance Client
Medium
Long Quan Sha
Liberty
Undecided
Unassigned

Bug Description

When the locations is blank, downloading image will show python error, but the error message is not correct.

[root@vm134 pe]# glance image-show 9be94a27-367f-4a26-ae7a-045db3cb7332
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | None |
| container_format | None |
| created_at | 2015-07-02T09:09:22Z |
| disk_format | None |
| id | 9be94a27-367f-4a26-ae7a-045db3cb7332 |
| locations | [] |
| min_disk | 0 |
| min_ram | 0 |
| name | test |
| owner | e4b36a5b654942328943a835339a6289 |
| protected | False |
| size | None |
| status | queued |
| tags | [] |
| updated_at | 2015-07-02T09:09:22Z |
| virtual_size | None |
| visibility | private |
+------------------+--------------------------------------+
[root@vm134 pe]# glance image-download 9be94a27-367f-4a26-ae7a-045db3cb7332 --file myimg
iter() returned non-iterator of type 'NoneType'

Long Quan Sha (shalq) on 2015-07-08
Changed in glance:
assignee: nobody → Long Quan Sha (shalq)
Changed in glance:
status: New → In Progress
Long Quan Sha (shalq) on 2015-07-08
summary: - download error when the image locations is blank
+ download error when the image status is not active
Erno Kuvaja (jokke) wrote :

Thanks Long Quan Sha,

I added python-glanceclient into the bug and assigned that to you as that's where your patch is directed to, not glance.

I see two problems here, first you're correct and our client should be able to handle that situation, but foremost our server should not allow downloading image while it's still queued.

Changed in glance:
assignee: Long Quan Sha (shalq) → nobody
Changed in python-glanceclient:
assignee: nobody → Long Quan Sha (shalq)
Changed in glance:
status: In Progress → New
Changed in python-glanceclient:
status: New → In Progress
Changed in glance:
importance: Undecided → Medium
Changed in python-glanceclient:
importance: Undecided → Medium
Changed in glance:
assignee: nobody → dshakhray (dshakhray)

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

Changed in glance:
status: New → In Progress

Reviewed: https://review.openstack.org/228559
Committed: https://git.openstack.org/cgit/openstack/glance/commit/?id=d4d94b290ceb9147dd285822e201dd85ce812ef0
Submitter: Jenkins
Branch: master

commit d4d94b290ceb9147dd285822e201dd85ce812ef0
Author: Darja Shakhray <email address hidden>
Date: Mon Sep 28 21:10:05 2015 +0300

    Fix error when downloading image status is not active

    Added check image_status when downloading image.

    Change-Id: I39d49ea8a828863fdf4d5efc98126a9009e4b098
    Closes-bug: #1472449

Changed in glance:
status: In Progress → Fix Committed
Changed in glance:
status: Fix Committed → Fix Released

Change abandoned by Long Quan Sha (<email address hidden>) on branch: master
Review: https://review.openstack.org/199549

Reviewed: https://review.openstack.org/199549
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=44d0b02c67ce7926f40377d9367a0f61124ed26d
Submitter: Jenkins
Branch: master

commit 44d0b02c67ce7926f40377d9367a0f61124ed26d
Author: Long Quan Sha <email address hidden>
Date: Wed Jul 8 09:29:53 2015 +0800

    Fix the download error when the image locations are blank

    When the image locations are blank, glance client will get a http response
    with no content, glance client should show user no data could be found,
    instead of processing the blank response body that will lead to exception.

    Glance client will also get a 204 response when an image is in a queued
    state (this is true for 'master' and liberty/kilo/juno based servers).

    Closes-Bug: #1472449

    Co-Authored-by: Stuart McLaren <email address hidden>
    Change-Id: I5d3d02d6aa7c8dd054cd2933e15b4a26e91afea1

Changed in python-glanceclient:
status: In Progress → Fix Released

Change abandoned by Glance Bot (<email address hidden>) on branch: master
Review: https://review.openstack.org/199378

This issue was fixed in the openstack/python-glanceclient 2.0.0 release.

Reviewed: https://review.openstack.org/290499
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=c077858dd6e0cd827af2418e1a05ca1f27937764
Submitter: Jenkins
Branch: stable/liberty

commit c077858dd6e0cd827af2418e1a05ca1f27937764
Author: Long Quan Sha <email address hidden>
Date: Wed Jul 8 09:29:53 2015 +0800

    Fix the download error when the image locations are blank

    When the image locations are blank, glance client will get a http response
    with no content, glance client should show user no data could be found,
    instead of processing the blank response body that will lead to exception.

    Glance client will also get a 204 response when an image is in a queued
    state (this is true for 'master' and liberty/kilo/juno based servers).

    Closes-Bug: #1472449

    Co-Authored-by: Stuart McLaren <email address hidden>
    Change-Id: I5d3d02d6aa7c8dd054cd2933e15b4a26e91afea1
    (cherry picked from commit 44d0b02c67ce7926f40377d9367a0f61124ed26d)

This issue was fixed in the openstack/python-glanceclient 1.1.1 release.

Change abandoned by Matt Riedemann (<email address hidden>) on branch: stable/liberty
Review: https://review.openstack.org/248704

This issue was fixed in the openstack/python-glanceclient 1.1.1 release.

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

Other bug subscribers