Merge lp:~kbringard/nova/lp742578 into lp:~hudson-openstack/nova/trunk

Proposed by Kevin Bringard
Status: Superseded
Proposed branch: lp:~kbringard/nova/lp742578
Merge into: lp:~hudson-openstack/nova/trunk
Diff against target: 40 lines (+4/-4)
2 files modified
Authors (+1/-0)
nova/network/linux_net.py (+3/-4)
To merge this branch: bzr merge lp:~kbringard/nova/lp742578
Reviewer Review Type Date Requested Status
Thierry Carrez (community) ffe Needs Information
termie (community) Needs Fixing
John Dewey (community) Needs Information
Review via email: mp+54898@code.launchpad.net

This proposal has been superseded by a proposal from 2011-04-15.

Description of the change

Add a flag to allow the user to specify a dnsmasq configuration file for nova-network to use when starting dnsmasq. Currently the command line option is set to "--config-fil=" with nothing specified. This branch will leave it as it is if the user does not specify a config file, but will utilize the specific file if they do.

If there is a conflict with the options specified on the command line and those in the configuration file, dnsmasq will use the config file (overriding the command line options) if the option is only allowed to be specified once, or it will use both if the option is allowed to be specified multiple times.

I have found this personally useful for adding things such as "domain=" to set the domain hostname on VMs as well as to more finely tune DNS delegation and upstream resolution.

To post a comment you must log in.
Revision history for this message
John Dewey (retr0h) wrote :

Looks like the '--conf-file=' flag is always passed. Prior to your change it is just always empty, so your change looks reasonable.

Bit of information needed:

Add yourself to Authors and http://wiki.openstack.org/Contributors.

See the prerequisites section of the How to Contribute Guide:
  http://wiki.openstack.org/HowToContribute

review: Needs Information
Revision history for this message
termie (termie) wrote :

seems fine, I don't have a use case for it but I can see how people with very specific configs might want to mess with the config directly. If it is a common issue, however, it may make more sense to add that config option as a flag.

Anyway, a couple nits:

- no need for the extra newline before your flag def, and you need an extra space after it
- no need for the extra space before the command-line option

review: Needs Fixing
Revision history for this message
Thierry Carrez (ttx) wrote :

Feature is a bit late to the party, as we hit FeatureFreeze last Thursday.

If you want this into Cactus rather than wait for Diablo, could you provide a quick benefit vs. risk of regression rationale, then request a specific FFe review from me ?

review: Needs Information (ffe)
lp:~kbringard/nova/lp742578 updated
893. By Kevin Bringard

Removed extraneous white space

894. By Kevin Bringard

Updated Authors file

Revision history for this message
Kevin Bringard (kbringard) wrote :

John: Done and done.

Termie: I pushed a new version removing the extraneous whitespace you mentioned

Thierry: I'm OK with this not going out with Cactus; unless you know about some pent up demand for this feature, in which case I'm happy to write up a cost benefit analysis.

Revision history for this message
Thierry Carrez (ttx) wrote :

OK, please set it back to work in progress until Diablo opens for merging (April 14) so that it doesn't clog the review queue. We are trying to concentrate the nova-core review resources on the stuff that has to land in Cactus, like all those bugfixes :) Thanks.

lp:~kbringard/nova/lp742578 updated
895. By Kevin Bringard

Fixed 2 lines to allow pep8 check to pass

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Authors'
2--- Authors 2011-03-25 13:38:57 +0000
3+++ Authors 2011-03-28 13:34:34 +0000
4@@ -40,6 +40,7 @@
5 Justin Santa Barbara <justin@fathomdb.com>
6 Kei Masumoto <masumotok@nttdata.co.jp>
7 Ken Pepple <ken.pepple@gmail.com>
8+Kevin Bringard <kbringard@attinteractive.com>
9 Kevin L. Mitchell <kevin.mitchell@rackspace.com>
10 Koji Iida <iida.koji@lab.ntt.co.jp>
11 Lorin Hochstein <lorin@isi.edu>
12
13=== modified file 'nova/network/linux_net.py'
14--- nova/network/linux_net.py 2011-03-24 18:51:38 +0000
15+++ nova/network/linux_net.py 2011-03-28 13:34:34 +0000
16@@ -59,13 +59,12 @@
17 'chain to add nova_input to')
18 flags.DEFINE_integer('dhcp_lease_time', 120,
19 'Lifetime of a DHCP lease')
20-
21 flags.DEFINE_string('dns_server', None,
22 'if set, uses specific dns server for dnsmasq')
23 flags.DEFINE_string('dmz_cidr', '10.128.0.0/24',
24 'dmz range that should be accepted')
25-
26-
27+flags.DEFINE_string('dnsmasq_config_file',"",
28+ 'Override the default dnsmasq settings with those in this file')
29 binary_name = os.path.basename(inspect.stack()[-1][1])
30
31
32@@ -672,7 +671,7 @@
33 cmd = ['sudo', '-E', 'dnsmasq',
34 '--strict-order',
35 '--bind-interfaces',
36- '--conf-file=',
37+ '--conf-file=%s' % FLAGS.dnsmasq_config_file,
38 '--domain=%s' % FLAGS.dhcp_domain,
39 '--pid-file=%s' % _dhcp_file(net['bridge'], 'pid'),
40 '--listen-address=%s' % net['gateway'],