"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "cinder/volume/drivers/solidfire.py" between
cinder-17.0.1.tar.gz and cinder-17.1.0.tar.gz

About: OpenStack Cinder (Core Service: Block Storage) provides persistent block storage to running instances. Its pluggable driver architecture facilitates the creation and management of block storage devices.
The "Victoria" series (latest release).

solidfire.py  (cinder-17.0.1):solidfire.py  (cinder-17.1.0)
skipping to change at line 104 skipping to change at line 104
default=60, default=60,
min=3, min=3,
help='Sets time in seconds to wait for clusters to complete ' help='Sets time in seconds to wait for clusters to complete '
'pairing.'), 'pairing.'),
cfg.IntOpt('sf_volume_pairing_timeout', cfg.IntOpt('sf_volume_pairing_timeout',
default=3600, default=3600,
min=30, min=30,
help='Sets time in seconds to wait for a migrating volume to ' help='Sets time in seconds to wait for a migrating volume to '
'complete pairing and sync.'), 'complete pairing and sync.'),
cfg.IntOpt('sf_api_request_timeout', cfg.IntOpt('sf_api_request_timeout',
default=30, default=30,
min=30, min=30,
help='Sets time in seconds to wait for an api request to ' help='Sets time in seconds to wait for an api request to '
'complete.'), 'complete.'),
cfg.IntOpt('sf_volume_clone_timeout', cfg.IntOpt('sf_volume_clone_timeout',
default=600, default=600,
min=60, min=60,
help='Sets time in seconds to wait for a clone of a volume or ' help='Sets time in seconds to wait for a clone of a volume or '
'snapshot to complete.' 'snapshot to complete.'
)] ),
cfg.IntOpt('sf_volume_create_timeout',
default=60,
min=30,
help='Sets time in seconds to wait for a create volume '
'operation to complete.')]
CONF = cfg.CONF CONF = cfg.CONF
CONF.register_opts(sf_opts, group=configuration.SHARED_CONF_GROUP) CONF.register_opts(sf_opts, group=configuration.SHARED_CONF_GROUP)
# SolidFire API Error Constants # SolidFire API Error Constants
xExceededLimit = 'xExceededLimit' xExceededLimit = 'xExceededLimit'
xAlreadyInVolumeAccessGroup = 'xAlreadyInVolumeAccessGroup' xAlreadyInVolumeAccessGroup = 'xAlreadyInVolumeAccessGroup'
xVolumeAccessGroupIDDoesNotExist = 'xVolumeAccessGroupIDDoesNotExist' xVolumeAccessGroupIDDoesNotExist = 'xVolumeAccessGroupIDDoesNotExist'
xNotInVolumeAccessGroup = 'xNotInVolumeAccessGroup' xNotInVolumeAccessGroup = 'xNotInVolumeAccessGroup'
skipping to change at line 252 skipping to change at line 260
2.0.14 - Fix bug #1782588 qos settings on extend 2.0.14 - Fix bug #1782588 qos settings on extend
2.0.15 - Fix bug #1834013 NetApp SolidFire replication errors 2.0.15 - Fix bug #1834013 NetApp SolidFire replication errors
2.0.16 - Add options for replication mode (Async, Sync and 2.0.16 - Add options for replication mode (Async, Sync and
SnapshotsOnly) SnapshotsOnly)
2.0.17 - Fix bug #1859653 SolidFire fails to failback when volume 2.0.17 - Fix bug #1859653 SolidFire fails to failback when volume
service is restarted service is restarted
2.1.0 - Add Cinder Active/Active support 2.1.0 - Add Cinder Active/Active support
- Enable Active/Active support flag - Enable Active/Active support flag
- Implement Active/Active replication support - Implement Active/Active replication support
2.2.0 - Add storage assisted volume migration support 2.2.0 - Add storage assisted volume migration support
2.2.1 - Fix bug #1891914 fix error on cluster workload rebalancing
by adding xNotPrimary to the retryable exception list
2.2.2 - Fix bug #1896112 SolidFire Driver creates duplicate volume
when API response is lost
""" """
VERSION = '2.2.0' VERSION = '2.2.2'
SUPPORTS_ACTIVE_ACTIVE = True SUPPORTS_ACTIVE_ACTIVE = True
# ThirdPartySystems wiki page # ThirdPartySystems wiki page
CI_WIKI_NAME = "NetApp_SolidFire_CI" CI_WIKI_NAME = "NetApp_SolidFire_CI"
driver_prefix = 'solidfire' driver_prefix = 'solidfire'
sf_qos_dict = {'slow': {'minIOPS': 100, sf_qos_dict = {'slow': {'minIOPS': 100,
'maxIOPS': 200, 'maxIOPS': 200,
skipping to change at line 292 skipping to change at line 304
'burstIOPS': 200000} 'burstIOPS': 200000}
cluster_stats = {} cluster_stats = {}
retry_exc_tuple = (SolidFireRetryableException, retry_exc_tuple = (SolidFireRetryableException,
requests.exceptions.ConnectionError) requests.exceptions.ConnectionError)
retryable_errors = ['xDBVersionMismatch', retryable_errors = ['xDBVersionMismatch',
'xMaxSnapshotsPerVolumeExceeded', 'xMaxSnapshotsPerVolumeExceeded',
'xMaxClonesPerVolumeExceeded', 'xMaxClonesPerVolumeExceeded',
'xMaxSnapshotsPerNodeExceeded', 'xMaxSnapshotsPerNodeExceeded',
'xMaxClonesPerNodeExceeded', 'xMaxClonesPerNodeExceeded',
'xSliceNotRegistered', 'xSliceNotRegistered',
'xNotReadyForIO'] 'xNotReadyForIO',
'xNotPrimary']
def __init__(self, *args, **kwargs): def __init__(self, *args, **kwargs):
super(SolidFireDriver, self).__init__(*args, **kwargs) super(SolidFireDriver, self).__init__(*args, **kwargs)
self.failed_over_id = kwargs.get('active_backend_id', None) self.failed_over_id = kwargs.get('active_backend_id', None)
self.replication_status = kwargs.get('replication_status', "na") self.replication_status = kwargs.get('replication_status', "na")
self.configuration.append_config_values(sf_opts) self.configuration.append_config_values(sf_opts)
self.template_account_id = None self.template_account_id = None
self.max_volumes_per_account = 1990 self.max_volumes_per_account = 1990
self.volume_map = {} self.volume_map = {}
self.cluster_pairs = [] self.cluster_pairs = []
skipping to change at line 990 skipping to change at line 1003
def _update_attributes(self, sf_vol): def _update_attributes(self, sf_vol):
cloned_count = sf_vol['attributes'].get('cloned_count', 0) cloned_count = sf_vol['attributes'].get('cloned_count', 0)
cloned_count += 1 cloned_count += 1
attributes = sf_vol['attributes'] attributes = sf_vol['attributes']
attributes['cloned_count'] = cloned_count attributes['cloned_count'] = cloned_count
params = {'volumeID': int(sf_vol['volumeID'])} params = {'volumeID': int(sf_vol['volumeID'])}
params['attributes'] = attributes params['attributes'] = attributes
return self._issue_api_request('ModifyVolume', params) return self._issue_api_request('ModifyVolume', params)
def _list_volumes_by_name(self, sf_volume_name):
params = {'volumeName': sf_volume_name}
return self._issue_api_request(
'ListVolumes', params, version='8.0')['result']['volumes']
def _wait_volume_is_active(self, sf_volume_name):
def _wait():
volumes = self._list_volumes_by_name(sf_volume_name)
if volumes:
LOG.debug("Found Volume [%s] in SolidFire backend. "
"Current status is [%s].",
sf_volume_name, volumes[0]['status'])
if volumes[0]['status'] == 'active':
raise loopingcall.LoopingCallDone(volumes[0])
try:
timer = loopingcall.FixedIntervalWithTimeoutLoopingCall(
_wait)
sf_volume = (timer.start(
interval=1,
timeout=self.configuration.sf_volume_create_timeout).wait())
return sf_volume
except loopingcall.LoopingCallTimeOut:
msg = ("Timeout while waiting volume [%s] "
"to be in active state." % sf_volume_name)
LOG.error(msg)
raise SolidFireAPIException(msg)
def _do_volume_create(self, sf_account, params, endpoint=None): def _do_volume_create(self, sf_account, params, endpoint=None):
params['accountID'] = sf_account['accountID']
sf_volid = self._issue_api_request( sf_volume_name = params['name']
'CreateVolume', params, endpoint=endpoint)['result']['volumeID'] volumes_found = self._list_volumes_by_name(sf_volume_name)
if volumes_found:
msg = ('Volume name [%s] already exists '
'in SolidFire backend.') % sf_volume_name
LOG.error(msg)
raise DuplicateSfVolumeNames(message=msg)
sf_volid = None
try:
params['accountID'] = sf_account['accountID']
response = self._issue_api_request(
'CreateVolume', params, endpoint=endpoint)
sf_volid = response['result']['volumeID']
except requests.exceptions.ReadTimeout:
LOG.debug("Read Timeout exception caught while creating "
"volume [%s].", sf_volume_name)
# Check if volume was created for the given name,
# in case the backend has processed the request but failed
# to deliver the response before api request timeout.
volume_created = self._wait_volume_is_active(sf_volume_name)
sf_volid = volume_created['volumeID']
return self._get_model_info(sf_account, sf_volid, endpoint=endpoint) return self._get_model_info(sf_account, sf_volid, endpoint=endpoint)
def _do_snapshot_create(self, params): def _do_snapshot_create(self, params):
model_update = {} model_update = {}
snapshot_id = self._issue_api_request( snapshot_id = self._issue_api_request(
'CreateSnapshot', params, version='6.0')['result']['snapshotID'] 'CreateSnapshot', params, version='6.0')['result']['snapshotID']
snaps = self._get_sf_snapshots() snaps = self._get_sf_snapshots()
snap = ( snap = (
next((s for s in snaps if int(s["snapshotID"]) == next((s for s in snaps if int(s["snapshotID"]) ==
int(snapshot_id)), None)) int(snapshot_id)), None))
 End of changes. 8 change blocks. 
6 lines changed or deleted 71 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)