From 5c61d57d3693523e9cbf11bf0b5b09bafe699247 Mon Sep 17 00:00:00 2001
From: Juan Zuluaga <juan.c.zuluaga@oracle.com>
Date: Wed, 24 Sep 2014 18:51:07 -0400
Subject: [PATCH] ZFSSA iSCSI vol create fails with vol type option

Vol create with volume-type option is not working since
volume_backend_name contains the class name as
predefined string. No matter what was specified in cinder.conf
as volume_backend_name, volume creation failed.
Multi-backend option and using extra specs to create custom volumes
won't work.
The fix is to look whether volume_backend_name is part of the
configuration or falls into the class name in case there is
no backend name.

Change-Id: I1bc501dd4c5689d96c7beb720b64112df1770232
Closes-Bug: 1373621
DocImpact
---
 cinder/volume/drivers/zfssa/zfssaiscsi.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cinder/volume/drivers/zfssa/zfssaiscsi.py b/cinder/volume/drivers/zfssa/zfssaiscsi.py
index ade95d73c..f2c781fbe 100644
--- a/cinder/volume/drivers/zfssa/zfssaiscsi.py
+++ b/cinder/volume/drivers/zfssa/zfssaiscsi.py
@@ -283,7 +283,8 @@ class ZFSSAISCSIDriver(driver.ISCSIDriver):
         LOG.debug("Updating volume status")
         self._stats = None
         data = {}
-        data["volume_backend_name"] = self.__class__.__name__
+        backend_name = self.configuration.safe_get('volume_backend_name')
+        data["volume_backend_name"] = backend_name or self.__class__.__name__
         data["vendor_name"] = 'Oracle'
         data["driver_version"] = self.VERSION
         data["storage_protocol"] = self.protocol
-- 
2.45.2