glance image-create doesn't work with stdin

Bug #1402746 reported by cristi1979
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Fix Released
Medium
Louis Taylor

Bug Description

trying to import an image from stind results in the following error:

time glance image-create --progress --name="icmprec" --is-public=true --container-format=bare --disk-format=raw < <(zcat icmprec_backup-2014-12-12_snap.qcow2.gz)
float() argument must be a string or a number

zcat icmprec_backup-2014-12-12_snap.qcow2.gz | glance image-create --progress --name="icmprec" --is-public=true --container-format=bare --disk-format=raw
float() argument must be a string or a number

Version: icehouse

Revision history for this message
Louis Taylor (kragniz) wrote :

This works if you omit the --progress option. I initially thought this was a duplicate of another --progress bug [0], but the underlying problem appears to be separate.

[0] https://bugs.launchpad.net/python-glanceclient/+bug/1384664

Changed in glance:
status: New → Confirmed
importance: Undecided → Medium
affects: glance → python-glanceclient
Revision history for this message
Louis Taylor (kragniz) wrote :
Changed in python-glanceclient:
status: Confirmed → In Progress
assignee: nobody → Louis Taylor (kragniz)
Louis Taylor (kragniz)
Changed in python-glanceclient:
milestone: none → v0.16.0
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-glanceclient (master)

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

commit 90543244423692cade8673cf78fa601c9af04f1c
Author: Louis Taylor <email address hidden>
Date: Tue Dec 16 17:59:28 2014 +0000

    Disable progress bar if image is piped into client

    Previously, running:

        cat something.img | glance image-create --progress --container-format=bare --disk-format=raw

    or

        cat something.img | glance --os-image-api-version 2 image-upload --progress <image id>

    would result in an error. This error was caused by the length of the
    input being unknown, so the overall progress cannot be found.

    This patch disables the progress bar whenever the size of the input file
    cannot be determined.

    Change-Id: I6bfef7441864b638194126880241cc2c96d5b18b
    Closes-Bug: #1402746

Changed in python-glanceclient:
status: In Progress → Fix Committed
Changed in python-glanceclient:
status: Fix Committed → Fix Released
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.