Merge "Debian: use the new nova-api-metadata service"
This commit is contained in:
@@ -118,6 +118,14 @@
|
|||||||
# to make nova be a web app using apache mod_wsgi.
|
# to make nova be a web app using apache mod_wsgi.
|
||||||
# Defaults to '$::nova::params::api_service_name'
|
# Defaults to '$::nova::params::api_service_name'
|
||||||
#
|
#
|
||||||
|
# [*metadata_service_name*]
|
||||||
|
# (optional) Name of the service that will be providing the
|
||||||
|
# server functionality of nova-api-meatadata.
|
||||||
|
# If the value is undef, no management of the service will be
|
||||||
|
# done by puppet. If the value is defined, and manage_service
|
||||||
|
# is set to true, the service will be managed by Puppet.
|
||||||
|
# Default to $::nova::params::api_metadata_service_name
|
||||||
|
#
|
||||||
# [*max_limit*]
|
# [*max_limit*]
|
||||||
# (optional) This option is limit the maximum number of items in a single response.
|
# (optional) This option is limit the maximum number of items in a single response.
|
||||||
# Defaults to $::os_service_default
|
# Defaults to $::os_service_default
|
||||||
@@ -199,6 +207,7 @@ class nova::api(
|
|||||||
$validation_options = {},
|
$validation_options = {},
|
||||||
$instance_name_template = undef,
|
$instance_name_template = undef,
|
||||||
$service_name = $::nova::params::api_service_name,
|
$service_name = $::nova::params::api_service_name,
|
||||||
|
$metadata_service_name = $::nova::params::api_metadata_service_name,
|
||||||
$enable_proxy_headers_parsing = $::os_service_default,
|
$enable_proxy_headers_parsing = $::os_service_default,
|
||||||
$max_request_body_size = $::os_service_default,
|
$max_request_body_size = $::os_service_default,
|
||||||
$max_limit = $::os_service_default,
|
$max_limit = $::os_service_default,
|
||||||
@@ -291,6 +300,16 @@ as a standalone service, or httpd for being run by a httpd server")
|
|||||||
service_name => $::nova::params::api_service_name,
|
service_name => $::nova::params::api_service_name,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $::nova::params::api_metadata_service_name {
|
||||||
|
nova::generic_service { 'api-metadata':
|
||||||
|
enabled => $service_enabled,
|
||||||
|
manage_service => $manage_service,
|
||||||
|
ensure_package => $ensure_package,
|
||||||
|
package_name => $::nova::params::api_package_name,
|
||||||
|
service_name => $::nova::params::api_metadata_service_name,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if !$nova_metadata_wsgi_enabled {
|
if !$nova_metadata_wsgi_enabled {
|
||||||
nova_config {
|
nova_config {
|
||||||
'DEFAULT/metadata_workers': value => $metadata_workers;
|
'DEFAULT/metadata_workers': value => $metadata_workers;
|
||||||
|
@@ -31,6 +31,7 @@ class nova::params {
|
|||||||
$genisoimage_package_name = 'genisoimage'
|
$genisoimage_package_name = 'genisoimage'
|
||||||
# service names
|
# service names
|
||||||
$api_service_name = 'openstack-nova-api'
|
$api_service_name = 'openstack-nova-api'
|
||||||
|
$api_metadata_service_name = undef
|
||||||
$compute_service_name = 'openstack-nova-compute'
|
$compute_service_name = 'openstack-nova-compute'
|
||||||
$conductor_service_name = 'openstack-nova-conductor'
|
$conductor_service_name = 'openstack-nova-conductor'
|
||||||
$libvirt_service_name = 'libvirtd'
|
$libvirt_service_name = 'libvirtd'
|
||||||
@@ -107,6 +108,7 @@ class nova::params {
|
|||||||
$lock_path = '/var/lock/nova'
|
$lock_path = '/var/lock/nova'
|
||||||
case $::os_package_type {
|
case $::os_package_type {
|
||||||
'debian': {
|
'debian': {
|
||||||
|
$api_metadata_service_name = 'nova-api-metadata'
|
||||||
$spicehtml5proxy_package_name = 'nova-consoleproxy'
|
$spicehtml5proxy_package_name = 'nova-consoleproxy'
|
||||||
$spicehtml5proxy_service_name = 'nova-spicehtml5proxy'
|
$spicehtml5proxy_service_name = 'nova-spicehtml5proxy'
|
||||||
$vncproxy_package_name = 'nova-consoleproxy'
|
$vncproxy_package_name = 'nova-consoleproxy'
|
||||||
@@ -117,6 +119,7 @@ class nova::params {
|
|||||||
$virtlog_service_name = 'virtlogd'
|
$virtlog_service_name = 'virtlogd'
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
|
$api_metadata_service_name = undef
|
||||||
$spicehtml5proxy_package_name = 'nova-spiceproxy'
|
$spicehtml5proxy_package_name = 'nova-spiceproxy'
|
||||||
$spicehtml5proxy_service_name = 'nova-spiceproxy'
|
$spicehtml5proxy_service_name = 'nova-spiceproxy'
|
||||||
$vncproxy_package_name = 'nova-novncproxy'
|
$vncproxy_package_name = 'nova-novncproxy'
|
||||||
|
@@ -325,6 +325,18 @@ describe 'nova::api' do
|
|||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
shared_examples 'nova-api on Debian' do
|
||||||
|
context 'with default parameters' do
|
||||||
|
it { is_expected.to contain_service('nova-api- metadata').with(
|
||||||
|
:name => 'nova-api-metadata',
|
||||||
|
:ensure => 'running',
|
||||||
|
:hasstatus => true,
|
||||||
|
:enable => true,
|
||||||
|
:tag => 'nova-service',
|
||||||
|
)}
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
on_supported_os({
|
on_supported_os({
|
||||||
:supported_os => OSDefaults.get_supported_os
|
:supported_os => OSDefaults.get_supported_os
|
||||||
}).each do |os,facts|
|
}).each do |os,facts|
|
||||||
@@ -344,6 +356,9 @@ describe 'nova::api' do
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
it_behaves_like 'nova-api'
|
it_behaves_like 'nova-api'
|
||||||
|
if facts[:os_package_type] == 'debian'
|
||||||
|
it_behaves_like 'nova-api on Debian'
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user