RemoteFS driver should initialize shares variables

Bug #1239741 reported by Eric Harney on 2013-10-14
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Undecided
Eric Harney

Bug Description

RemoteFS driver's code volume mounting code (_ensure_shares_mounted) assumes that self.shares and self._mounted_shares exist, but they are not initialized in __init__. Instead, it is currently required that subclasses initialize these variables.

They should be initialized to None in __init__ so that they always exist. This fixes pylint warnings to this effect, and also makes it less complicated for anyone working on drivers based on this class.

Changed in cinder:
status: New → In Progress

Reviewed: https://review.openstack.org/49413
Committed: http://github.com/openstack/cinder/commit/7e37cd80fe12eabaafba5c5c1c8f35413f193e37
Submitter: Jenkins
Branch: master

commit 7e37cd80fe12eabaafba5c5c1c8f35413f193e37
Author: Eric Harney <email address hidden>
Date: Wed Oct 2 14:11:31 2013 -0400

    Initialize shares variables for RemoteFsDriver(s)

    self.shares and self._mounted_shares are used by various methods
    for RemoteFs-based drivers, but may not be instantiated early enough.

    Initialize them in __init__ to ensure they always exist. (Also fixes
    pylint warnings.)

    Closes-Bug: #1239741
    Change-Id: I0ef884c28b82b7f694cf8a0fb4629c835da11c91

Changed in cinder:
status: In Progress → Fix Committed
Thierry Carrez (ttx) on 2013-12-04
Changed in cinder:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx) on 2014-04-17
Changed in cinder:
milestone: icehouse-1 → 2014.1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers