]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Specify the conf file when creating a volume.
authorDan Prince <dprince@redhat.com>
Thu, 6 Sep 2012 18:50:50 +0000 (14:50 -0400)
committerDan Prince <dprince@redhat.com>
Thu, 6 Sep 2012 21:41:56 +0000 (17:41 -0400)
Updates the tgt-admin command to actually use the config file
we create for the volume being created.

This fixes an issue introduced in
9785963c841aff5ea1c159da81f93c2bf62c70c6 which breaks iscsi
volume creation.

Fixes LP Bug #1046985.

Change-Id: I06e83c9ba351c2b4846b557a3abb170a51d506c0

cinder/tests/test_iscsi.py
cinder/volume/iscsi.py

index 1b358d9280b6b437cb7cf4b69bf25242c2ae5dd1..8fac430599b2e6cb2a1c3de17fdf6c0f9fd24c68 100644 (file)
@@ -92,7 +92,7 @@ class TgtAdmTestCase(test.TestCase, TargetAdminTestCase):
         self.flags(iscsi_helper='tgtadm')
         self.flags(volumes_dir="./")
         self.script_template = "\n".join([
-        'tgt-admin --update iqn.2011-09.org.foo.bar:blaa',
+        'tgt-admin --conf ./blaa --update iqn.2011-09.org.foo.bar:blaa',
         'tgt-admin --delete iqn.2010-10.org.openstack:volume-blaa'])
 
 
index 691314393a689effaf3b8407b4d2f9b1be451b2a..625e31091c1be2a9db9345d927caa3629d2ec9aa 100644 (file)
@@ -128,6 +128,8 @@ class TgtAdm(TargetAdmin):
 
         try:
             (out, err) = self._execute('tgt-admin',
+                                       '--conf',
+                                       volume_path,
                                        '--update',
                                        name,
                                        run_as_root=True)