The cinder.volume.drivers.hpe.hpe_3par_iscsi Module

Volume driver for HPE 3PAR Storage array. This driver requires 3.1.3 firmware on the 3PAR array, using the 4.x version of the hpe3parclient.

You will need to install the python hpe3parclient. sudo pip install –upgrade “hpe3parclient>=4.0”

Set the following in the cinder.conf file to enable the 3PAR iSCSI Driver along with the required flags:

volume_driver=cinder.volume.drivers.hpe.hpe_3par_iscsi.HPE3PARISCSIDriver

class HPE3PARISCSIDriver(*args, **kwargs)

Bases: cinder.volume.driver.ManageableVD, cinder.volume.driver.ManageableSnapshotsVD, cinder.volume.driver.MigrateVD, cinder.volume.driver.BaseVD

OpenStack iSCSI driver to enable 3PAR storage array.

Version history:

1.0   - Initial driver
1.1   - QoS, extend volume, multiple iscsi ports, remove domain,
        session changes, faster clone, requires 3.1.2 MU2 firmware.
1.2.0 - Updated the use of the hp3parclient to 2.0.0 and refactored
        the drivers to use the new APIs.
1.2.1 - Synchronized extend_volume method.
1.2.2 - Added try/finally around client login/logout.
1.2.3 - log exceptions before raising
1.2.4 - Fixed iSCSI active path bug #1224594
1.2.5 - Added metadata during attach/detach bug #1258033
1.2.6 - Use least-used iscsi n:s:p for iscsi volume attach bug #1269515
        This update now requires 3.1.2 MU3 firmware
1.3.0 - Removed all SSH code.  We rely on the hp3parclient now.
2.0.0 - Update hp3parclient API uses 3.0.x
2.0.2 - Add back-end assisted volume migrate
2.0.3 - Added support for managing/unmanaging of volumes
2.0.4 - Added support for volume retype
2.0.5 - Added CHAP support, requires 3.1.3 MU1 firmware
        and hp3parclient 3.1.0.
2.0.6 - Fixing missing login/logout around attach/detach bug #1367429
2.0.7 - Add support for pools with model update
2.0.8 - Migrate without losing type settings bug #1356608
2.0.9 - Removing locks bug #1381190
2.0.10 - Add call to queryHost instead SSH based findHost #1398206
2.0.11 - Added missing host name during attach fix #1398206
2.0.12 - Removed usage of host name cache #1398914
2.0.13 - Update LOG usage to fix translations.  bug #1384312
2.0.14 - Do not allow a different iSCSI IP (hp3par_iscsi_ips) to be
         used during live-migration.  bug #1423958
2.0.15 - Added support for updated detach_volume attachment.
2.0.16 - Added encrypted property to initialize_connection #1439917
2.0.17 - Python 3 fixes
2.0.18 - Improved VLUN creation and deletion logic. #1469816
2.0.19 - Changed initialize_connection to use getHostVLUNs. #1475064
2.0.20 - Adding changes to support 3PAR iSCSI multipath.
2.0.21 - Adds consistency group support
2.0.22 - Update driver to use ABC metaclasses
2.0.23 - Added update_migrated_volume. bug # 1492023
3.0.0 - Rebranded HP to HPE.
3.0.1 - Python 3 support
3.0.2 - Remove db access for consistency groups
3.0.3 - Fix multipath dictionary key error. bug #1522062
3.0.4 - Adds v2 managed replication support
3.0.5 - Adds v2 unmanaged replication support
3.0.6 - Adding manage/unmanage snapshot support
3.0.7 - Optimize array ID retrieval
3.0.8 - Update replication to version 2.1
3.0.9 - Use same LUN ID for each VLUN path #1551994
3.0.10 - Remove metadata that tracks the instance ID. bug #1572665
3.0.11 - _create_3par_iscsi_host() now accepts iscsi_iqn as list only.
         Bug #1590180
3.0.12 - Added entry point tracing
3.0.13 - Handling HTTP conflict 409, host WWN/iSCSI name already used
        by another host, while creating 3PAR iSCSI Host. bug #1642945
3.0.14-ocata - Get host from os-brick connector. bug #1690244
3.0.15-ocata - Update CHAP on host record when volume is migrated
        to new compute host. bug # 1737181
CI_WIKI_NAME = 'HPE_Storage_CI'
VERSION = '3.0.15-ocata'
check_for_setup_error()

Setup errors are already checked for in do_setup so return pass.

create_cgsnapshot(*args, **kwargs)
create_cloned_volume(*args, **kwargs)

Clone an existing volume.

create_consistencygroup(*args, **kwargs)
create_consistencygroup_from_src(*args, **kwargs)
create_export(*args, **kwargs)
create_snapshot(*args, **kwargs)
create_volume(*args, **kwargs)
create_volume_from_snapshot(*args, **kwargs)

Creates a volume from a snapshot.

TODO: support using the size from the user.

delete_cgsnapshot(*args, **kwargs)
delete_consistencygroup(*args, **kwargs)
delete_snapshot(*args, **kwargs)
delete_volume(*args, **kwargs)
do_setup(context)
ensure_export(*args, **kwargs)

Ensure the volume still exists on the 3PAR.

Also retrieves CHAP credentials, if present on the volume

extend_volume(*args, **kwargs)
failover_host(*args, **kwargs)

Force failover to a secondary replication target.

get_pool(*args, **kwargs)
get_volume_stats(*args, **kwargs)
initialize_connection(*args, **kwargs)

Assigns the volume to a server.

Assign any created volume to a compute node/host so that it can be used from that host.

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

{
    'driver_volume_type': 'iscsi'
    'data': {
        'encrypted': False,
        'target_discovered': True,
        'target_iqn': 'iqn.2010-10.org.openstack:volume-00000001',
        'target_protal': '127.0.0.1:3260',
        'volume_id': 1,
    }
}
Steps to export a volume on 3PAR
  • Get the 3PAR iSCSI iqn
  • Create a host on the 3par
  • create vlun on the 3par
initialize_iscsi_ports(common)
manage_existing(*args, **kwargs)
manage_existing_get_size(*args, **kwargs)
manage_existing_snapshot(*args, **kwargs)
manage_existing_snapshot_get_size(*args, **kwargs)
migrate_volume(*args, **kwargs)
remove_export(context, volume)
retype(*args, **kwargs)

Convert the volume to be of the new type.

terminate_connection(*args, **kwargs)

Driver entry point to unattach a volume from an instance.

unmanage(*args, **kwargs)
unmanage_snapshot(*args, **kwargs)
update_consistencygroup(*args, **kwargs)
update_migrated_volume(*args, **kwargs)

Update the name of the migrated volume to it’s new ID.