CLI fails to report an error after creating a snapshot from instance

Bug #1470047 reported by Liron Kuchlani
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
python-novaclient
Fix Released
Undecided
wangxiyuan

Bug Description

Description of problem:
The CLI fails to declare an error and stuck with "Server snapshotting... 0" when a user tries to save a snapshot of an instance while his quota is too small.

Version-Release number of selected component (if applicable):
python-glanceclient-0.17.0-2.el7ost.noarch
python-glance-2015.1.0-6.el7ost.noarch
python-glance-store-0.4.0-1.el7ost.noarch
openstack-glance-2015.1.0-6.el7ost.noarch
openstack-nova-api-2015.1.0-13.el7ost.noarch

How reproducible:
100%

Steps to Reproduce:
1. Edit /etc/glance/glance-api.conf set user_storage_quota with low space for creating snapshot from instance
2. openstack-service restart glance
3. Create a snapshot from instance via command line: 'nova image-create <instanceName> <snapName> --poll'

Actual results:
The CLI fails to declare an error and stuck with "Server snapshotting... 0"

Expected results:
ERROR should be appeared indicating that quota is too small

Additional info:
log

Revision history for this message
Liron Kuchlani (lkuchlan) wrote :
Revision history for this message
wangxiyuan (wangxiyuan) wrote :

--poll is a novaclient action. So IMO, This bug should fix in python-novaclient.

In novaclient, if image's status is not 'active' or 'error', it will try to get status forever. In your bug's situation, when quota is limited, the snapshoot will be deleted from 'queue' status. Will never satisfy the 'active' or 'error' status.

Or another way to fix it is change the glance behavior, such as: set the image's status to 'error' when quota is limited.

I think the first way is better.Because Nova sent message to Glance via API V1 which will be deprecated soon perhaps.

Changed in glance:
assignee: nobody → wangxiyuan (wangxiyuan)
wangxiyuan (wangxiyuan)
Changed in glance:
assignee: wangxiyuan (wangxiyuan) → nobody
Changed in python-novaclient:
assignee: nobody → wangxiyuan (wangxiyuan)
Changed in python-novaclient:
status: New → In Progress
Revision history for this message
wangxiyuan (wangxiyuan) wrote :

The reason why image been deleted is that Nova didn't pass 'size' parameter to Glance,So it didn't go quota check in Glance.
So I think it can be fixed in Nova.

affects: glance → nova
Changed in nova:
assignee: nobody → wangxiyuan (wangxiyuan)
wangxiyuan (wangxiyuan)
Changed in nova:
assignee: wangxiyuan (wangxiyuan) → nobody
tags: added: quotas snapshot
Changed in nova:
assignee: nobody → Narendra Chanchali (narench809)
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote : Cleanup

@Narendra Chanchali:

Since you are set as assignee, I switch the status to 'In Progress'.

Changed in nova:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to python-novaclient (master)

Reviewed: https://review.openstack.org/197457
Committed: https://git.openstack.org/cgit/openstack/python-novaclient/commit/?id=ba79073d7b6a9f0b8af88dad4a13b80181be0ba6
Submitter: Jenkins
Branch: master

commit ba79073d7b6a9f0b8af88dad4a13b80181be0ba6
Author: wangxiyuan <email address hidden>
Date: Wed Jul 1 15:26:10 2015 +0800

    Add 'deleted' status check in _poll_for_status

    When use command '--poll' to show progress, if the object's staus change
    into 'deleted' for some reason, it will lead a endless loop.Becasue there
    is no check about 'deleted' status.

    For example, when use 'image-create --poll' to create a vm's snapshoot,
    if glance's quota is small than the snapshoot, the image will be deleted.

    Change-Id: I028e3064b3371f87873d74494c39255775a2c818
    Closes-bug:#1470047

Changed in python-novaclient:
status: In Progress → Fix Committed
Changed in python-novaclient:
milestone: none → 2.27.0
status: Fix Committed → Fix Released
Revision history for this message
Markus Zoeller (markus_z) (mzoeller) wrote :

After re-reading the description and comment #5, this is a
python-novaclient only thing. And this got solved. I didn't understand
it correctly in comment #4.

no longer affects: nova
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.