glance add / update / image-create / image-update don't work on Windows
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance Client |
Fix Released
|
High
|
Alessandro Pilotti |
Bug Description
By trying to add an image to Glance on Windows with:
glance image-create --name="Image name" --container-format ovf --disk-format qcow2 --file image.img
or
glance image-create --name="Image name" --container-format ovf --disk-format qcow2 < image.img
the upload will hang if the file contains a byte with value 0x1A (EOF), due to the fact that the file and stdin streams are treated as text and not binary streams.
The same issue applies to "image-update" and the equivalent deprecated "add" and "update" commands.
The fix consists in setting the streams in binary mode in both cases:
File: python-
if 'location' not in fields and 'copy_from' not in fields:
if args.file:
else:
if os.name == 'nt':
Changed in python-glanceclient: | |
assignee: | nobody → Alessandro Pilotti (alexpilotti) |
summary: |
- glance add / image-create doesn't work on Windows + glance add / update / image-create / image-update don't work on Windows |
description: | updated |
Changed in python-glanceclient: | |
status: | In Progress → Fix Committed |
Changed in python-glanceclient: | |
status: | Fix Committed → In Progress |
Changed in python-glanceclient: | |
importance: | Undecided → High |
Changed in python-glanceclient: | |
milestone: | none → v0.6.0 |
Changed in python-glanceclient: | |
status: | Fix Committed → Fix Released |
Fix proposed to branch: master /review. openstack. org/12936
Review: https:/