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

Proposed by Kevin Bringard
Status: Merged
Approved by: Josh Kearney
Approved revision: 895
Merged at revision: 1048
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
Josh Kearney (community) Approve
John Dewey (community) Approve
termie (community) Approve
Thierry Carrez ffe Pending
Review via email: mp+57889@code.launchpad.net

This proposal supersedes a proposal from 2011-03-25.

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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)
Revision history for this message
Kevin Bringard (kbringard) wrote : Posted in a previous version of this proposal

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 : Posted in a previous version of this proposal

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.

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

Reproposed for merging into diablo

Revision history for this message
termie (termie) wrote :

lgtm

review: Approve
Revision history for this message
John Dewey (retr0h) wrote :

A useful feature. Implementation looks good.

+lgtm

review: Approve
Revision history for this message
Josh Kearney (jk0) wrote :

lgtm

review: Approve
Revision history for this message
OpenStack Infra (hudson-openstack) wrote :
Download full text (48.5 KiB)

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

AccountsTest
    test_account_create OK
    test_account_delete OK
    test_account_update OK
    test_get_account OK
AdminAPITest
    test_admin_disabled OK
    test_admin_enabled OK
APITest
    test_exceptions_are_converted_to_faults OK
Test
    test_authorize_token OK
    test_authorize_user OK
    test_bad_token OK
    test_bad_user_bad_key OK
    test_bad_user_good_key OK
    test_no_user OK
    test_token_expiry OK
TestFunctional
    test_token_doesnotexist OK
    test_token_expiry OK
TestLimiter
    test_authorize_token OK
LimiterTest
    test_limiter_custom_max_limit OK
    test_limiter_limit_and_offset OK
    test_limiter_limit_medium OK
    test_limiter_limit_over_max OK
    test_limiter_limit_zero OK
    test_limiter_negative_limit OK
    test_limiter_negative_offset OK
    test_limiter_nothing OK
    test_limiter_offset_bad OK
    test_limiter_offset_blank OK
    test_limiter_offset_medium OK
    test_limiter_offset_over_max OK
    test_limiter_offset_zero OK
ActionExtensionTest
    test_extended_action OK
    test_invalid_action OK
    test_invalid_action_body OK
ExtensionControllerTest
    test_get_by_alias OK
    test_index OK
ExtensionManagerTest
    test_get_resources OK
ResourceExtensionTest
    test_get_resources OK
    test_get_resources_with_controller OK
    test_no_extension_present OK
ResponseExtensionTest
    test_get_resources_with_mgr OK
    test_get_resources_with_stub_mgr OK
TestFaults
    test_400_fault_json OK
    test_400_fault_xml OK
    tes...

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

I'm updating the long line at the moment to be < 79 characters. I'll push a new version of the branch momentarily.

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

Fixed 2 lines to allow pep8 check to pass

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Authors'
2--- Authors 2011-05-02 19:21:40 +0000
3+++ Authors 2011-05-02 19:24:31 +0000
4@@ -46,6 +46,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-04-08 01:44:41 +0000
15+++ nova/network/linux_net.py 2011-05-02 19:24:31 +0000
16@@ -56,13 +56,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 this file')
29 binary_name = os.path.basename(inspect.stack()[-1][1])
30
31
32@@ -678,7 +677,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'],