From 59c8547ea4528e814dbad64784659d0de23c04b7 Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: Fri, 23 Nov 2012 12:12:51 +0000 Subject: [PATCH] nova-dhcpbridge should require the FLAGFILE is set We always launch dnsmasq with FLAGFILE set, so something is very broken if FLAGFILE isn't set when nova-dhcpbridge is launched. Also, the fallback to CONF.dhcpbridge_flagfile is a little strange - at this point, we haven't parsed any config files so the only possible value of this config option is its default value. There's no real need to gracefully handle this condition either - a KeyError is a straightforward enough error. Change-Id: I734d7b739f17c8a9ab48d8ba13baacff3f00e1c4 --- bin/nova-dhcpbridge | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/nova-dhcpbridge b/bin/nova-dhcpbridge index b3370e6e..1aaecc5b 100755 --- a/bin/nova-dhcpbridge +++ b/bin/nova-dhcpbridge @@ -95,8 +95,8 @@ def init_leases(network_id): def main(): """Parse environment and arguments and call the approproate action.""" - flagfile = os.environ.get('FLAGFILE', CONF.dhcpbridge_flagfile) - argv = config.parse_args(sys.argv, default_config_files=[flagfile]) + argv = config.parse_args(sys.argv, + default_config_files=[os.environ['FLAGFILE']]) logging.setup("nova") if int(os.environ.get('TESTING', '0')):