Unnecessary volume_api.get(context, volume_id) calls

Bug #1489342 reported by Vincent Hou
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
Undecided
Vincent Hou

Bug Description

In methods like def delete(self, req, volume_id, id) in cinder/api/v2/volume_metadata.py, volume_api.get(context, volume_id) is called twice. The first is to get the metadata and the second is to get the volume. This can be combined into one call.

Background: I identified some critical issues and unreasonable code behaviors during my test of volume migration. My initial plan was to fix them in my blueprint of volume migration improvement. However, there is only one week left for the feature acceptance and some of my major patches may not make into master in L release, so I decide to log these issues on by one and get them fixed as soon as possible in L release.
@mtanimo, @jbernard, and @every migration contributor, some of your undergoing patches may cover these issues, but as I claimed above, major feature patches may miss the deadline of L release. Feel free to reach out to me for any migration issues. Thank you for your support.
@Every Cinder contributor, thank you for you understanding.

Vincent Hou (houshengbo)
Changed in cinder:
assignee: nobody → Vincent Hou (houshengbo)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to cinder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/218781

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/218781
Committed: https://git.openstack.org/cgit/openstack/cinder/commit/?id=1d1695838d4291e92043a31893d8cb103a26f627
Submitter: Jenkins
Branch: master

commit 1d1695838d4291e92043a31893d8cb103a26f627
Author: Vincent Hou <email address hidden>
Date: Mon Aug 31 17:23:48 2015 +0800

    Remove the unnecassary volume_api.get(context, volume_id)

    In the method delete from volume_image_metadata, volume_api.get()
    may be called twice. This first time is to get the metadata, and
    the second is to get the volume. We can get both of them at the
    same time.

    Change-Id: I0633c16db21e254ec43bad472748cbc0b7796a24
    Closes-Bug: #1489342

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