CLI client doesn't check image status before start uploading the file
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:
[======
409 Conflict: Image status transition from active to saving is not allowed (HTTP 409)
Version:
user@ubuntu:
1.2.0
description: | updated |
Changed in python-glanceclient: | |
assignee: | nobody → Kairat Kushaev (kkushaev) |
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.