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#" },