Merge lp:~mnogu/nova/iscsi-execvp into lp:~hudson-openstack/nova/trunk

Proposed by Muneyuki Noguchi
Status: Merged
Approved by: Jesse Andrews
Approved revision: 859
Merged at revision: 883
Proposed branch: lp:~mnogu/nova/iscsi-execvp
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 46 lines (+8/-9)
1 file modified
nova/volume/driver.py (+8/-9)
To merge this branch: bzr merge lp:~mnogu/nova/iscsi-execvp
Reviewer Review Type Date Requested Status
justinsb (community) Approve
Jesse Andrews (community) Approve
Review via email: mp+54639@code.launchpad.net

Commit message

Fix lp741415 by splitting arguments of _execute in the iSCSI driver.

To post a comment you must log in.
lp:~mnogu/nova/iscsi-execvp updated
859. By Muneyuki Noguchi

Remove a blank line.

Revision history for this message
Jesse Andrews (anotherjesse) wrote :

lgtm - nice catch!

can't wait to have automated testing of a real deploy working

review: Approve
Revision history for this message
justinsb (justin-fathomdb) wrote :

Hit the bug, merged the patch, verified it works.

Adding nova-core so that we can get the second review and get this merged.

review: Approve
Revision history for this message
justinsb (justin-fathomdb) wrote :

Oh ... I can't add nova-core because it's not my MP. Let's get this merged though...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/volume/driver.py'
2--- nova/volume/driver.py 2011-03-17 21:21:55 +0000
3+++ nova/volume/driver.py 2011-03-24 02:58:05 +0000
4@@ -422,18 +422,17 @@
5 return properties
6
7 def _run_iscsiadm(self, iscsi_properties, iscsi_command):
8- command = ("sudo iscsiadm -m node -T %s -p %s %s" %
9- (iscsi_properties['target_iqn'],
10- iscsi_properties['target_portal'],
11- iscsi_command))
12- (out, err) = self._execute(command)
13+ (out, err) = self._execute('sudo', 'iscsiadm', '-m', 'node', '-T',
14+ iscsi_properties['target_iqn'],
15+ '-p', iscsi_properties['target_portal'],
16+ iscsi_command)
17 LOG.debug("iscsiadm %s: stdout=%s stderr=%s" %
18 (iscsi_command, out, err))
19 return (out, err)
20
21 def _iscsiadm_update(self, iscsi_properties, property_key, property_value):
22- iscsi_command = ("--op update -n %s -v %s" %
23- (property_key, property_value))
24+ iscsi_command = ('--op', 'update', '-n', property_key,
25+ '-v', property_value)
26 return self._run_iscsiadm(iscsi_properties, iscsi_command)
27
28 def discover_volume(self, context, volume):
29@@ -441,7 +440,7 @@
30 iscsi_properties = self._get_iscsi_properties(volume)
31
32 if not iscsi_properties['target_discovered']:
33- self._run_iscsiadm(iscsi_properties, "--op new")
34+ self._run_iscsiadm(iscsi_properties, ('--op', 'new'))
35
36 if iscsi_properties.get('auth_method'):
37 self._iscsiadm_update(iscsi_properties,
38@@ -493,7 +492,7 @@
39 iscsi_properties = self._get_iscsi_properties(volume)
40 self._iscsiadm_update(iscsi_properties, "node.startup", "manual")
41 self._run_iscsiadm(iscsi_properties, "--logout")
42- self._run_iscsiadm(iscsi_properties, "--op delete")
43+ self._run_iscsiadm(iscsi_properties, ('--op', 'delete'))
44
45 def check_for_export(self, context, volume_id):
46 """Make sure volume is exported."""