Corrupt image download

Bug #1488914 reported by Stuart McLaren
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
High
Erno Kuvaja

Bug Description

The logic to try to automatically switch from v2 to v1 has introduced a bug which corrupts the image download.

$ echo hello | glance image-create --disk-format raw --container-format bare --name image1
WARNING: The client is falling back to v1 because the accessing to v2 failed. This behavior will be removed in future versions
+------------------+--------------------------------------+
| Property | Value |
+------------------+--------------------------------------+
| checksum | b1946ac92492d2347c6235b4d2611184 |
| container_format | bare |
| created_at | 2015-08-26T10:47:22.000000 |
| deleted | False |
| deleted_at | None |
| disk_format | raw |
| id | 8ec57fee-31fb-4e91-9fc9-d4f671c5b1e8 |
| is_public | False |
| min_disk | 0 |
| min_ram | 0 |
| name | image1 |
| owner | 411423405e10431fb9c47ac5b2446557 |
| protected | False |
| size | 6 |
| status | active |
| updated_at | 2015-08-26T10:47:22.000000 |
| virtual_size | None |
+------------------+--------------------------------------+

$ glance image-download 8ec57fee-31fb-4e91-9fc9-d4f671c5b1e8 > /tmp/image

$ md5sum /tmp/image
0f3ba957fea840db39ca4aa109628556 /tmp/image

$ cat /tmp/image
WARNING: The client is falling back to v1 because the accessing to v2 failed. This behavior will be removed in future versions
hello

Erno Kuvaja (jokke)
Changed in python-glanceclient:
assignee: nobody → Erno Kuvaja (jokke)
Changed in python-glanceclient:
status: New → In Progress
Louis Taylor (kragniz)
Changed in python-glanceclient:
importance: Undecided → High
Revision history for this message
Stuart McLaren (stuart-mclaren) wrote :

kragniz lives!

tags: added: 1.0.0-potential
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

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

commit f6712f5d333ed3c525450ae91a606fa444e5bae4
Author: Erno Kuvaja <email address hidden>
Date: Wed Aug 26 10:57:30 2015 +0000

    Print the reverting back to v1 to stderr

    Printing to stderr to fix the download issue.

    Change-Id: I2916bb100ac451378db82291855078f2b37466bd
    Closes-Bug: #1488914

Changed in python-glanceclient:
status: In Progress → Fix Committed
Revision history for this message
Erno Kuvaja (jokke) wrote :

Flavio,

No, these two bugs are noty duplicates, they are very much different issue.

Changed in python-glanceclient:
milestone: none → 1.1.0
status: Fix Committed → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on python-glanceclient (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

Reviewed: https://review.openstack.org/218845
Committed: https://git.openstack.org/cgit/openstack/python-glanceclient/commit/?id=7ed22a91d3a587c8e0af2072a421812d176753f4
Submitter: Jenkins
Branch: master

commit 7ed22a91d3a587c8e0af2072a421812d176753f4
Author: Stuart McLaren <email address hidden>
Date: Mon Aug 31 10:29:03 2015 +0000

    image-download: tests to catch stray output

    Add unit tests to ensure that any stray output (eg print
    statements) during image-download cause a test failure.

    Regression test for bug 1488914.

    Change-Id: Ic19ba5693d059bf7c283702e7c333672a878a1a1
    Partial-bug: 1488914

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.