Merge lp:~berendt/nova/lp725615 into lp:~hudson-openstack/nova/trunk

Proposed by Christian Berendt
Status: Merged
Approved by: Devin Carlen
Approved revision: 749
Merged at revision: 749
Proposed branch: lp:~berendt/nova/lp725615
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 21 lines (+3/-1)
1 file modified
nova/virt/disk.py (+3/-1)
To merge this branch: bzr merge lp:~berendt/nova/lp725615
Reviewer Review Type Date Requested Status
Devin Carlen (community) Approve
Jay Pipes (community) Approve
Rick Harris (community) Approve
Review via email: mp+51418@code.launchpad.net

Commit message

introduced new flag "max_nbd_devices" to set the number of possible NBD devices

Description of the change

introduced new flag "max_nbd_devices" to set the number of possible NBD devices

To post a comment you must log in.
Revision history for this message
Rick Harris (rconradharris) wrote :

> Rick-Harriss-MacBook-Pro:nova rick$ grep -R "DEFINE.*max" .
> ./nova/flags.py:DEFINE_integer('rabbit_max_retries', 12, 'rabbit connection attempts')
> ./nova/flags.py:DEFINE_integer('sql_max_retries', 12, 'sql connection attempts')
> ./nova/scheduler/simple.py:flags.DEFINE_integer("max_cores", 16,
> ./nova/scheduler/simple.py:flags.DEFINE_integer("max_gigabytes", 10000,
> ./nova/scheduler/simple.py:flags.DEFINE_integer("max_networks", 1000,
> ./nova/virt/xenapi_conn.py:flags.DEFINE_integer('xenapi_vhd_coalesce_max_attempts',
> Rick-Harriss-MacBook-Pro:nova rick$ grep -R "DEFINE.*maximum*" .

Femto-nit, but 'max'(rather than 'maximum') would be more consistent with our naming scheme for FLAGS. Not sure if this rises to the level of "Needs Fixing", so marking as "Approved".

review: Approve
Revision history for this message
Jay Pipes (jaypipes) wrote :

I'd second Rick's comment. Change to max instead of maximum and approved from me.. might as well fix it up here instead of another merge prop.

review: Needs Fixing
Revision history for this message
Jay Pipes (jaypipes) :
review: Approve
Revision history for this message
Devin Carlen (devcamcar) wrote :

lgtm

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'nova/virt/disk.py'
2--- nova/virt/disk.py 2011-02-21 15:16:21 +0000
3+++ nova/virt/disk.py 2011-02-26 18:20:12 +0000
4@@ -40,6 +40,8 @@
5 'block_size to use for dd')
6 flags.DEFINE_integer('timeout_nbd', 10,
7 'time to wait for a NBD device coming up')
8+flags.DEFINE_integer('max_nbd_devices', 16,
9+ 'maximum number of possible nbd devices')
10
11
12 def extend(image, size):
13@@ -141,7 +143,7 @@
14 utils.execute('sudo losetup --detach %s' % device)
15
16
17-_DEVICES = ['/dev/nbd%s' % i for i in xrange(16)]
18+_DEVICES = ['/dev/nbd%s' % i for i in xrange(FLAGS.max_nbd_devices)]
19
20
21 def _allocate_device():