diff options
| author | Dan Prince <dprince@redhat.com> | 2012-09-06 23:03:50 -0400 |
|---|---|---|
| committer | Dan Prince <dprince@redhat.com> | 2012-09-06 23:03:50 -0400 |
| commit | 0a09bf5faeb30b675fdb8f517c61166ef794bad3 (patch) | |
| tree | ce65273472f311452ddc4e18f7c422dfd33f2680 | |
| parent | cb63eb9533609007c5b3be64ca2c859110d2502e (diff) | |
Specify the conf file when creating a volume.
Updates the tgt-admin command to actually use the config file
we create for the volume being created.
This fixes an issue introduced in
66f6a9edce3ccd624aba5d2a6bf3362901ed57f7 which breaks iscsi
volume creation.
Fixes LP Bug #1046985.
Change-Id: I58bd23ef6dd0055a329ace8e4b09d86886aa38e9
| -rw-r--r-- | nova/tests/test_iscsi.py | 2 | ||||
| -rw-r--r-- | nova/volume/iscsi.py | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/nova/tests/test_iscsi.py b/nova/tests/test_iscsi.py index d375313e2..9fcd219cc 100644 --- a/nova/tests/test_iscsi.py +++ b/nova/tests/test_iscsi.py @@ -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']) diff --git a/nova/volume/iscsi.py b/nova/volume/iscsi.py index ccc768827..b1b3787df 100644 --- a/nova/volume/iscsi.py +++ b/nova/volume/iscsi.py @@ -127,6 +127,8 @@ class TgtAdm(TargetAdmin): try: (out, err) = self._execute('tgt-admin', + '--conf', + volume_path, '--update', name, run_as_root=True) |
