]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Remove old_name from kwargs when using IET helper.
authorJohn Griffith <john.griffith@solidfire.com>
Wed, 1 May 2013 17:26:18 +0000 (11:26 -0600)
committerJohn Griffith <john.griffith@solidfire.com>
Thu, 2 May 2013 17:53:26 +0000 (11:53 -0600)
The IET driver passes the input kwargs from export
directly to the IET driver, but one of the keys here
is specifically for migration and a bug associated with
going from nova-vol to cinder-uuid's.

This patch just checks in the IET code if we have the key set
and if so pops it out before passing through to iet.

Fixes bug: 1175207

Change-Id: I965bdfbe078d61b906aebc48961c1806a9fb0c59

cinder/volume/iscsi.py

index 8fc0ca9e5529ff53efbe3740b4870627417200dc..ff57276a731134dd9a9a3fba3c38d90e5f0e1030 100644 (file)
@@ -236,6 +236,10 @@ class IetAdm(TargetAdmin):
 
     def create_iscsi_target(self, name, tid, lun, path,
                             chap_auth=None, **kwargs):
+
+        # NOTE (jdg): Address bug: 1175207
+        kwargs.pop('old_name', None)
+
         self._new_target(name, tid, **kwargs)
         self._new_logicalunit(tid, lun, path, **kwargs)
         if chap_auth is not None: