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

Bug #1540879 reported by Alexey Galkin
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Mirantis OpenStack
Invalid
Medium
MOS Glance
9.x
Invalid
Medium
MOS Glance

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:
  feature_groups:
    - mirantis
  production: "docker"
  release: "8.0"
  api: "1.0"
  build_number: "507"
  build_id: "507"
  fuel-nailgun_sha: "8e954abd70ef0083109f34289de2553dcda544d4"
  python-fuelclient_sha: "4f234669cfe88a9406f4e438b1e1f74f1ef484a5"
  fuel-agent_sha: "658be72c4b42d3e1436b86ac4567ab914bfb451b"
  fuel-nailgun-agent_sha: "b2bb466fd5bd92da614cdbd819d6999c510ebfb1"
  astute_sha: "b81577a5b7857c4be8748492bae1dec2fa89b446"
  fuel-library_sha: "ec7e212972ead554f21b52b9e165156665f659df"
  fuel-ostf_sha: "ab5fd151fc6c1aa0b35bc2023631b1f4836ecd61"
  fuel-mirror_sha: "351d568fa3b3e4dd062054b91d766aa54d379867"
  fuelmenu_sha: "234cb4cbb30fbd2df00f388c28f31606d9cae15f"
  shotgun_sha: "63645dea384a37dde5c01d4f8905566978e5d906"
  network-checker_sha: "a43cf96cd9532f10794dce736350bf5bed350e9d"
  fuel-upgrade_sha: "616a7490ec7199f69759e97e42f9b97dfc87e85b"
  fuelmain_sha: "94507c5e4dad6d8cfbd8f5d41aa8389d5335990a"

upstream-bug: https://bugs.launchpad.net/python-glanceclient/+bug/1540875

Alexey Galkin (agalkin)
Changed in mos:
assignee: nobody → MOS Glance (mos-glance)
Alexey Galkin (agalkin)
description: updated
summary: - [glance] CLI client doesn't check the options before start uploading the
- file
+ [glance] CLI client doesn't check image status before start uploading
+ the file
description: updated
Changed in mos:
milestone: none → 8.0
status: Confirmed → Won't Fix
Revision history for this message
Alexey Galkin (agalkin) wrote :

No longer fixing Low bugs in 8.0, closing as Won't Fix

Revision history for this message
Mike Fedosin (mfedosin) wrote :

I don't like the idea of adding another GET request to glance client when it uploads images. The case when user uploads file to an active image is very rare and it is perfectly processed by glance server.

Changed in mos:
status: Won't Fix → 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.