From 3b18b981c5f2838d31c2fac6435110f16ea84749 Mon Sep 17 00:00:00 2001 From: jjhua Date: Tue, 12 Nov 2013 15:31:50 -0500 Subject: [PATCH] fixed bug3890. When there are two interfaces(pubinterface and mgtinterface) on the controller node, There are something wrong with the cookbooks. fixed it --- .../cookbooks/openstack-network/recipes/common.rb | 13 +++++++++---- ...per-tenant_routers_with_private_networks.rb.tmpl | 1 + 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/xCAT-OpenStack/chef-cookbooks/grizzly-xcat/cookbooks/openstack-network/recipes/common.rb b/xCAT-OpenStack/chef-cookbooks/grizzly-xcat/cookbooks/openstack-network/recipes/common.rb index df6365721..8e70e4f77 100644 --- a/xCAT-OpenStack/chef-cookbooks/grizzly-xcat/cookbooks/openstack-network/recipes/common.rb +++ b/xCAT-OpenStack/chef-cookbooks/grizzly-xcat/cookbooks/openstack-network/recipes/common.rb @@ -120,11 +120,16 @@ else bind_port = node["openstack"]["network"]["api"]["bind_port"] end -# retrieve the local interface for tunnels -if node["openstack"]["network"]["openvswitch"]["local_ip_interface"].nil? - local_ip = node["openstack"]["network"]["openvswitch"]["local_ip"] +network_server_role = node["openstack"]["network"]["network_server_chef_role"] +if node.run_list.roles.include?(network_server_role) + local_ip="{}" else - local_ip = address_for node["openstack"]["network"]["openvswitch"]["local_ip_interface"] + # retrieve the local interface for tunnels + if node["openstack"]["network"]["openvswitch"]["local_ip_interface"].nil? + local_ip = node["openstack"]["network"]["openvswitch"]["local_ip"] + else + local_ip = address_for node["openstack"]["network"]["openvswitch"]["local_ip_interface"] + end end platform_options["quantum_client_packages"].each do |pkg| diff --git a/xCAT-OpenStack/templates/cloud_environment/grizzly_per-tenant_routers_with_private_networks.rb.tmpl b/xCAT-OpenStack/templates/cloud_environment/grizzly_per-tenant_routers_with_private_networks.rb.tmpl index 6fe05cf34..ab096a6a0 100644 --- a/xCAT-OpenStack/templates/cloud_environment/grizzly_per-tenant_routers_with_private_networks.rb.tmpl +++ b/xCAT-OpenStack/templates/cloud_environment/grizzly_per-tenant_routers_with_private_networks.rb.tmpl @@ -109,6 +109,7 @@ override_attributes( "use_ssl" => "false" }, "network" => { + "network_server_chef_role" => "os-single-controller", "metadata"=>{ "nova_metadata_ip"=>"#TABLE:clouds:name=$CLOUD:hostip#" },