Generic driver uses deprecated model attrs

Bug #1510507 reported by Valeriy Ponomaryov
18
This bug affects 5 people
Affects Status Importance Assigned to Milestone
OpenStack Shared File Systems Service (Manila)
Invalid
Low
Unassigned

Bug Description

Generic driver uses deprecated model attrs that were ported to share instances models.

Example of warning message:

2015-10-27 13:45:12.268 WARNING manila.db.sqlalchemy.models [req-8b3790f0-e016-48d8-8119-093e1cbb72b7 d580835113c24ac08d6ed5c81964d987 fc9f2851e5664e5f8e54be12937505ef] Property 'share_server_id' is deprecated. Please use appropriate property from share instance.

Tags: driver generic
affects: python-cinderclient → python-manilaclient
tags: added: driver generic
affects: python-manilaclient → manila
Changed in manila:
assignee: nobody → Shinobu Kinjo (shinobu-kj)
Matt Riedemann (mriedem)
Changed in manila:
assignee: Shinobu Kinjo (shinobu-kj) → Matt Riedemann (mriedem)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to manila (master)

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

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

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

commit fa0ec89b5ef84a7bc9936d95d958bf3773f8ca54
Author: Matt Riedemann <email address hidden>
Date: Mon Feb 15 14:39:33 2016 -0800

    Cleanup deprecation warnings from using share proxy properties in API

    The API code emits a ton of deprecation warnings from the view builder
    code using deprecated properties on the share DB object which proxies
    to the share instance, so this changes the code to use the share.instance
    property instead.

    Note that since the tests are mocking out the share as a dict in a lot of
    places, we have to handle accessing the instance as a dict entry rather
    than an attribute on a sqlalchemy object. Because of this, the wrapper
    class in the stubs module needed to be updated to actually work like a
    dict container. This is done by extending the abstract base class
    collections.Mapping and overriding the update method. Now the runtime
    code can access attributes on the share like a dict (which old tests are
    still using outside of the stubs module) or an attribute like would be
    the case with the sqlalchemy object.

    Partial-Bug: #1510507

    Change-Id: I114b67dfeef0f46022230f91c6807a69ea9175a2

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit b51a6b8460a5c9b328c3d5135d8e7efd43bb0daf
Author: Matt Riedemann <email address hidden>
Date: Wed Feb 17 17:31:03 2016 -0800

    Get host from share['instance'] in share RPC API

    share['host'] is deprecated. This change updates the share RPC API
    to get the host from the share['instance'] property.

    Change-Id: I023517e65dd689d3ea0cb63aa72da100fccec1e8
    Partial-Bug: #1510507

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit 312b55168e433d07c19c4a1596e07dd69757dd1d
Author: Matt Riedemann <email address hidden>
Date: Tue Jan 26 07:13:26 2016 -0800

    Remove deprecated share attribute usage from manila.share.api

    This scrubs the deprecated share attribute usage from the
    manila.share.api module.

    Apparently there are no unit test changes needed for this (yay!).

    Change-Id: I8dfabb4a75baddf3842c03f9e9cb6b8fe2524fb6
    Partial-Bug: #1510507

Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

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

commit 38bbc675a2c4336d8ed92429f838035bbf7887b7
Author: Matt Riedemann <email address hidden>
Date: Thu Jan 28 04:22:01 2016 -0800

    Stop proxying share_server_id through share in share.manager

    There are a handful of places where share_server_id was retrieved
    through the deprecated attribute on the share DB model object. This
    goes directly to the share instance to get the attribute value
    instead to avoid the deprecation warnings.

    Apparently no tests required updates.

    Change-Id: Id920b22fb43ee7746c8c5bfb0a1145cd92e12be8
    Partial-Bug: #1510507

Changed in manila:
milestone: none → newton-1
Changed in manila:
importance: Undecided → Low
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on manila (master)

Change abandoned by Matt Riedemann (<email address hidden>) on branch: master
Review: https://review.openstack.org/260212

Matt Riedemann (mriedem)
Changed in manila:
status: In Progress → Confirmed
assignee: Matt Riedemann (mriedem) → nobody
yankee (yankeefu)
Changed in manila:
assignee: nobody → yankee (yankeefu)
status: Confirmed → In Progress
assignee: yankee (yankeefu) → nobody
status: In Progress → Confirmed
Revision history for this message
Tom Barron (tpb) wrote :

This is fixed with the fix for https://bugs.launchpad.net/manila/+bug/1776947

Revision history for this message
Tom Barron (tpb) wrote :

And it's not really a driver-specific issue.

Changed in manila:
status: Confirmed → Fix Committed
milestone: newton-1 → none
Revision history for this message
Jason Grosso (jgrosso) wrote :

closing defect since it was fixed in https://bugs.launchpad.net/manila/+bug/1776947

Changed in manila:
status: Fix Committed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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