Skip to content

Commit

Permalink
Specify the conf file when creating a volume.
Browse files Browse the repository at this point in the history
Updates the tgt-admin command to actually use the config file
we create for the volume being created.

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

Fixes LP Bug #1046985.

Change-Id: I06e83c9ba351c2b4846b557a3abb170a51d506c0
  • Loading branch information
dprince committed Sep 6, 2012
1 parent 5d72e7a commit 0903603
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cinder/tests/test_iscsi.py
Expand Up @@ -92,7 +92,7 @@ def setUp(self):
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'])


Expand Down
2 changes: 2 additions & 0 deletions cinder/volume/iscsi.py
Expand Up @@ -128,6 +128,8 @@ def create_iscsi_target(self, name, tid, lun, path, **kwargs):

try:
(out, err) = self._execute('tgt-admin',
'--conf',
volume_path,
'--update',
name,
run_as_root=True)
Expand Down

0 comments on commit 0903603

Please sign in to comment.