Call of volume_utils.notify_about_snapshot_usage failes

Bug #1390064 reported by Ilya Tyaptin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Ilya Tyaptin

Bug Description

Then we call volume_utils.notify_about_snapshot_usage(context, snapshot, 'update.start') from api failes. It's happens because snapshot in this case is dict, but in cinder.volume.utils._usage_from_snapshot[1] we try to get 'volume' attribute from snapshot.
Exception *** AttributeError: 'dict' object has no attribute 'volume'

[1] - https://github.com/openstack/cinder/blob/master/cinder/volume/utils.py#L83

Ilya Tyaptin (ityaptin)
Changed in cinder:
assignee: nobody → Ilya Tyaptin (ityaptin)
Revision history for this message
John Griffith (john-griffith) wrote :

Hi Ilay,

Would you mind clarifying the bug description here please? I can't seem to determine what the bug is based on your description here. The notify call appears to be correct (for create/delete snap) and I don't see the trace?

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

Reviewed: https://review.openstack.org/133031
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=ad5d20a26628cbd5266645a73b98970934a5e6d2
Submitter: Jenkins
Branch: master

commit ad5d20a26628cbd5266645a73b98970934a5e6d2
Author: Ilya Tyaptin <email address hidden>
Date: Thu Nov 6 16:32:33 2014 +0400

    Fix _usage_from_snapshot in volume.utils

    Now in this function we trying to get snapshot_ref.volume for
    collecting 'availability_zone'. It's invalid because snapshot_ref
    in this function is __dict__. In this patchset there is fix for
    it.

    Change-Id: I4cb86c0efd7520904fdf2288048d07cc40ed3a13
    Closes-bug: #1390064

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx)
Changed in cinder:
milestone: none → kilo-2
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: kilo-2 → 2015.1.0
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.