RemoteFS driver should initialize shares variables

Bug #1239741 reported by Eric Harney
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Cinder
Fix Released
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
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to cinder (master)

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)
Changed in cinder:
milestone: none → icehouse-1
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in cinder:
milestone: icehouse-1 → 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.