Add osapi_compute_link_prefix to nova.conf
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.
This commit is contained in:
@@ -131,7 +131,8 @@ template "/etc/nova/nova.conf" do
|
||||
: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
|
||||
|
||||
|
||||
@@ -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"] %>
|
||||
|
||||
Reference in New Issue
Block a user