Fix config-file overrides for nova-dhcpbridge

nova-dhcpbridge can read in an alternate config file location but wasn't
using it to parse config options.  This fixes a regression introduced in
00786bc554.

This change is motivated by the fact that nova-dhcpbridge is passed to
dnsmasq in restart_dhcp() in nova/network/linux_net.py, and there is
currently no support for overriding config options for nova-dhcpbridge
in that call.  There is support for overriding the FLAGFILE env variable
in that call, but nova-dhcpbridge was ignoring that.  If I start
nova-network with an alternate config this provides a way for me to pass
that config to nova-dhcpbridge as well.

Change-Id: I002ea768500555a089bd1d5b0fea2354b27fba14
(cherry picked from commit ae0a0d5435)
This commit is contained in:
Andrew Laski 2012-10-25 23:26:03 -04:00 committed by Vishvananda Ishaya
parent 197398fdf6
commit 48a3521085

View File

@ -96,7 +96,7 @@ def init_leases(network_id):
def main():
"""Parse environment and arguments and call the approproate action."""
flagfile = os.environ.get('FLAGFILE', FLAGS.dhcpbridge_flagfile)
argv = flags.parse_args(sys.argv)
argv = flags.parse_args(sys.argv, default_config_files=[flagfile])
logging.setup("nova")
if int(os.environ.get('TESTING', '0')):