cinder.volume.drivers.hpe.hpe_lefthand_iscsi
Module¶HPE LeftHand SAN ISCSI REST Proxy.
Volume driver for HPE LeftHand Storage array. This driver requires 11.5 or greater firmware on the LeftHand array, using the 2.0 or greater version of the hpelefthandclient.
You will need to install the python hpelefthandclient module. sudo pip install python-lefthandclient
Set the following in the cinder.conf file to enable the LeftHand iSCSI REST Driver along with the required flags:
It also requires the setting of hpelefthand_api_url, hpelefthand_username, hpelefthand_password for credentials to talk to the REST service on the LeftHand array.
HPELeftHandISCSIDriver
(*args, **kwargs)¶Bases: cinder.volume.driver.ISCSIDriver
Executes REST commands relating to HPE/LeftHand SAN ISCSI volumes.
Version history:
1.0.0 - Initial REST iSCSI proxy
1.0.1 - Added support for retype
1.0.2 - Added support for volume migrate
1.0.3 - Fixed bug #1285829, HP LeftHand backend assisted migration
should check for snapshots
1.0.4 - Fixed bug #1285925, LeftHand AO volume create performance
improvement
1.0.5 - Fixed bug #1311350, Live-migration of an instance when
attached to a volume was causing an error.
1.0.6 - Removing locks bug #1395953
1.0.7 - Fixed bug #1353137, Server was not removed from the HP
Lefthand backend after the last volume was detached.
1.0.8 - Fixed bug #1418201, A cloned volume fails to attach.
1.0.9 - Adding support for manage/unmanage.
1.0.10 - Add stats for goodness_function and filter_function
1.0.11 - Add over subscription support
1.0.12 - Adds consistency group support
1.0.13 - Added update_migrated_volume #1493546
1.0.14 - Removed the old CLIQ based driver
2.0.0 - Rebranded HP to HPE
2.0.1 - Remove db access for consistency groups
2.0.2 - Adds v2 managed replication support
2.0.3 - Adds v2 unmanaged replication support
2.0.4 - Add manage/unmanage snapshot support
2.0.5 - Changed minimum client version to be 2.1.0
2.0.6 - Update replication to version 2.1
2.0.7 - Fixed bug #1554746, Create clone volume with new size.
2.0.8 - Add defaults for creating a replication client, bug #1556331
2.0.9 - Fix terminate connection on failover
2.0.10 - Add entry point tracing
2.0.11 - Fix extend volume if larger than snapshot bug #1560654
2.0.12 - add CG capability to generic volume groups.
2.0.13 - Fix cloning operation related to provisioning, bug #1688243
2.0.14 - Fixed bug #1710072, Volume doesn't show expected parameters
after Retype
2.0.15 - Fixed bug #1710098, Managed volume, does not pick up the extra
specs/capabilities of the selected volume type.
CI_WIKI_NAME
= 'HPE_Storage_CI'¶DEFAULT_REMOTE_RETENTION_COUNT
= 5¶DEFAULT_RETENTION_COUNT
= 5¶EXTRA_SPEC_REP_REMOTE_RETENTION_COUNT
= 'replication:remote_retention_count'¶EXTRA_SPEC_REP_RETENTION_COUNT
= 'replication:retention_count'¶EXTRA_SPEC_REP_SYNC_PERIOD
= 'replication:sync_period'¶FAILBACK_VALUE
= 'default'¶MAX_REMOTE_RETENTION_COUNT
= 50¶MAX_RETENTION_COUNT
= 50¶MIN_REP_SYNC_PERIOD
= 1800¶REP_SCHEDULE_SUFFIX
= '_SCHED'¶REP_SNAPSHOT_SUFFIX
= '_SS'¶VERSION
= '2.0.15'¶check_for_setup_error
()¶Checks for incorrect LeftHand API being used on backend.
check_replication_flags
(options, required_flags)¶create_cloned_volume
(volume, src_vref)¶Creates a clone of the specified volume.
If volume_type extra specs includes ‘replication: <is> True’ the driver needs to create a volume replica (secondary) and setup replication between the newly created volume and the secondary volume.
create_export
(context, volume, connector)¶Exports the volume.
Can optionally return a Dictionary of changes to the volume object to be persisted.
create_group
(context, group)¶Creates a group.
create_group_from_src
(context, group, volumes, group_snapshot=None, snapshots=None, source_group=None, source_vols=None)¶Creates a group from a source
create_group_snapshot
(context, group_snapshot, snapshots)¶Creates a group snapshot.
create_snapshot
(snapshot)¶Creates a snapshot.
create_volume
(volume)¶Creates a volume.
create_volume_from_snapshot
(volume, snapshot)¶Creates a volume from a snapshot.
delete_group
(context, group, volumes)¶Deletes a group.
delete_group_snapshot
(context, group_snapshot, snapshots)¶Deletes a group snapshot.
delete_snapshot
(snapshot)¶Deletes a snapshot.
delete_volume
(volume)¶Deletes a volume.
device_stats
= {}¶do_setup
(context)¶Set up LeftHand client.
ensure_export
(context, volume)¶Synchronously recreates an export for a volume.
extend_volume
(volume, new_size)¶Extend the size of an existing volume.
failover_host
(context, volumes, secondary_id=None, groups=None)¶Force failover to a secondary replication target.
get_version_string
()¶get_volume_stats
(refresh=False)¶Gets volume stats.
initialize_connection
(volume, connector)¶Assigns the volume to a server.
Assign any created volume to a compute node/host so that it can be used from that host. HPE VSA requires a volume to be assigned to a server.
manage_existing
(volume, existing_ref)¶Manage an existing LeftHand volume.
existing_ref is a dictionary of the form: {‘source-name’: <name of the virtual volume>}
manage_existing_get_size
(volume, existing_ref)¶Return size of volume to be managed by manage_existing.
existing_ref is a dictionary of the form: {‘source-name’: <name of the virtual volume>}
manage_existing_snapshot
(snapshot, existing_ref)¶Manage an existing LeftHand snapshot.
existing_ref is a dictionary of the form: {‘source-name’: <name of the snapshot>}
manage_existing_snapshot_get_size
(snapshot, existing_ref)¶Return size of volume to be managed by manage_existing.
existing_ref is a dictionary of the form: {‘source-name’: <name of the virtual volume>}
migrate_volume
(ctxt, volume, host)¶Migrate the volume to the specified host.
Backend assisted volume migration will occur if and only if;
Volume re-type is not supported.
Returns a boolean indicating whether the migration occurred, as well as model_update.
Parameters: |
|
---|
remove_export
(context, volume)¶Removes an export for a volume.
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: |
|
---|
terminate_connection
(volume, connector, **kwargs)¶Unassign the volume from the host.
unmanage
(volume)¶Removes the specified volume from Cinder management.
unmanage_snapshot
(snapshot)¶Removes the specified snapshot from Cinder management.
update_group
(context, group, add_volumes=None, remove_volumes=None)¶Updates a group.
Because the backend has no concept of volume grouping, cinder will maintain all volume/group relationships. Because of this functionality, there is no need to make any client calls; instead simply returning out of this function allows cinder to properly add/remove volumes from the group.
update_migrated_volume
(context, volume, new_volume, original_volume_status)¶Rename the new (temp) volume to it’s original name.
This method tries to rename the new volume to it’s original name after the migration has completed.
Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.