From 933a7c01ffa78810b283aa3c3b32d75e4c4504bb Mon Sep 17 00:00:00 2001 From: Tom Barron Date: Tue, 23 Sep 2014 18:05:40 -0400 Subject: [PATCH] Eseries warn if multipath is not set for img xfer Warn at driver startup if the configuration option "use_multipath_for_image_xfer" has not been set to "True". Eseries filers require appropriate multipath/DMMP configuration on the host running the cinder volume process for image transfers to work reliably. Change-Id: Ib79a23a5a9527b254f155a9f4ea022d4387a4a13 Closes-Bug: #1376349 --- cinder/volume/drivers/netapp/eseries/iscsi.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/cinder/volume/drivers/netapp/eseries/iscsi.py b/cinder/volume/drivers/netapp/eseries/iscsi.py index bfb08d79f..6b339c018 100644 --- a/cinder/volume/drivers/netapp/eseries/iscsi.py +++ b/cinder/volume/drivers/netapp/eseries/iscsi.py @@ -66,6 +66,8 @@ class Driver(driver.ISCSIDriver): self.configuration.append_config_values(netapp_connection_opts) self.configuration.append_config_values(netapp_transport_opts) self.configuration.append_config_values(netapp_eseries_opts) + self._backend_name = self.configuration.safe_get("volume_backend_name")\ + or "NetApp_ESeries" self._objects = {'disk_pool_refs': [], 'pools': [], 'volumes': {'label_ref': {}, 'ref_vol': {}}, 'snapshots': {'label_ref': {}, 'ref_snap': {}}} @@ -89,6 +91,13 @@ class Driver(driver.ISCSIDriver): if not getattr(self.configuration, flag, None): msg = _('%s is not set.') % flag raise exception.InvalidInput(reason=msg) + if not self.configuration.use_multipath_for_image_xfer: + msg = _('Production use of "%(backend)s" backend requires the ' + 'Cinder controller to have multipathing properly set up ' + 'and the configuration option "%(mpflag)s" to be set to ' + '"True".') % {'backend': self._backend_name, + 'mpflag': 'use_multipath_for_image_xfer'} + LOG.warning(msg) def check_for_setup_error(self): self._check_storage_system() @@ -684,9 +693,7 @@ class Driver(driver.ISCSIDriver): """Update volume statistics.""" LOG.debug("Updating volume stats.") data = dict() - netapp_backend = "NetApp_ESeries" - backend_name = self.configuration.safe_get("volume_backend_name") - data["volume_backend_name"] = (backend_name or netapp_backend) + data["volume_backend_name"] = self._backend_name data["vendor_name"] = "NetApp" data["driver_version"] = self.VERSION data["storage_protocol"] = "iSCSI" -- 2.45.2