From 8d68ed3583df6ced4b4c8b6d6bb3569e03992cfe Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Wed, 27 Mar 2013 13:29:15 -0400 Subject: always quote dhcp-domain, otherwise dnsmasq can fail to start the dnsmasq arg --dhcp-domain can't be passed to dnsmasq as empty (i.e. --dhcp-domain= ) unlike many other arguments. If you do pass it as empty, dnsmasq won't start, throwing a ProcessException which then crashes the rest of nova-network. Fix this by quoting dhcp-domain so that empty domains are allowed. Fixed bug #1161027 This was found by grenade upgrade testing Change-Id: Id24814339d8c8a709f5041f0aa98b10ba1e0e595 --- nova/network/linux_net.py | 2 +- nova/tests/network/test_linux_net.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'nova') diff --git a/nova/network/linux_net.py b/nova/network/linux_net.py index 8d65b2c36..6230f8387 100644 --- a/nova/network/linux_net.py +++ b/nova/network/linux_net.py @@ -1015,7 +1015,7 @@ def restart_dhcp(context, dev, network_ref): '--strict-order', '--bind-interfaces', '--conf-file=%s' % CONF.dnsmasq_config_file, - '--domain=%s' % CONF.dhcp_domain, + '--domain=\'%s\'' % CONF.dhcp_domain, '--pid-file=%s' % _dhcp_file(dev, 'pid'), '--listen-address=%s' % network_ref['dhcp_server'], '--except-interface=lo', diff --git a/nova/tests/network/test_linux_net.py b/nova/tests/network/test_linux_net.py index 6aea1c93b..6c25741a6 100644 --- a/nova/tests/network/test_linux_net.py +++ b/nova/tests/network/test_linux_net.py @@ -503,7 +503,7 @@ class LinuxNetworkTestCase(test.TestCase): '--strict-order', '--bind-interfaces', '--conf-file=%s' % CONF.dnsmasq_config_file, - '--domain=%s' % CONF.dhcp_domain, + '--domain=\'%s\'' % CONF.dhcp_domain, '--pid-file=%s' % linux_net._dhcp_file(dev, 'pid'), '--listen-address=%s' % network_ref['dhcp_server'], '--except-interface=lo', -- cgit