Merge "3PAR add entry point debug tracing"

This commit is contained in:
Jenkins 2016-08-12 21:47:06 +00:00 committed by Gerrit Code Review
commit 8da1781c18
2 changed files with 61 additions and 2 deletions

View File

@ -40,6 +40,7 @@ from oslo_utils.excutils import save_and_reraise_exception
from cinder import exception
from cinder.i18n import _, _LI, _LW, _LE
from cinder import interface
from cinder import utils
from cinder.volume import driver
from cinder.volume.drivers.hpe import hpe_3par_common as hpecommon
from cinder.volume.drivers.san import san
@ -111,10 +112,11 @@ class HPE3PARFCDriver(driver.TransferVD,
host sees. bug #1577993
3.0.9 - Handling HTTP conflict 409, host WWN/iSCSI name already used
by another host, while creating 3PAR FC Host. bug #1597454
3.0.10 - Added Entry point tracing
"""
VERSION = "3.0.9"
VERSION = "3.0.10"
# The name of the CI wiki page.
CI_WIKI_NAME = "HPE_Storage_CI"
@ -188,6 +190,7 @@ class HPE3PARFCDriver(driver.TransferVD,
"""Setup errors are already checked for in do_setup so return pass."""
pass
@utils.trace
def create_volume(self, volume):
common = self._login()
try:
@ -195,6 +198,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def create_cloned_volume(self, volume, src_vref):
common = self._login()
try:
@ -202,6 +206,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def delete_volume(self, volume):
common = self._login()
try:
@ -209,6 +214,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def create_volume_from_snapshot(self, volume, snapshot):
"""Create a volume from a snapshot.
@ -220,6 +226,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def create_snapshot(self, snapshot):
common = self._login()
try:
@ -227,6 +234,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def delete_snapshot(self, snapshot):
common = self._login()
try:
@ -234,6 +242,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
@fczm_utils.AddFCZone
def initialize_connection(self, volume, connector):
"""Assigns the volume to a server.
@ -356,6 +365,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
@fczm_utils.RemoveFCZone
def terminate_connection(self, volume, connector, **kwargs):
"""Driver entry point to unattach a volume from an instance."""
@ -540,6 +550,7 @@ class HPE3PARFCDriver(driver.TransferVD,
def remove_export(self, context, volume):
pass
@utils.trace
def extend_volume(self, volume, new_size):
common = self._login()
try:
@ -547,6 +558,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def create_consistencygroup(self, context, group):
common = self._login()
try:
@ -554,6 +566,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def create_consistencygroup_from_src(self, context, group, volumes,
cgsnapshot=None, snapshots=None,
source_cg=None, source_vols=None):
@ -565,6 +578,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def delete_consistencygroup(self, context, group, volumes):
common = self._login()
try:
@ -572,6 +586,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def update_consistencygroup(self, context, group,
add_volumes=None, remove_volumes=None):
common = self._login()
@ -581,6 +596,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def create_cgsnapshot(self, context, cgsnapshot, snapshots):
common = self._login()
try:
@ -588,6 +604,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def delete_cgsnapshot(self, context, cgsnapshot, snapshots):
common = self._login()
try:
@ -595,6 +612,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def manage_existing(self, volume, existing_ref):
common = self._login()
try:
@ -602,6 +620,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def manage_existing_snapshot(self, snapshot, existing_ref):
common = self._login()
try:
@ -609,6 +628,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def manage_existing_get_size(self, volume, existing_ref):
common = self._login()
try:
@ -616,6 +636,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def manage_existing_snapshot_get_size(self, snapshot, existing_ref):
common = self._login()
try:
@ -624,6 +645,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def unmanage(self, volume):
common = self._login()
try:
@ -631,6 +653,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def unmanage_snapshot(self, snapshot):
common = self._login()
try:
@ -638,6 +661,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def retype(self, context, volume, new_type, diff, host):
"""Convert the volume to be of the new type."""
common = self._login()
@ -646,6 +670,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def migrate_volume(self, context, volume, host):
if volume['status'] == 'in-use':
protocol = host['capabilities']['storage_protocol']
@ -660,6 +685,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def update_migrated_volume(self, context, volume, new_volume,
original_volume_status):
"""Update the name of the migrated volume to it's new ID."""
@ -670,6 +696,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def get_pool(self, volume):
common = self._login()
try:
@ -681,6 +708,7 @@ class HPE3PARFCDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def failover_host(self, context, volumes, secondary_id=None):
"""Force failover to a secondary replication target."""
common = self._login(timeout=30)

View File

@ -40,6 +40,7 @@ from oslo_log import log as logging
from cinder import exception
from cinder.i18n import _, _LE, _LW
from cinder import interface
from cinder import utils
from cinder.volume import driver
from cinder.volume.drivers.hpe import hpe_3par_common as hpecommon
from cinder.volume.drivers.san import san
@ -117,10 +118,11 @@ class HPE3PARISCSIDriver(driver.TransferVD,
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
"""
VERSION = "3.0.11"
VERSION = "3.0.12"
# The name of the CI wiki page.
CI_WIKI_NAME = "HPE_Storage_CI"
@ -167,6 +169,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
'san_password']
common.check_flags(self.configuration, required_flags)
@utils.trace
def get_volume_stats(self, refresh=False):
common = self._login()
try:
@ -260,6 +263,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
"""Setup errors are already checked for in do_setup so return pass."""
pass
@utils.trace
def create_volume(self, volume):
common = self._login()
try:
@ -267,6 +271,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def create_cloned_volume(self, volume, src_vref):
"""Clone an existing volume."""
common = self._login()
@ -275,6 +280,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def delete_volume(self, volume):
common = self._login()
try:
@ -282,6 +288,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def create_volume_from_snapshot(self, volume, snapshot):
"""Creates a volume from a snapshot.
@ -293,6 +300,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def create_snapshot(self, snapshot):
common = self._login()
try:
@ -300,6 +308,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def delete_snapshot(self, snapshot):
common = self._login()
try:
@ -307,6 +316,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def initialize_connection(self, volume, connector):
"""Assigns the volume to a server.
@ -463,6 +473,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def terminate_connection(self, volume, connector, **kwargs):
"""Driver entry point to unattach a volume from an instance."""
common = self._login()
@ -668,6 +679,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
return model_update
@utils.trace
def create_export(self, context, volume, connector):
common = self._login()
try:
@ -675,6 +687,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def ensure_export(self, context, volume):
"""Ensure the volume still exists on the 3PAR.
@ -782,6 +795,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
return current_least_used_nsp
@utils.trace
def extend_volume(self, volume, new_size):
common = self._login()
try:
@ -789,6 +803,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def create_consistencygroup(self, context, group):
common = self._login()
try:
@ -796,6 +811,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def create_consistencygroup_from_src(self, context, group, volumes,
cgsnapshot=None, snapshots=None,
source_cg=None, source_vols=None):
@ -807,6 +823,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def delete_consistencygroup(self, context, group, volumes):
common = self._login()
try:
@ -814,6 +831,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def update_consistencygroup(self, context, group,
add_volumes=None, remove_volumes=None):
common = self._login()
@ -823,6 +841,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def create_cgsnapshot(self, context, cgsnapshot, snapshots):
common = self._login()
try:
@ -830,6 +849,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def delete_cgsnapshot(self, context, cgsnapshot, snapshots):
common = self._login()
try:
@ -837,6 +857,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def manage_existing(self, volume, existing_ref):
common = self._login()
try:
@ -844,6 +865,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def manage_existing_snapshot(self, snapshot, existing_ref):
common = self._login()
try:
@ -851,6 +873,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def manage_existing_get_size(self, volume, existing_ref):
common = self._login()
try:
@ -858,6 +881,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def manage_existing_snapshot_get_size(self, snapshot, existing_ref):
common = self._login()
try:
@ -866,6 +890,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def unmanage(self, volume):
common = self._login()
try:
@ -873,6 +898,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def unmanage_snapshot(self, snapshot):
common = self._login()
try:
@ -880,6 +906,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def retype(self, context, volume, new_type, diff, host):
"""Convert the volume to be of the new type."""
common = self._login()
@ -888,6 +915,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def migrate_volume(self, context, volume, host):
if volume['status'] == 'in-use':
protocol = host['capabilities']['storage_protocol']
@ -902,6 +930,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def update_migrated_volume(self, context, volume, new_volume,
original_volume_status):
"""Update the name of the migrated volume to it's new ID."""
@ -912,6 +941,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def get_pool(self, volume):
common = self._login()
try:
@ -923,6 +953,7 @@ class HPE3PARISCSIDriver(driver.TransferVD,
finally:
self._logout(common)
@utils.trace
def failover_host(self, context, volumes, secondary_id=None):
"""Force failover to a secondary replication target."""
common = self._login(timeout=30)