From: Mark McClain Date: Mon, 17 Sep 2012 21:28:00 +0000 (-0400) Subject: remove default value of local_ip in OVS agent X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=314fa62ac1989382decdb5372626e0630b8c5e19;p=openstack-build%2Fneutron-build.git 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 --- diff --git a/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini b/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini index 3b1e84489..4b46a8316 100644 --- a/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini +++ b/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini @@ -64,7 +64,7 @@ reconnect_interval = 2 # empty for the server. Set local-ip to be the local IP address of # this hypervisor. # -# Default: local_ip = 10.0.0.3 +# Default: local_ip = # (ListOpt) Comma-separated list of : tuples # mapping physical network names to the agent's node-specific OVS diff --git a/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py b/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py index c488e8240..da03ea673 100755 --- a/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py +++ b/quantum/plugins/openvswitch/agent/ovs_quantum_agent.py @@ -802,6 +802,10 @@ def main(): local_ip = cfg.CONF.OVS.local_ip 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 = {} for mapping in cfg.CONF.OVS.bridge_mappings: mapping = mapping.strip() diff --git a/quantum/plugins/openvswitch/common/config.py b/quantum/plugins/openvswitch/common/config.py index 61be65a78..5de151acb 100644 --- a/quantum/plugins/openvswitch/common/config.py +++ b/quantum/plugins/openvswitch/common/config.py @@ -31,7 +31,7 @@ ovs_opts = [ cfg.StrOpt('integration_bridge', default='br-int'), cfg.BoolOpt('enable_tunneling', default=False), 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', default=DEFAULT_BRIDGE_MAPPINGS, help="List of :"),