Merge lp://qastaging/~zulcss/nova/nova-iscsi-choice into lp://qastaging/~hudson-openstack/nova/trunk

Proposed by Chuck Short
Status: Work in progress
Proposed branch: lp://qastaging/~zulcss/nova/nova-iscsi-choice
Merge into: lp://qastaging/~hudson-openstack/nova/trunk
Diff against target: 195 lines (+94/-36)
3 files modified
nova/flags.py (+2/-0)
nova/tests/test_volume.py (+2/-2)
nova/volume/driver.py (+90/-34)
To merge this branch: bzr merge lp://qastaging/~zulcss/nova/nova-iscsi-choice
Reviewer Review Type Date Requested Status
Brian Lamar (community) Needs Fixing
Review via email: mp+71188@code.qastaging.launchpad.net

Description of the change

Allow the user to choose between iscsitarget and tgt for iscsi userland tools.

To post a comment you must log in.
1418. By Chuck Short

Fix pep8 errors

Revision history for this message
Brian Lamar (blamar) wrote :

19 + self.volume.driver._execute("sudo", "%s" %FLAGS.iscsi_helper, "--op", "show",

This and there are a number of other PEP8 violations to fix.

169 + if FLAGS.iscsi_helper == 'tgtadm':
170 + mount_device = ("/dev/disk/by-path/ip-%s-iscsi-%s-lun-0" %
171 + (iscsi_properties['target_portal'],
172 + iscsi_properties['target_iqn']))
173 + else:
174 + mount_device = ("/dev/disk/by-path/ip-%s-iscsi-%s-lun-0" %
175 + (iscsi_properties['target_portal'],
176 + iscsi_properties['target_iqn']))

I don't think we need this if statement? Unless I'm missing something it's the same code. If you'd like you can put a note in the code indicating that the two supported iscsi implementations share the same strategy here but I'm not sure even that is necessary.

How are you currently testing this code? Manually? Have you tested both ietadm and tgtadm? I get very uneasy around code that's not only not tested, but isn't really testable.

review: Needs Fixing
Revision history for this message
Brian Lamar (blamar) wrote :

Also, can you delete your other branch if this is the way you're going to proceed? Thanks!

Revision history for this message
Ben McGraw (mcgrue) wrote :

needs fixing - please write tests for the new feature; In addition, are there tests for the old feature?

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

More work on this at lp:~markmc/nova/iscsi-tgtadm-choice - I believe I've handled Ben and Brian's comments

Unmerged revisions

1418. By Chuck Short

Fix pep8 errors

1417. By Chuck Short

Fixup thinkos

1416. By Chuck Short

Allow the user to choose either ietadm or tgtadm

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.