is_image_sharable in sqlalchemy driver throws AttributeError

Bug #1247481 reported by Alex Meade
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Glance
Fix Released
Medium
Alex Meade

Bug Description

The is_image_sharable function in glance/db/sqlalchemy/api.py makes a reference to the 'member' variable which may not be defined in the case where someone supplies the 'membership' kwarg. This causes an AttributeError to be raised.

Revision history for this message
Alex Meade (alex-meade) wrote :

Turns out the function is copy and pasted to simple db where this bug has already been fixed.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to glance (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to glance (master)

Reviewed: https://review.openstack.org/55052
Committed: http://github.com/openstack/glance/commit/a02ef859a6f7a32d14f2809edc77cb1cb9e957f6
Submitter: Jenkins
Branch: master

commit a02ef859a6f7a32d14f2809edc77cb1cb9e957f6
Author: Alex Meade <email address hidden>
Date: Sat Nov 2 21:43:25 2013 +0000

    Move is_image_sharable to registry api

    When using the membership kwarg in is_image_sharable with the sqlalchemy driver,
    an AttributeError may be raised since the 'member' variable is not always
    defined. This function was copied throughout the db drivers and untested.

    This patch adds tests and moves the function to the v1 registry api, where it
    was the only place being used. Tests for this function in test_context were
    removed as it does not make sense to test this function there and allowed for
    the removal of the membership kwarg.

    Fixes bug 1247481

    Change-Id: Ia77bc0a144831ddcf7e180afdb0842754ff3fcf2

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