Merge lp:~rlane/nova/lp666554 into lp:~hudson-openstack/nova/trunk

Proposed by Ryan Lane
Status: Merged
Merged at revision: 399
Proposed branch: lp:~rlane/nova/lp666554
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 15 lines (+5/-2)
1 file modified
nova/compute/disk.py (+5/-2)
To merge this branch: bzr merge lp:~rlane/nova/lp666554
Reviewer Review Type Date Requested Status
Devin Carlen (community) Approve
Michael Gundlach (community) Approve
Review via email: mp+40990@code.launchpad.net

Description of the change

Created /etc/network before trying to inject net, if the directory does not exist.

To post a comment you must log in.
Revision history for this message
Michael Gundlach (gundlach) wrote :

lgtm.

review: Approve
Revision history for this message
Vish Ishaya (vishvananda) wrote :

Looks like you need a quick merge of trunk and a few pep8 fixes before it will merge
 pep8 --repeat nova
nova/utils.py:220:1: W293 blank line contains whitespace
nova/utils.py:223:1: W293 blank line contains whitespace
nova/utils.py:239:1: W391 blank line at end of file
nova/utils.py:239:1: W293 blank line contains whitespace
nova/compute/disk.py:175:47: E261 at least two spaces before inline comment
nova/tests/api/openstack/test_api.py:27:1: E302 expected 2 blank lines, found 1
nova/tests/api/openstack/test_api.py:33:9: E301 expected 1 blank line, found 0
nova/tests/api/openstack/test_api.py:36:9: E301 expected 1 blank line, found 0
nova/tests/api/openstack/test_api.py:39:9: E301 expected 1 blank line, found 0

Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :

The attempt to merge lp:~rlane/nova/lp666554 into lp:nova failed. Below is the output from the failed tests.

nova/compute/disk.py:179:47: E261 at least two spaces before inline comment
    yield execute('sudo mkdir -p %s' % netdir) # existing dir doesn't matter
                                              ^
    Separate inline comments by at least two spaces.

    An inline comment is a comment on the same line as a statement. Inline
    comments should be separated by at least two spaces from the statement.
    They should start with a # and a single space.

    Okay: x = x + 1 # Increment x
    Okay: x = x + 1 # Increment x
    E261: x = x + 1 # Increment x
    E262: x = x + 1 #Increment x
    E262: x = x + 1 # Increment x

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/compute/disk.py'
2--- nova/compute/disk.py 2010-10-31 00:05:31 +0000
3+++ nova/compute/disk.py 2010-11-16 18:12:58 +0000
4@@ -175,6 +175,9 @@
5
6 @defer.inlineCallbacks
7 def _inject_net_into_fs(net, fs, execute=None):
8- netfile = os.path.join(os.path.join(os.path.join(
9- fs, 'etc'), 'network'), 'interfaces')
10+ netdir = os.path.join(os.path.join(fs, 'etc'), 'network')
11+ yield execute('sudo mkdir -p %s' % netdir) # existing dir doesn't matter
12+ yield execute('sudo chown root:root %s' % netdir)
13+ yield execute('sudo chmod 755 %s' % netdir)
14+ netfile = os.path.join(netdir, 'interfaces')
15 yield execute('sudo tee %s' % netfile, net)