Improper check for implemented driver methods

Bug #1492311 reported by Lucian Petrut
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Fix Released
Undecided
Lucian Petrut

Bug Description

The base ShareDriver "_has_redefined_driver_methods" method checks if a stub method was implemented by comparing it to the super class method.

This can cause issues if those methods are inherited, being actually implemented in the super class, which does not have to be
the base ShareDriver class (for example, we could have common classes, inherited by multiple drivers).

At the moment, this method is used when checking if a driver supports snapshots.

Changed in manila:
assignee: nobody → Lucian Petrut (petrutlucian94)
status: New → In Progress
Changed in manila:
milestone: none → liberty-rc1
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to manila (master)

Reviewed: https://review.openstack.org/220511
Committed: https://git.openstack.org/cgit/openstack/manila/commit/?id=c6c2894821034a4ad87bf2e5e1d2676b84d2d760
Submitter: Jenkins
Branch: master

commit c6c2894821034a4ad87bf2e5e1d2676b84d2d760
Author: Lucian Petrut <email address hidden>
Date: Fri Sep 4 16:33:03 2015 +0300

    Enhance base driver checking if a method was implemented

    The base ShareDriver "_has_redefined_driver_methods" method
    checks if a stub method was implemented by comparing it to the
    super class method.

    This can cause issues if those methods are inherited, being
    actually implemented in the super class, which does not have to be
    the base ShareDriver class (for example, we could have common
    classes, inherited by multiple drivers).

    This patch fixes this by comparing the methods being tested with
    the ones from the ShareDriver class.

    Also, the create_share_from_snapshot method was removed from the
    Huawei driver as it was actually just raising NotImplementedError.
    This was misleading for our way of checking if a driver supports
    snapshotting.

    Closes-Bug: #1492311

    Change-Id: I0369d086234053e5495a35db5034f7344c6c323a

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