CLI client doesn't check image status before start uploading the file

Bug #1540875 reported by Alexey Galkin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance Client
Invalid
Undecided
Kairat Kushaev

Bug Description

CLI client doesn't check image status before start uploading the file in image.

Steps to reproduce:
1. Create a new image (glance image-create --disk-format qcow2 --container-format bare --file image.iso ).
2. Verify that current image have 'active' status.
3. Try to upload a new data in current image (glance image-upload <UPLOADED_IMAGE_ID> --file other_image.iso --progress).

Excepted result:
 Show error message '409 Conflict: Image status transition from active to saving is not allowed (HTTP 409)' before starting upload data.

Actual result:
 Show error message '409 Conflict: Image status transition from active to saving is not allowed (HTTP 409)' after upload data is finishing.

user@ubuntu:~/devstack$ glance image-upload 2372f099-a544-4c18-b7e5-02f92d8264f5 --file image.img --progress
[=============================>] 100%
409 Conflict: Image status transition from active to saving is not allowed (HTTP 409)

Version:
user@ubuntu:~/devstack$ glance --version
1.2.0

Alexey Galkin (agalkin)
description: updated
Changed in python-glanceclient:
assignee: nobody → Kairat Kushaev (kkushaev)
Revision history for this message
Kairat Kushaev (kkushaev) wrote :

I tried to debug the problem.
As expected server validates status transition and it doesn't start upload data in case if incorrect status of the image.
So this check correctly made on server side which is good because we need to have thin client without redundant logic.

Changed in python-glanceclient:
status: New → Invalid
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.