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
This commit is contained in:
Mark McLoughlin
2012年11月23日 12:12:51 +00:00
parent 2e1ff2e725
commit d3c68d6e63

View File

@@ -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')):
Reference in New Issue
openstack/nova
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.

The note is not visible to the blocked user.