Merge "NetApp - Add additional debug logs"
This commit is contained in:
@@ -249,7 +249,6 @@ class NetAppBlockStorageLibrary(
|
|||||||
'SpaceReserved': self.lun_space_reservation,
|
'SpaceReserved': self.lun_space_reservation,
|
||||||
'SpaceAllocated': str(space_allocation).lower(),
|
'SpaceAllocated': str(space_allocation).lower(),
|
||||||
'Path': '/vol/%s/%s' % (pool_name, lun_name)}
|
'Path': '/vol/%s/%s' % (pool_name, lun_name)}
|
||||||
|
|
||||||
qos_policy_group_info = self._setup_qos_for_volume(volume, extra_specs)
|
qos_policy_group_info = self._setup_qos_for_volume(volume, extra_specs)
|
||||||
qos_policy_group_name = (
|
qos_policy_group_name = (
|
||||||
na_utils.get_qos_policy_group_name_from_info(
|
na_utils.get_qos_policy_group_name_from_info(
|
||||||
@@ -258,7 +257,8 @@ class NetAppBlockStorageLibrary(
|
|||||||
extra_specs.get('netapp:qos_policy_group_is_adaptive'))
|
extra_specs.get('netapp:qos_policy_group_is_adaptive'))
|
||||||
or na_utils.is_qos_policy_group_spec_adaptive
|
or na_utils.is_qos_policy_group_spec_adaptive
|
||||||
(qos_policy_group_info))
|
(qos_policy_group_info))
|
||||||
|
LOG.debug("Creating LUN %(lun_name)s with size %(size)s",
|
||||||
|
{'lun_name': lun_name, 'size': size})
|
||||||
try:
|
try:
|
||||||
self._create_lun(pool_name, lun_name, size, metadata,
|
self._create_lun(pool_name, lun_name, size, metadata,
|
||||||
qos_policy_group_name,
|
qos_policy_group_name,
|
||||||
|
|||||||
@@ -207,10 +207,13 @@ class NetAppBlockStorageCmodeLibrary(
|
|||||||
metadata, qos_policy_group_name=None,
|
metadata, qos_policy_group_name=None,
|
||||||
qos_policy_group_is_adaptive=False):
|
qos_policy_group_is_adaptive=False):
|
||||||
"""Creates a LUN, handling Data ONTAP differences as needed."""
|
"""Creates a LUN, handling Data ONTAP differences as needed."""
|
||||||
|
LOG.debug("Creating LUN with volume name %(vol)s and lun name %(lun)s",
|
||||||
|
{'vol': volume_name, 'lun': lun_name})
|
||||||
self.zapi_client.create_lun(
|
self.zapi_client.create_lun(
|
||||||
volume_name, lun_name, size, metadata, qos_policy_group_name,
|
volume_name, lun_name, size, metadata, qos_policy_group_name,
|
||||||
qos_policy_group_is_adaptive)
|
qos_policy_group_is_adaptive)
|
||||||
|
LOG.debug("Successfully created LUN with volume name %(vol)s and lun "
|
||||||
|
"name %(lun)s", {'vol': volume_name, 'lun': lun_name})
|
||||||
|
|
||||||
def _create_lun_handle(self, metadata, vserver=None):
|
def _create_lun_handle(self, metadata, vserver=None):
|
||||||
"""Returns LUN handle based on filer type."""
|
"""Returns LUN handle based on filer type."""
|
||||||
@@ -373,12 +376,17 @@ class NetAppBlockStorageCmodeLibrary(
|
|||||||
if (self.using_cluster_credentials
|
if (self.using_cluster_credentials
|
||||||
and not self.configuration.netapp_disaggregated_platform):
|
and not self.configuration.netapp_disaggregated_platform):
|
||||||
# Get up-to-date node utilization metrics just once
|
# Get up-to-date node utilization metrics just once
|
||||||
|
LOG.debug("Updating perf cache for cluster.")
|
||||||
self.perf_library.update_performance_cache(ssc)
|
self.perf_library.update_performance_cache(ssc)
|
||||||
|
LOG.debug("Successfully updated perf cache for cluster.")
|
||||||
# Get up-to-date aggregate capacities just once
|
# Get up-to-date aggregate capacities just once
|
||||||
aggregates = self.ssc_library.get_ssc_aggregates()
|
aggregates = self.ssc_library.get_ssc_aggregates()
|
||||||
|
|
||||||
|
LOG.debug("Getting aggregate capacities.")
|
||||||
aggr_capacities = self.zapi_client.get_aggregate_capacities(
|
aggr_capacities = self.zapi_client.get_aggregate_capacities(
|
||||||
aggregates)
|
aggregates)
|
||||||
|
LOG.debug("Aggregate capacities successfully fetched: %s",
|
||||||
|
aggr_capacities)
|
||||||
else:
|
else:
|
||||||
aggr_capacities = {}
|
aggr_capacities = {}
|
||||||
|
|
||||||
@@ -403,8 +411,11 @@ class NetAppBlockStorageCmodeLibrary(
|
|||||||
if self.configuration.netapp_disaggregated_platform:
|
if self.configuration.netapp_disaggregated_platform:
|
||||||
capacity = self.zapi_client.get_cluster_capacity()
|
capacity = self.zapi_client.get_cluster_capacity()
|
||||||
else:
|
else:
|
||||||
|
LOG.debug("Getting flexvol %s capacity.", ssc_vol_name)
|
||||||
capacity = self.zapi_client.get_flexvol_capacity(
|
capacity = self.zapi_client.get_flexvol_capacity(
|
||||||
flexvol_name=ssc_vol_name)
|
flexvol_name=ssc_vol_name)
|
||||||
|
LOG.debug("Successfully fetched flexvol capacity: %s",
|
||||||
|
capacity)
|
||||||
|
|
||||||
size_total_gb = capacity['size-total'] / units.Gi
|
size_total_gb = capacity['size-total'] / units.Gi
|
||||||
pool['total_capacity_gb'] = na_utils.round_down(size_total_gb)
|
pool['total_capacity_gb'] = na_utils.round_down(size_total_gb)
|
||||||
@@ -412,8 +423,12 @@ class NetAppBlockStorageCmodeLibrary(
|
|||||||
size_available_gb = capacity['size-available'] / units.Gi
|
size_available_gb = capacity['size-available'] / units.Gi
|
||||||
pool['free_capacity_gb'] = na_utils.round_down(size_available_gb)
|
pool['free_capacity_gb'] = na_utils.round_down(size_available_gb)
|
||||||
|
|
||||||
|
LOG.debug("Getting LUN size for volume")
|
||||||
luns = self.zapi_client.get_lun_sizes_by_volume(
|
luns = self.zapi_client.get_lun_sizes_by_volume(
|
||||||
ssc_vol_name)
|
ssc_vol_name)
|
||||||
|
LOG.debug("Successfully fetched LUN size for volume: %s",
|
||||||
|
ssc_vol_name)
|
||||||
|
|
||||||
pool['total_volumes'] = len(luns)
|
pool['total_volumes'] = len(luns)
|
||||||
if self.configuration.netapp_driver_reports_provisioned_capacity:
|
if self.configuration.netapp_driver_reports_provisioned_capacity:
|
||||||
provisioned_cap = 0
|
provisioned_cap = 0
|
||||||
@@ -428,10 +443,13 @@ class NetAppBlockStorageCmodeLibrary(
|
|||||||
|
|
||||||
if (self.using_cluster_credentials and
|
if (self.using_cluster_credentials and
|
||||||
not self.configuration.netapp_disaggregated_platform):
|
not self.configuration.netapp_disaggregated_platform):
|
||||||
|
LOG.debug("Getting flexvol %s dedupe info.", ssc_vol_name)
|
||||||
dedupe_used = (
|
dedupe_used = (
|
||||||
self.zapi_client
|
self.zapi_client
|
||||||
.get_flexvol_dedupe_used_percent(ssc_vol_name)
|
.get_flexvol_dedupe_used_percent(ssc_vol_name)
|
||||||
)
|
)
|
||||||
|
LOG.debug("Successfully fetched flexvol dedup info: %s",
|
||||||
|
dedupe_used)
|
||||||
else:
|
else:
|
||||||
dedupe_used = 0.0
|
dedupe_used = 0.0
|
||||||
pool['netapp_dedupe_used_percent'] = na_utils.round_down(
|
pool['netapp_dedupe_used_percent'] = na_utils.round_down(
|
||||||
@@ -521,8 +539,12 @@ class NetAppBlockStorageCmodeLibrary(
|
|||||||
raise exception.VolumeBackendAPIException(data=msg)
|
raise exception.VolumeBackendAPIException(data=msg)
|
||||||
pool = volume_utils.extract_host(volume['host'], level='pool')
|
pool = volume_utils.extract_host(volume['host'], level='pool')
|
||||||
qos_min_support = self.ssc_library.is_qos_min_supported(pool)
|
qos_min_support = self.ssc_library.is_qos_min_supported(pool)
|
||||||
|
LOG.debug("Provisioning QoS policy group with info: %s",
|
||||||
|
qos_policy_group_info)
|
||||||
self.zapi_client.provision_qos_policy_group(qos_policy_group_info,
|
self.zapi_client.provision_qos_policy_group(qos_policy_group_info,
|
||||||
qos_min_support)
|
qos_min_support)
|
||||||
|
LOG.debug("Successfully provisioned QoS policy group with info: %s",
|
||||||
|
qos_policy_group_info)
|
||||||
return qos_policy_group_info
|
return qos_policy_group_info
|
||||||
|
|
||||||
def _get_volume_model_update(self, volume):
|
def _get_volume_model_update(self, volume):
|
||||||
|
|||||||
@@ -446,6 +446,8 @@ def get_pool_name_filter_regex(configuration):
|
|||||||
|
|
||||||
def get_valid_qos_policy_group_info(volume, extra_specs=None):
|
def get_valid_qos_policy_group_info(volume, extra_specs=None):
|
||||||
"""Given a volume, return information for QOS provisioning."""
|
"""Given a volume, return information for QOS provisioning."""
|
||||||
|
LOG.debug("Getting valid QOS policy group info for volume id: %s.",
|
||||||
|
volume['id'])
|
||||||
info = dict(legacy=None, spec=None)
|
info = dict(legacy=None, spec=None)
|
||||||
try:
|
try:
|
||||||
volume_type = get_volume_type_from_volume(volume)
|
volume_type = get_volume_type_from_volume(volume)
|
||||||
|
|||||||
Reference in New Issue
Block a user