The cinder.volume.drivers.dell_emc.vmax.iscsi Module

The cinder.volume.drivers.dell_emc.vmax.iscsi Module

ISCSI Drivers for Dell EMC VMAX arrays based on REST.

class VMAXISCSIDriver(*args, **kwargs)

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

ISCSI Drivers for VMAX using Rest.

Version history:

1.0.0 - Initial driver
1.1.0 - Multiple pools and thick/thin provisioning,
        performance enhancement.
2.0.0 - Add driver requirement functions
2.1.0 - Add consistency group functions
2.1.1 - Fixed issue with mismatched config (bug #1442376)
2.1.2 - Clean up failed clones (bug #1440154)
2.1.3 - Fixed a problem with FAST support (bug #1435069)
2.2.0 - Add manage/unmanage
2.2.1 - Support for SE 8.0.3
2.2.2 - Update Consistency Group
2.2.3 - Pool aware scheduler(multi-pool) support
2.2.4 - Create CG from CG snapshot
2.3.0 - Name change for MV and SG for FAST (bug #1515181)
      - Fix for randomly choosing port group. (bug #1501919)
      - get_short_host_name needs to be called in find_device_number
        (bug #1520635)
      - Proper error handling for invalid SLOs (bug #1512795)
      - Extend Volume for VMAX3, SE8.1.0.3
      https://blueprints.launchpad.net/cinder/+spec/vmax3-extend-volume
      - Incorrect SG selected on an attach (#1515176)
      - Cleanup Zoning (bug #1501938)  NOTE: FC only
      - Last volume in SG fix
      - _remove_last_vol_and_delete_sg is not being called
        for VMAX3 (bug #1520549)
      - necessary updates for CG changes (#1534616)
      - Changing PercentSynced to CopyState (bug #1517103)
      - Getting iscsi ip from port in existing masking view
      - Replacement of EMCGetTargetEndpoints api (bug #1512791)
      - VMAX3 snapvx improvements (bug #1522821)
      - Operations and timeout issues (bug #1538214)
2.4.0 - EMC VMAX - locking SG for concurrent threads (bug #1554634)
      - SnapVX licensing checks for VMAX3 (bug #1587017)
      - VMAX oversubscription Support (blueprint vmax-oversubscription)
      - QoS support (blueprint vmax-qos)
      - VMAX2/VMAX3 iscsi multipath support (iscsi only)
      https://blueprints.launchpad.net/cinder/+spec/vmax-iscsi-multipath
2.5.0 - Attach and detach snapshot (blueprint vmax-attach-snapshot)
      - MVs and SGs not reflecting correct protocol (bug #1640222)
      - Storage assisted volume migration via retype
        (bp vmax-volume-migration)
      - Support for compression on All Flash
      - Volume replication 2.1 (bp add-vmax-replication)
      - rename and restructure driver (bp vmax-rename-dell-emc)
3.0.0 - REST based driver
      - Retype (storage-assisted migration)
      - QoS support
      - Support for compression on All Flash
      - Support for volume replication
      - Support for live migration
      - Support for Generic Volume Group
3.1.0 - Support for replication groups (Tiramisu)
      - Deprecate backend xml configuration
      - Support for async replication (vmax-replication-enhancements)
      - Support for SRDF/Metro (vmax-replication-enhancements)
      - Support for manage/unmanage snapshots
        (vmax-manage-unmanage-snapshot)
      - Support for revert to volume snapshot
backport from 3.2.0
      - Fix for SSL verification/cert application (bug #1772924)
      - Incorrect condition for an empty list (bug #1787219)
      - Deleting snapshot that is source of multiple volumes fails
        (bug #1768047)
      - Block revert to snapshot for replicated volumes (bug #1777871)
      - Fix for get-pools command (bug #1784856)
backport from 3.3.0
      - Fix for initiator retrieval and short hostname unmapping
        (bugs #1783855 #1783867)
CI_WIKI_NAME = 'EMC_VMAX_CI'
VERSION = '3.1.0'
static check_for_export(context, volume_id)

Make sure volume is exported.

Parameters:
  • context – the context
  • volume_id – the volume id
check_for_setup_error()
create_cloned_volume(volume, src_vref)

Creates a cloned volume.

Parameters:
  • volume – the cinder volume object
  • src_vref – the source volume reference
Returns:

provider location dict

create_export(context, volume, connector)

Driver entry point to get the export info for a new volume.

Parameters:
  • context – the context
  • volume – the cinder volume object
  • connector – the connector object
create_group(context, group)

Creates a generic volume group.

Parameters:
  • context – the context
  • group – the group object
Returns:

model_update

create_group_from_src(context, group, volumes, group_snapshot=None, snapshots=None, source_group=None, source_vols=None)

Creates the volume group from source.

Parameters:
  • context – the context
  • group – the consistency group object to be created
  • volumes – volumes in the group
  • group_snapshot – the source volume group snapshot
  • snapshots – snapshots of the source volumes
  • source_group – the dictionary of a volume group as source.
  • source_vols – a list of volume dictionaries in the source_group.
create_group_snapshot(context, group_snapshot, snapshots)

Creates a group snapshot.

Parameters:
  • context – the context
  • group_snapshot – the group snapshot
  • snapshots – snapshots list
create_snapshot(snapshot)

Creates a snapshot.

Parameters:snapshot – the cinder snapshot object
Returns:provider location dict
create_volume(volume)

Creates a VMAX volume.

Parameters:volume – the cinder volume object
Returns:provider location dict
create_volume_from_snapshot(volume, snapshot)

Creates a volume from a snapshot.

Parameters:
  • volume – the cinder volume object
  • snapshot – the cinder snapshot object
Returns:

provider location dict

delete_group(context, group, volumes)

Deletes a generic volume group.

Parameters:
  • context – the context
  • group – the group object
  • volumes – the member volumes
delete_group_snapshot(context, group_snapshot, snapshots)

Deletes a group snapshot.

Parameters:
  • context – the context
  • group_snapshot – the grouop snapshot
  • snapshots – snapshots list
delete_snapshot(snapshot)

Deletes a snapshot.

Parameters:snapshot – the cinder snapshot object
delete_volume(volume)

Deletes a VMAX volume.

Parameters:volume – the cinder volume object
disable_replication(context, group, volumes)

Disable replication for a group.

Parameters:
  • context – the context
  • group – the group object
  • volumes – the list of volumes
Returns:

model_update, None

enable_replication(context, group, volumes)

Enable replication for a group.

Parameters:
  • context – the context
  • group – the group object
  • volumes – the list of volumes
Returns:

model_update, None

ensure_export(context, volume)

Driver entry point to get the export info for an existing volume.

Parameters:
  • context – the context
  • volume – the cinder volume object
extend_volume(volume, new_size)

Extend an existing volume.

Parameters:
  • volume – the cinder volume object
  • new_size – the required new size
failover_host(context, volumes, secondary_id=None, groups=None)

Failover volumes to a secondary host/ backend.

Parameters:
  • context – the context
  • volumes – the list of volumes to be failed over
  • secondary_id – the backend to be failed over to, is ‘default’ if fail back
  • groups – replication groups
Returns:

secondary_id, volume_update_list, group_update_list

failover_replication(context, group, volumes, secondary_backend_id=None)

Failover replication for a group.

Parameters:
  • context – the context
  • group – the group object
  • volumes – the list of volumes
  • secondary_backend_id – the secondary backend id - default None
Returns:

model_update, vol_model_updates

get_iscsi_dict(device_info, volume)

Populate iscsi dict to pass to nova.

Parameters:
  • device_info – device info dict
  • volume – volume object
Returns:

iscsi dict

get_volume_stats(refresh=False)

Get volume stats.

Parameters:refresh – boolean – If True, run update the stats first.
Returns:dict – the stats dict
initialize_connection(volume, connector)

Initializes the connection and returns connection info.

The iscsi driver returns a driver_volume_type of ‘iscsi’. the format of the driver data is defined in smis_get_iscsi_properties. Example return value:

{
    'driver_volume_type': 'iscsi',
    'data': {
        'target_discovered': True,
        'target_iqn': 'iqn.2010-10.org.openstack:volume-00000001',
        'target_portal': '127.0.0.0.1:3260',
        'volume_id': '12345678-1234-4321-1234-123456789012'
    }
}

Example return value (multipath is enabled):

{
    'driver_volume_type': 'iscsi',
    'data': {
        'target_discovered': True,
        'target_iqns': ['iqn.2010-10.org.openstack:volume-00001',
                        'iqn.2010-10.org.openstack:volume-00002'],
        'target_portals': ['127.0.0.1:3260', '127.0.1.1:3260'],
        'target_luns': [1, 1]
    }
}
Parameters:
  • volume – the cinder volume object
  • connector – the connector object
Returns:

dict – the iscsi dict

manage_existing(volume, external_ref)

Manages an existing VMAX 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 VMAX volume to manage_existing.

Parameters:
  • self – reference to class
  • volume – the volume object including the volume_type_id
  • external_ref – reference to the existing volume
Returns:

size of the volume in GB

manage_existing_snapshot(snapshot, existing_ref)

Manage an existing VMAX Snapshot (import to Cinder).

Renames the Snapshot to prefix it with OS- to indicate it is managed by Cinder.

Parameters:
  • snapshot – the snapshot object
  • existing_ref – the snapshot name on the backend VMAX
Returns:

model_update

manage_existing_snapshot_get_size(snapshot, existing_ref)

Return the size of the source volume for manage-existing-snapshot.

Parameters:
  • snapshot – the snapshot object
  • existing_ref – the snapshot name on the backend VMAX
Returns:

size of the source volume in GB

remove_export(context, volume)

Driver entry point to remove an export for a volume.

Parameters:
  • context – the context
  • volume – the cinder volume object
retype(ctxt, volume, new_type, diff, host)

Migrate volume to another host using retype.

Parameters:
  • ctxt – context
  • volume – the volume object including the volume_type_id
  • new_type – the new volume type.
  • diff – difference between old and new volume types. Unused in driver.
  • host – the host dict holding the relevant target(destination) information
Returns:

boolean – True if retype succeeded, False if error

revert_to_snapshot(context, volume, snapshot)

Revert volume to snapshot

Parameters:
  • context – the context
  • volume – the cinder volume object
  • snapshot – the cinder snapshot object
terminate_connection(volume, connector, **kwargs)

Disallow connection from connector.

Parameters:
  • volume – the volume object
  • connector – the connector object
unmanage(volume)

Export VMAX volume from Cinder.

Leave the volume intact on the backend array.

unmanage_snapshot(snapshot)

Export VMAX Snapshot from Cinder.

Leaves the snapshot intact on the backend VMAX.

Parameters:snapshot – the snapshot object
update_group(context, group, add_volumes=None, remove_volumes=None)

Updates LUNs in group.

Parameters:
  • context – the context
  • group – the group object
  • add_volumes – flag for adding volumes
  • remove_volumes – flag for removing volumes
update_volume_stats()

Retrieve stats info from volume group.

vmax_get_iscsi_properties(volume, ip_and_iqn, is_multipath, host_lun_id, metro_ip_iqn, metro_host_lun)

Gets iscsi configuration.

We ideally get saved information in the volume entity, but fall back to discovery if need be. Discovery may be completely removed in future The properties are: :target_discovered: boolean indicating whether discovery was used :target_iqn: the IQN of the iSCSI target :target_portal: the portal of the iSCSI target :target_lun: the lun of the iSCSI target :volume_id: the UUID of the volume :auth_method:, :auth_username:, :auth_password: the authentication details. Right now, either auth_method is not present meaning no authentication, or auth_method == CHAP meaning use CHAP with the specified credentials.

Parameters:
  • volume – the cinder volume object
  • ip_and_iqn – list of ip and iqn dicts
  • is_multipath – flag for multipath
  • host_lun_id – the host lun id of the device
  • metro_ip_iqn – metro remote device ip and iqn, if applicable
  • metro_host_lun – metro remote host lun, if applicable
Returns:

properties

Creative Commons Attribution 3.0 License

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.