Skip to content

Commit

Permalink
Update targets information when creating target.
Browse files Browse the repository at this point in the history
tgt-admin needs to use --execute --update to tell
tgtd to re-read its configuration files when target
is created.

(LP: #1031509)

Change-Id: I71fe4d90a8cc9bcf7a4817aefd6de52e216102a4
Signed-off-by: Chuck Short <chuck.short@canonical.com>
  • Loading branch information
Chuck Short committed Jul 31, 2012
1 parent 37dee20 commit dcc26e8
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nova/tests/test_iscsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def setUp(self):
self.flags(iscsi_helper='tgtadm')
self.flags(volumes_dir="./")
self.script_template = "\n".join([
"tgt-admin --conf ./blaa --update blaa",
"tgt-admin --execute --conf ./blaa --update blaa",
"tgtadm --op show --lld=iscsi --mode=target --tid=1",
"tgt-admin --conf ./blaa --delete blaa"])

Expand Down
2 changes: 1 addition & 1 deletion nova/volume/iscsi.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def create_iscsi_target(self, name, tid, lun, path, **kwargs):
f.write(volume_conf)
f.close()

self._execute('tgt-admin', '--conf %s' % volume_path,
self._execute('tgt-admin', '--execute', '--conf %s' % volume_path,
'--update %s' % vol_id, run_as_root=True)

except Exception as ex:
Expand Down

0 comments on commit dcc26e8

Please sign in to comment.