From d3c68d6e63fd26a96a6d50c6bdb4ba479bacabfb Mon Sep 17 00:00:00 2001 From: Mark McLoughlin Date: 2012年11月23日 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 b3370e6ebf6f..1aaecc5b7ab4 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')):

AltStyle によって変換されたページ (->オリジナル) /