From f335ef85b75be5f92f7e9db591f6b174c510c145 Mon Sep 17 00:00:00 2001 From: "grace.yu" Date: Tue, 16 Sep 2014 11:12:31 -0700 Subject: [PATCH] fix openstack instance cannot get IP from dhcp Change-Id: I073918d34aa99437f964c4ed135f10cf6808b745 --- chef/cookbooks/openstack-network/attributes/default.rb | 5 +++++ chef/cookbooks/openstack-network/recipes/openvswitch.rb | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/chef/cookbooks/openstack-network/attributes/default.rb b/chef/cookbooks/openstack-network/attributes/default.rb index e7ddd97..579e27e 100644 --- a/chef/cookbooks/openstack-network/attributes/default.rb +++ b/chef/cookbooks/openstack-network/attributes/default.rb @@ -448,6 +448,11 @@ default['openstack']['network']['openvswitch']['fw_driver'] = 'neutron.agent.lin # It should be false when you use nova security group. default['openstack']['network']['openvswitch']['enable_security_group'] = 'True' +# OVS host for GRE tunnel. If bind_interface is set, it will set the host IP of +# this interface, otherwise use default host. +default['openstack']['network']['openvswitch']['host'] = '127.0.0.1' +default['openstack']['network']['openvswitch']['bind_interface'] = nil + # The newest version of OVS which comes with 12.04 Precise is 1.4.0 # Which is legacy. Should we compile a newer version from source? # If so, set ['openstack']['network']['openvswitch']['use_source_version'] diff --git a/chef/cookbooks/openstack-network/recipes/openvswitch.rb b/chef/cookbooks/openstack-network/recipes/openvswitch.rb index 0584a83..99d511f 100644 --- a/chef/cookbooks/openstack-network/recipes/openvswitch.rb +++ b/chef/cookbooks/openstack-network/recipes/openvswitch.rb @@ -105,14 +105,14 @@ directory '/etc/neutron/plugins/openvswitch' do only_if { platform_family?('rhel') } end -openvswitch_endpoint = endpoint 'network-openvswitch' +openvswitch = address node['openstack']['network']['openvswitch'] template '/etc/neutron/plugins/openvswitch/ovs_neutron_plugin.ini' do source 'plugins/openvswitch/ovs_neutron_plugin.ini.erb' owner node['openstack']['network']['platform']['user'] group node['openstack']['network']['platform']['group'] mode 00644 variables( - local_ip: openvswitch_endpoint.host + local_ip: openvswitch ) only_if { platform_family?('rhel') } end