diff --git a/chef/cookbooks/haproxy/attributes/default.rb b/chef/cookbooks/haproxy/attributes/default.rb index e062d54..091c3c8 100644 --- a/chef/cookbooks/haproxy/attributes/default.rb +++ b/chef/cookbooks/haproxy/attributes/default.rb @@ -79,7 +79,7 @@ default['haproxy']['source']['use_pcre'] = false default['haproxy']['source']['use_openssl'] = false default['haproxy']['source']['use_zlib'] = false -default['haproxy']['enable_services'] = [] +default['haproxy']['enabled_services'] = [] default['haproxy']['listeners'] = { 'listen' => {}, @@ -99,8 +99,8 @@ default['haproxy']['services'] = { "mode http", \ "option forwardfor", \ "option httpchk", \ - "option httpclose" - # "rspidel ^Set-cookie:\ IP=" + "option httpclose", \ + 'rspidel ^Set-cookie:\ IP=' ] }, "dashboard_https" => { diff --git a/chef/cookbooks/haproxy/recipes/tcp_lb.rb b/chef/cookbooks/haproxy/recipes/tcp_lb.rb index 74f797a..f31d02b 100644 --- a/chef/cookbooks/haproxy/recipes/tcp_lb.rb +++ b/chef/cookbooks/haproxy/recipes/tcp_lb.rb @@ -34,23 +34,24 @@ mydata = data_bag_item(defaultbag, myitem) if mydata['ha']['status'].eql?('enable') node.set['haproxy']['incoming_address'] = mydata['ha']['haproxy']['vip'] + + #services = node['haproxy']['enabled_services'].clone mydata['ha']['haproxy']['roles'].each do |role, services| services.each do |service| node.set['haproxy']['services'][service]['role'] = role - unless node['haproxy']['enable_services'].include?(service) - node.set['haproxy']['enable_services'] << service + unless node['haproxy']['enabled_services'].include?(service) + # node['haproxy']['enabled_services'] << service + node.set['haproxy']['enabled_services'] = node['haproxy']['enabled_services'] + [service] end end end end node['haproxy']['services'].each do |name, service| - unless node['haproxy']['enable_services'].include?(name) + unless node['haproxy']['enabled_services'].include?(name) next end - - pool_members = search("node", "role:#{service['role']} AND chef_environment:#{node.chef_environment}") || [] - + pool_members = search(:node, "run_list:role\\[#{service['role']}\\] AND chef_environment:#{node.chef_environment}") || [] # load balancer may be in the pool pool_members << node if node.run_list.roles.include?(service[:role]) diff --git a/chef/cookbooks/openstack-common/recipes/databag.rb b/chef/cookbooks/openstack-common/recipes/databag.rb index 0e4e66c..a3514b0 100644 --- a/chef/cookbooks/openstack-common/recipes/databag.rb +++ b/chef/cookbooks/openstack-common/recipes/databag.rb @@ -77,6 +77,12 @@ node['openstack']['services'].each_key do |service| end end +if mydata['ha']['status'].eql?('enable') + node.set["openstack"]["identity"]["bind_interface"] = mydata['networking']['control']['interface'] + node.set["openstack"]["image"]["api"]["bind_interface"] = mydata['networking']['control']['interface'] + node.set["openstack"]["image"]["registry"]["bind_interface"] = mydata['networking']['control']['interface'] + node.set["openstack"]["network"]["api"]["bind_interface"] = mydata['networking']['control']['interface'] +end # network plugins node.override["openstack"]["network"]["plugins"] = ['openvswitch', 'openvswitch-agent'] diff --git a/chef/cookbooks/openstack-dashboard/attributes/default.rb b/chef/cookbooks/openstack-dashboard/attributes/default.rb index aacb04b..eebb187 100644 --- a/chef/cookbooks/openstack-dashboard/attributes/default.rb +++ b/chef/cookbooks/openstack-dashboard/attributes/default.rb @@ -38,7 +38,7 @@ default["openstack"]["dashboard"]["keystone_default_role"] = "Member" default["openstack"]["dashboard"]["keystone_service_chef_role"] = "keystone" default["openstack"]["dashboard"]["server_hostname"] = nil -default["openstack"]["dashboard"]["use_ssl"] = true +default["openstack"]["dashboard"]["use_ssl"] = false default["openstack"]["dashboard"]["ssl"]["cert"] = "horizon.pem" default["openstack"]["dashboard"]["ssl"]["key"] = "horizon.key" diff --git a/chef/cookbooks/openstack-network/templates/default/quantum.conf.erb b/chef/cookbooks/openstack-network/templates/default/quantum.conf.erb index 4a98f68..19fafe7 100644 --- a/chef/cookbooks/openstack-network/templates/default/quantum.conf.erb +++ b/chef/cookbooks/openstack-network/templates/default/quantum.conf.erb @@ -36,8 +36,7 @@ log_config = /etc/openstack/logging.conf # publish_errors = False # Address to bind the API server -# bind_host = <%= @bind_address %> -bind_host = <%= node['openstack']['endpoints']['network-api']['host'] %> +bind_host = <%= @bind_address %> # Port the bind the API server to bind_port = <%= @bind_port %>