Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Add osapi_compute_link_prefix to nova.conf
Browse files Browse the repository at this point in the history
When a load balancer is used to terminate SSL, it generally
strips the https:// from the HTTP_HOST header and changes it
to http://. This is used by webob.Request as the request_url
that is then used by default when constructing link collections
in the OpenStack Compute API. Setting the osapi_compute_link_prefix
configuration option allows us to override the URI returned to
match the original compute endpoint URI.
  • Loading branch information
jaypipes committed May 13, 2013
1 parent b60a3fa commit a8c79c8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion recipes/nova-common.rb
Expand Up @@ -131,7 +131,8 @@ class ::Chef::Recipe
:glance_api_ipaddress => image_endpoint.host,
:glance_api_port => image_endpoint.port,
:iscsi_helper => platform_options["iscsi_helper"],
:scheduler_default_filters => node["nova"]["scheduler"]["default_filters"].join(",")
:scheduler_default_filters => node["nova"]["scheduler"]["default_filters"].join(","),
:osapi_compute_link_prefix => nova_api_endpoint.to_s
)
end

Expand Down
6 changes: 6 additions & 0 deletions templates/default/nova.conf.erb
Expand Up @@ -98,6 +98,12 @@ memcached_servers=<%= @memcache_servers %>
force_raw_images=<%= node["nova"]["config"]["force_raw_images"] %>
allow_same_net_traffic=<%= node["nova"]["config"]["allow_same_net_traffic"] %>
osapi_max_limit=<%= node["nova"]["config"]["osapi_max_limit"] %>
# If you terminate SSL with a load balancer, the HTTP_HOST environ
# variable that generates the request_uri in webob.Request will lack
# the HTTPS scheme. Setting this overrides the default and allows
# URIs returned in the various links collections to contain the proper
# HTTPS endpoint.
osapi_compute_link_prefix = <%= @osapi_compute_link_prefix %>
snapshot_image_format=<%= node["nova"]["config"]["snapshot_image_format"] %>
start_guests_on_host_boot=<%= node["nova"]["config"]["start_guests_on_host_boot"] %>
resume_guests_state_on_host_boot=<%= node["nova"]["config"]["resume_guests_state_on_host_boot"] %>
Expand Down

0 comments on commit a8c79c8

Please sign in to comment.