remove default value of local_ip in OVS agent

fixes bug 1051744

Remove the default value for local_ip in the OVS agent config.

Change-Id: Ie23ba8510c0cf5c17443c805e0befce6eccb253c
This commit is contained in:
Mark McClain 2012-09-17 17:28:00 -04:00
parent 5843dcc79f
commit 0a9e79a15e
3 changed files with 6 additions and 2 deletions

View File

@ -64,7 +64,7 @@ reconnect_interval = 2
# empty for the server. Set local-ip to be the local IP address of # empty for the server. Set local-ip to be the local IP address of
# this hypervisor. # this hypervisor.
# #
# Default: local_ip = 10.0.0.3 # Default: local_ip =
# (ListOpt) Comma-separated list of <physical_network>:<bridge> tuples # (ListOpt) Comma-separated list of <physical_network>:<bridge> tuples
# mapping physical network names to the agent's node-specific OVS # mapping physical network names to the agent's node-specific OVS

View File

@ -802,6 +802,10 @@ def main():
local_ip = cfg.CONF.OVS.local_ip local_ip = cfg.CONF.OVS.local_ip
enable_tunneling = cfg.CONF.OVS.enable_tunneling enable_tunneling = cfg.CONF.OVS.enable_tunneling
if enable_tunneling and not local_ip:
LOG.error("Invalid local_ip. (%s)" % repr(local_ip))
sys.exit(1)
bridge_mappings = {} bridge_mappings = {}
for mapping in cfg.CONF.OVS.bridge_mappings: for mapping in cfg.CONF.OVS.bridge_mappings:
mapping = mapping.strip() mapping = mapping.strip()

View File

@ -31,7 +31,7 @@ ovs_opts = [
cfg.StrOpt('integration_bridge', default='br-int'), cfg.StrOpt('integration_bridge', default='br-int'),
cfg.BoolOpt('enable_tunneling', default=False), cfg.BoolOpt('enable_tunneling', default=False),
cfg.StrOpt('tunnel_bridge', default='br-tun'), cfg.StrOpt('tunnel_bridge', default='br-tun'),
cfg.StrOpt('local_ip', default='10.0.0.3'), cfg.StrOpt('local_ip', default=''),
cfg.ListOpt('bridge_mappings', cfg.ListOpt('bridge_mappings',
default=DEFAULT_BRIDGE_MAPPINGS, default=DEFAULT_BRIDGE_MAPPINGS,
help="List of <physical_network>:<bridge>"), help="List of <physical_network>:<bridge>"),