Merge "DEMC: Add support for trim/discard" into stable/yoga
This commit is contained in:
commit
2106da4055
|
@ -108,6 +108,7 @@ class PowerMaxFCTest(test.TestCase):
|
|||
'data': {'target_lun': self.data.fc_device_info['hostlunid'],
|
||||
'target_discovered': True,
|
||||
'target_wwn': [],
|
||||
'discard': True,
|
||||
'initiator_target_map': {}}}
|
||||
data = self.driver.populate_data(self.data.fc_device_info,
|
||||
self.data.test_volume,
|
||||
|
|
|
@ -155,6 +155,7 @@ class PowerMaxISCSITest(test.TestCase):
|
|||
'target_iqn': ip_and_iqn[0]['iqn'].split(',')[0],
|
||||
'target_portal': ip_and_iqn[0]['ip'] + ':3260',
|
||||
'target_lun': host_lun_id,
|
||||
'discard': True,
|
||||
'volume_id': self.data.test_volume.id}
|
||||
iscsi_properties = self.driver.vmax_get_iscsi_properties(
|
||||
self.data.array, vol, ip_and_iqn, True, host_lun_id, [], None)
|
||||
|
@ -271,6 +272,7 @@ class PowerMaxISCSITest(test.TestCase):
|
|||
'target_iqn': ip_and_iqn[0]['iqn'].split(',')[0],
|
||||
'target_portal': ip_and_iqn[0]['ip'] + ':3260',
|
||||
'target_lun': host_lun_id,
|
||||
'discard': True,
|
||||
'volume_id': self.data.test_volume.id}
|
||||
iscsi_properties = self.driver.vmax_get_iscsi_properties(
|
||||
self.data.array, self.data.test_volume, ip_and_iqn, True,
|
||||
|
|
|
@ -94,9 +94,10 @@ class PowerFlexDriver(driver.VolumeDriver):
|
|||
3.5.5 - Rebrand VxFlex OS to PowerFlex.
|
||||
3.5.6 - Fix for Bug #1897598 when volume can be migrated without
|
||||
conversion of its type.
|
||||
3.5.7 - Report trim/discard support.
|
||||
"""
|
||||
|
||||
VERSION = "3.5.6"
|
||||
VERSION = "3.5.7"
|
||||
# ThirdPartySystems wiki
|
||||
CI_WIKI_NAME = "DellEMC_PowerFlex_CI"
|
||||
|
||||
|
@ -839,7 +840,14 @@ class PowerFlexDriver(driver.VolumeDriver):
|
|||
self._get_client().remove_volume(snapshot.provider_id)
|
||||
|
||||
def initialize_connection(self, volume, connector, **kwargs):
|
||||
return self._initialize_connection(volume, connector, volume.size)
|
||||
res = self._initialize_connection(volume, connector, volume.size)
|
||||
|
||||
# TODO: Should probably be enabled for SSDs as well
|
||||
# It is recommended not to trim volumes that contain snapshots as the
|
||||
# logical capacity may not shrink.
|
||||
if self.provisioning_type == 'thin' and not len(volume.snapshots):
|
||||
res['data']['discard'] = True
|
||||
return res
|
||||
|
||||
def _initialize_connection(self, vol_or_snap, connector, vol_size):
|
||||
"""Initialize connection and return connection info.
|
||||
|
@ -1026,6 +1034,8 @@ class PowerFlexDriver(driver.VolumeDriver):
|
|||
"prov": backend_provisioned_capacity,
|
||||
})
|
||||
stats["pools"] = pools
|
||||
# TODO: Should probably be enabled for SSDs as well
|
||||
stats['sparse_copy_volume'] = self.provisioning_type == 'thin'
|
||||
self._stats = stats
|
||||
|
||||
def _query_pool_stats(self, domain_name, pool_name):
|
||||
|
|
|
@ -1424,6 +1424,7 @@ class PowerMaxCommon(object):
|
|||
'reserved_percentage': 0,
|
||||
'replication_enabled': self.replication_enabled,
|
||||
'replication_targets': self.replication_targets,
|
||||
'sparse_copy_volume': True,
|
||||
'pools': pools}
|
||||
|
||||
return data
|
||||
|
|
|
@ -130,9 +130,10 @@ class PowerMaxFCDriver(san.SanDriver, driver.FibreChannelDriver):
|
|||
- Use of snap id instead of generation (bp powermax-snapset-ids)
|
||||
- Support for Failover Abilities (bp/powermax-failover-abilities)
|
||||
4.4.0 - Early check for status of port
|
||||
4.4.1 - Report trim/discard support
|
||||
"""
|
||||
|
||||
VERSION = "4.4.0"
|
||||
VERSION = "4.4.1"
|
||||
|
||||
# ThirdPartySystems wiki
|
||||
CI_WIKI_NAME = "DellEMC_PowerMAX_CI"
|
||||
|
@ -310,6 +311,7 @@ class PowerMaxFCDriver(san.SanDriver, driver.FibreChannelDriver):
|
|||
'data': {'target_lun': device_number,
|
||||
'target_discovered': True,
|
||||
'target_wwn': target_wwns,
|
||||
'discard': True,
|
||||
'initiator_target_map': init_targ_map}}
|
||||
|
||||
LOG.debug("Return FC data for zone addition: %(data)s.",
|
||||
|
|
|
@ -136,9 +136,10 @@ class PowerMaxISCSIDriver(san.SanISCSIDriver):
|
|||
- Use of snap id instead of generation (bp powermax-snapset-ids)
|
||||
- Support for Failover Abilities (bp/powermax-failover-abilities)
|
||||
4.4.0 - Early check for status of port
|
||||
4.4.1 - Report trim/discard support
|
||||
"""
|
||||
|
||||
VERSION = "4.4.0"
|
||||
VERSION = "4.4.1"
|
||||
|
||||
# ThirdPartySystems wiki
|
||||
CI_WIKI_NAME = "DellEMC_PowerMAX_CI"
|
||||
|
@ -421,6 +422,7 @@ class PowerMaxISCSIDriver(san.SanISCSIDriver):
|
|||
properties['target_discovered'] = True
|
||||
properties['target_lun'] = host_lun_id
|
||||
properties['volume_id'] = volume.id
|
||||
properties['discard'] = True
|
||||
|
||||
if self.configuration.safe_get('use_chap_auth'):
|
||||
LOG.info("Chap authentication enabled.")
|
||||
|
|
|
@ -294,6 +294,7 @@ class CommonAdapter(object):
|
|||
"compression_support": True,
|
||||
"multiattach": True,
|
||||
"consistent_group_snapshot_enabled": True,
|
||||
"sparse_copy_volume": True,
|
||||
}
|
||||
backend_stats = self.client.get_metrics()
|
||||
backend_total_capacity = utils.bytes_to_gib(
|
||||
|
@ -1056,6 +1057,7 @@ class FibreChannelAdapter(CommonAdapter):
|
|||
"target_discovered": False,
|
||||
"target_lun": volume_lun,
|
||||
"target_wwn": target_wwns,
|
||||
"discard": True,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -50,9 +50,10 @@ class PowerStoreDriver(driver.VolumeDriver):
|
|||
1.1.2 - Fix iSCSI targets not being returned from the REST API call if
|
||||
targets are used for multiple purposes
|
||||
(iSCSI target, Replication target, etc.)
|
||||
1.1.3 - Report trim/discard support
|
||||
"""
|
||||
|
||||
VERSION = "1.1.2"
|
||||
VERSION = "1.1.3"
|
||||
VENDOR = "Dell EMC"
|
||||
|
||||
# ThirdPartySystems wiki page
|
||||
|
|
|
@ -0,0 +1,13 @@
|
|||
---
|
||||
features:
|
||||
- |
|
||||
Dell EMC PowerStore driver: Report trimming/discard support to Nova and
|
||||
Cinder.
|
||||
- |
|
||||
Dell EMC PowerMax driver: Report trimming/discard support to Nova and
|
||||
Cinder.
|
||||
- |
|
||||
Dell EMC PowerFlex driver: Report trimming/discard support to Nova and
|
||||
Cinder on thin volumes that don't have snapshots. Not doing trim on
|
||||
volumes with snapshots is the vendor's recommendation, but can be overriden
|
||||
with the ``report_discard_supported`` configuration option.
|
Loading…
Reference in New Issue