The cinder.volume.drivers.solidfire Module

class SolidFireDriver(*args, **kwargs)

Bases: cinder.volume.drivers.san.san.SanISCSIDriver

OpenStack driver to enable SolidFire cluster.

Version history:
1.0 - Initial driver 1.1 - Refactor, clone support, qos by type and minor bug fixes 1.2 - Add xfr and retype support 1.2.1 - Add export/import support 1.2.2 - Catch VolumeNotFound on accept xfr 2.0.0 - Move from httplib to requests 2.0.1 - Implement SolidFire Snapshots 2.0.2 - Implement secondary account 2.0.2.a - Backport lock decorator for SolidFire clone_image
VERSION = '2.0.2.a'
accept_transfer(context, volume, new_user, new_project)
attach_volume(context, volume, instance_uuid, host_name, mountpoint)
clone_image(inst, *args, **kwargs)
cluster_stats = {}
create_cgsnapshot(ctxt, cgsnapshot, snapshots)
create_cloned_volume(volume, src_vref)

Create a clone of an existing volume.

create_consistencygroup(ctxt, group)
create_consistencygroup_from_src(ctxt, group, volumes, cgsnapshot, snapshots, source_cg, source_vols)
create_snapshot(snapshot)
create_volume(volume)

Create volume on SolidFire device.

The account is where CHAP settings are derived from, volume is created and exported. Note that the new volume is immediately ready for use.

One caveat here is that an existing user account must be specified in the API call to create a new volume. We use a set algorithm to determine account info based on passed in cinder volume object. First we check to see if the account already exists (and use it), or if it does not already exist, we’ll go ahead and create it.

create_volume_from_snapshot(volume, snapshot)

Create a volume from the specified snapshot.

delete_cgsnapshot(ctxt, cgsnapshot, snapshots)
delete_consistencygroup(ctxt, group, volumes)
delete_snapshot(snapshot)

Delete the specified snapshot from the SolidFire cluster.

delete_volume(volume)

Delete SolidFire Volume from device.

SolidFire allows multiple volumes with same name, volumeID is what’s guaranteed unique.

detach_volume(context, volume, attachment=None)
driver_prefix = 'solidfire'
extend_volume(volume, new_size)

Extend an existing volume.

get_volume_stats(refresh=False)

Get volume status.

If ‘refresh’ is True, run update first. The name is a bit misleading as the majority of the data here is cluster data

initialize_connection(volume, connector, initiator_data=None)

Initialize the connection and return connection info.

Optionally checks and utilizes volume access groups.

locked_image_id_operation(f, external=False)
manage_existing(volume, external_ref)

Manages an existing SolidFire Volume (import to Cinder).

Renames the Volume to match the expected name for the volume. Also need to consider things like QoS, Emulation, account/tenant.

manage_existing_get_size(volume, external_ref)

Return size of an existing LV for manage_existing.

existing_ref is a dictionary of the form: {‘name’: <name of existing volume on SF Cluster>}

retry_exc_tuple = (<class 'cinder.exception.SolidFireRetryableException'>, <class 'requests.exceptions.ConnectionError'>)
retryable_errors = ['xDBVersionMismatch', 'xMaxSnapshotsPerVolumeExceeded', 'xMaxClonesPerVolumeExceeded', 'xMaxSnapshotsPerNodeExceeded', 'xMaxClonesPerNodeExceeded', 'xSliceNotRegistered', 'xNotReadyForIO']
retype(ctxt, volume, new_type, diff, host)

Convert the volume to be of the new type.

Returns a boolean indicating whether the retype occurred.

Parameters:
  • ctxt – Context
  • volume – A dictionary describing the volume to migrate
  • new_type – A dictionary describing the volume type to convert to
  • diff – A dictionary with the difference between the two types
  • host – A dictionary describing the host to migrate to, where host[‘host’] is its name, and host[‘capabilities’] is a dictionary of its reported capabilities (Not Used).
sf_qos_dict = {'performant': {'burstIOPS': 4000, 'minIOPS': 2000, 'maxIOPS': 4000}, 'medium': {'burstIOPS': 400, 'minIOPS': 200, 'maxIOPS': 400}, 'slow': {'burstIOPS': 200, 'minIOPS': 100, 'maxIOPS': 200}, 'off': None, 'fast': {'burstIOPS': 1000, 'minIOPS': 500, 'maxIOPS': 1000}}
sf_qos_keys = ['minIOPS', 'maxIOPS', 'burstIOPS']
terminate_connection(volume, properties, force)
unmanage(volume)

Mark SolidFire Volume as unmanaged (export from Cinder).

update_consistencygroup(context, group, add_volumes=None, remove_volumes=None)
update_provider_info(vrefs, snaprefs)
class SolidFireISCSI(*args, **kwargs)

Bases: cinder.volume.targets.iscsi.SanISCSITarget

create_export(context, volume, volume_path)
ensure_export(context, volume, volume_path)
remove_export(context, volume)
terminate_connection(volume, connector, **kwargs)
retry(exc_tuple, tries=5, delay=1, backoff=2)

Previous topic

The cinder.volume.drivers.smbfs Module

Next topic

The cinder.volume.drivers.tegile Module

Project Source

This Page