Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
billsung committed Mar 4, 2019
2 parents 83ec1fb + bc00fb7 commit 8fb862c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 0 additions & 3 deletions infortrend/infortrend_fc_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
from cinder import interface
from cinder.volume import driver
from cinder.volume.drivers.infortrend.raidcmd_cli import common_cli
from cinder.zonemanager import utils as fczm_utils

LOG = logging.getLogger(__name__)

Expand Down Expand Up @@ -146,7 +145,6 @@ def remove_export(self, context, volume):
"""Removes an export for a volume."""
pass

@fczm_utils.add_fc_zone
def initialize_connection(self, volume, connector):
"""Initializes the connection and returns connection information.
Expand Down Expand Up @@ -194,7 +192,6 @@ def initialize_connection(self, volume, connector):
'initiator': connector['initiator']})
return self.common.initialize_connection(volume, connector)

@fczm_utils.remove_fc_zone
def terminate_connection(self, volume, connector, **kwargs):
"""Disallow connection from connector."""
LOG.debug('terminate_connection volume id=%(volume_id)s', {
Expand Down
10 changes: 8 additions & 2 deletions infortrend/raidcmd_cli/common_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,9 +193,10 @@ class InfortrendCommon(object):
2.1.2 - Support for force detach volume
2.1.3 - Add handling for LUN ID conflict for Active/Active cinder
Improve speed for attach/detach/polling commands
2.1.4 - Check CLI connection first for polling process
"""

VERSION = '2.1.3'
VERSION = '2.1.4'

constants = {
'ISCSI_PORT': 3260,
Expand Down Expand Up @@ -1432,6 +1433,9 @@ def get_volume_stats(self, refresh=False):
return self._volume_stats

def _update_volume_stats(self):
# Ensure the CLI is connected.
status = self._check_connection()

# Refresh cache
rc, out = self._execute('InitCache')
if rc != 0:
Expand All @@ -1446,7 +1450,7 @@ def _update_volume_stats(self):
'storage_protocol': self.protocol,
'model_type': self._model_type,
'system_id': system_id,
'status': self._check_connection(),
'status': status,
'pools': self._update_pools_stats(system_id),
}
self._volume_stats = data
Expand Down Expand Up @@ -1696,6 +1700,7 @@ def _initialize_connection_fc(self, volume, connector):
'target_wwn: %(target_wwn)s, '
'initiator_target_map: %(initiator_target_map)s, '
'lun: %(target_lun)s.', properties['data'])
fczm_utils.add_fc_zone(properties)
return properties

@log_func
Expand Down Expand Up @@ -2087,6 +2092,7 @@ def lock_terminate_conn():
'for volume: %(volume_id)s.', {
'volume_id': volume['id']})

fczm_utils.remove_fc_zone(conn_info)
return conn_info
return lock_terminate_conn()

Expand Down

0 comments on commit 8fb862c

Please sign in to comment.