Merge lp://qastaging/~zulcss/nova/nova-iscsitarget-removal into lp://qastaging/~hudson-openstack/nova/trunk

Proposed by Chuck Short
Status: Work in progress
Proposed branch: lp://qastaging/~zulcss/nova/nova-iscsitarget-removal
Merge into: lp://qastaging/~hudson-openstack/nova/trunk
Diff against target: 95 lines (+12/-12)
2 files modified
nova/tests/test_volume.py (+2/-2)
nova/volume/driver.py (+10/-10)
To merge this branch: bzr merge lp://qastaging/~zulcss/nova/nova-iscsitarget-removal
Reviewer Review Type Date Requested Status
Soren Hansen (community) Needs Fixing
Jason Kölker (community) Abstain
Review via email: mp+70299@code.qastaging.launchpad.net

Description of the change

Uses tgt instead of iscsitarget.

To post a comment you must log in.
Revision history for this message
Jason Kölker (jason-koelker) wrote :
Download full text (4.7 KiB)

I would rather this split out into the driver/implementer pattern rather than a straight up flip, but I'll let those who use this stuff make the call.

Something is up the the lp diff system so its not showing up. Here is is for future reviewers:

=== modified file 'nova/tests/test_volume.py'
--- nova/tests/test_volume.py 2011-07-08 03:07:58 +0000
+++ nova/tests/test_volume.py 2011-08-03 14:10:33 +0000
@@ -414,7 +414,7 @@
         self.mox.StubOutWithMock(self.volume.driver, '_execute')
         for i in volume_id_list:
             tid = db.volume_get_iscsi_target_num(self.context, i)
- self.volume.driver._execute("sudo", "ietadm", "--op", "show",
+ self.volume.driver._execute("sudo", "tgtadm", "--op", "show",
                                         "--tid=%(tid)d" % locals())

         self.stream.truncate(0)
@@ -433,7 +433,7 @@
         # the first vblade process isn't running
         tid = db.volume_get_iscsi_target_num(self.context, volume_id_list[0])
         self.mox.StubOutWithMock(self.volume.driver, '_execute')
- self.volume.driver._execute("sudo", "ietadm", "--op", "show",
+ self.volume.driver._execute("sudo", "tgtadm", "--op", "show",
                                     "--tid=%(tid)d" % locals()).AndRaise(
                                             exception.ProcessExecutionError())

=== modified file 'nova/volume/driver.py'
--- nova/volume/driver.py 2011-06-24 12:01:51 +0000
+++ nova/volume/driver.py 2011-08-03 14:10:33 +0000
@@ -328,7 +328,7 @@
     We make use of model provider properties as follows:

     :provider_location: if present, contains the iSCSI target information
- in the same format as an ietadm discovery
+ in the same format as an tgtadm discovery
                            i.e. '<ip>:<port>,<portal> <target IQN>'

     :provider_auth: if present, contains a space-separated triple:
@@ -348,12 +348,12 @@

         iscsi_name = "%s%s" % (FLAGS.iscsi_target_prefix, volume['name'])
         volume_path = "/dev/%s/%s" % (FLAGS.volume_group, volume['name'])
- self._sync_exec('sudo', 'ietadm', '--op', 'new',
+ self._sync_exec('sudo', 'tgtadm', '--op', 'new',
                         "--tid=%s" % iscsi_target,
                         '--params',
                         "Name=%s" % iscsi_name,
                         check_exit_code=False)
- self._sync_exec('sudo', 'ietadm', '--op', 'new',
+ self._sync_exec('sudo', 'tgtadm', '--op', 'new',
                         "--tid=%s" % iscsi_target,
                         '--lun=0',
                         '--params',
@@ -378,10 +378,10 @@
                                                       volume['host'])
         iscsi_name = "%s%s" % (FLAGS.iscsi_target_prefix, volume['name'])
         volume_path = "/dev/%s/%s" % (FLAGS.volume_group, volume['name'])
- self._execute('sudo', 'ietadm', '--op', 'new',
+ self._execute('sudo', 'tgtadm', '--op', 'new',
                       '--tid=%s' % iscsi_target,
                       '--params', 'Name=%s' % iscsi_name)
- self._execute('sudo', 'ietad...

Read more...

review: Abstain
Revision history for this message
Soren Hansen (soren) wrote :

I agree with Jason. I don't want to drop iscsitarget support. Either split them into two drivers (with a shared superclass to avoid duplicating the whole thing) or add a flag that chooses the command to run. For added bonus points, autodetect if either of them is in your $PATH and use that if the flag isn't set).

review: Needs Fixing
Revision history for this message
Mark McLoughlin (markmc) wrote :

Unmerged revisions

1356. By Chuck Short

Use tgtadm rather than ietadm

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.