command image-update fails when data is not required, stdin is not a tty and stdin is open
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Glance Client |
Won't Fix
|
Low
|
Darja Shakhray |
Bug Description
If stdin is not a tty and stdin is open, glance client will assume that stdin contains data that must be passed to glance. This is not always the case.
Bug #1166263 fixes the case where stdin is not a tty and is closed, however in some scenarios (exerstack testing for example) glance client will run in a situation where stdin is not a tty and is open, but no data should be read.
Steps to reproduce:
1) provide glance with non tty stdin when no data is required, for example renaming an image:
:| glance image-update testing --name testing
Example session:
---------------
root@devstack:
Id: bd0593f4-
Name: testing
root@devstack:
0
root@devstack:
Request returned failure status.
409 Conflict
There was a conflict when trying to complete your request.
Cannot upload to an unqueued image (HTTP 409)
---------------
Changed in python-glanceclient: | |
status: | Fix Committed → Confirmed |
importance: | Undecided → Low |
Changed in python-glanceclient: | |
assignee: | Hugh Saunders (hughsaunders) → dshakhray (dshakhray) |
tags: | added: 1.0.0-potential |
I suggest two modifications py/do_image_ update. Only attempt to read data is status is queued. py/_set_ data_field, dont read if 0.
* check the image status in v1/shell.
* check for available data size in v1/shell.
Will submit a review after testing.