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
66f6a9e which breaks iscsi
volume creation.

Fixes LP Bug #1046985.

Change-Id: I58bd23ef6dd0055a329ace8e4b09d86886aa38e9
  • Loading branch information
dprince committed Sep 7, 2012
1 parent cb63eb9 commit 0a09bf5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion nova/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 nova/volume/iscsi.py
Expand Up @@ -127,6 +127,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 0a09bf5

Please sign in to comment.