glance image-create queues an image even though the image isn't specified

Bug #1382288 reported by Pradeep Chandrasekar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
In Progress
Undecided
Jun Hong Li

Bug Description

glance image-create command queues the image even though we don't specify the file using the --file option. It stays in the queued state forever.

#> glance image-create --name "Ubuntu" --disk-format qcow2 --container-format bare

#> glance image-list
ge-list
+-------------------------------------------------------------+---------------------+-----------------+-------------------------+------------+--------+
| ID | Name | Disk Format | Container Format | Size | Status |
+-------------------------------------------------------------+---------------------+-----------------+-------------------------+-------------+--------+
| 34d14f2f-14ef-40df-81d3-1154c176104f | Ubuntu | qcow2 | bare | | queued |
+-------------------------------------------------------------+---------------------+-----------------+-------------------------+-------------+--------+

Jun Hong Li (junhongl)
Changed in glance:
assignee: nobody → Jun Hong Li (junhongl)
Revision history for this message
Jun Hong Li (junhongl) wrote :

Pradeep, what version of glance api endpiont are you using? v1 or v2? I am kind of thinking it is the designed behavior, I will discuss this with others in irc later after you tell me the api version.

Revision history for this message
Pradeep Chandrasekar (pradeepcsekar) wrote :

Jun, v1 APIs are used. If it is intended design, please let us know the reason? The horizon won't let you to create an image without specifying the file though.

Revision history for this message
Jun Hong Li (junhongl) wrote :

Hi Pradeep,

glanceclient will call the create method in glance.api.v1.images.py:

    def create(self, req, image_meta, image_data):
        """
        Adds a new image to Glance. Four scenarios exist when creating an
        image:

......

        4. If the image data is not available yet, but you'd like reserve a
           spot for it, you can omit the data and a record will be created in
           the 'queued' state. This exists primarily to maintain backwards
           compatibility with OpenStack/Rackspace API semantics.

......
        """

Please note bulletin 4, which should be the case you listed here. So I think it works as design.

Jun Hong Li (junhongl)
Changed in glance:
status: New → In Progress
Revision history for this message
Alfred Shen (alfredcs) wrote :

I ran into the same issue on following glance revisions on14.04. Any suggest to resolve this?

glance 1:2015.1.0-0ubuntu1~cloud0
glance-api 1:2015.1.0-0ubuntu1~cloud0
glance-common 1:2015.1.0-0ubuntu1~cloud0
glance-registry 1:2015.1.0-0ubuntu1~cloud0
python-glance 1:2015.1.0-0ubuntu1~cloud0
python-glance-store 0.4.0-0ubuntu1~cloud0
python-glanceclient 1:0.15.0-0ubuntu1~cloud0

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.