Enable oslo.messaging debug for OpenStack components
We should have oslo.messaging debug enabled when OpenStack log debug is set to true. Make default_log_levels configurable through globals.yaml. NOTE: sahara::logging class can't be used because of https://github.com/openstack/puppet-sahara/blob/master/manifests/init.pp#L371 It leads to duplicate declaration of this class. That's why default_log_levels parameter for sahara::logging is configured through globals.yaml. After new puppet modules sync with upstream we will get the same problem for another openstack components. It will be fixed in the way as it's done for sahara now. Closes-bug: #1509090 Change-Id: Ia8665eaf526158760a5420e7813c7367cc457c0c
This commit is contained in:
parent
0fd237418e
commit
9bb09a21bb
|
@ -16,6 +16,7 @@ class openstack::ceilometer (
|
|||
$use_syslog = false,
|
||||
$use_stderr = true,
|
||||
$syslog_log_facility = 'LOG_LOCAL0',
|
||||
$default_log_levels = undef,
|
||||
$debug = false,
|
||||
$db_type = 'mysql',
|
||||
$db_host = 'localhost',
|
||||
|
@ -61,6 +62,13 @@ class openstack::ceilometer (
|
|||
log_facility => $syslog_log_facility,
|
||||
}
|
||||
|
||||
# TODO (iberezovskiy): Move to globals (as it is done for sahara)
|
||||
# after new sync with upstream because of
|
||||
# https://github.com/openstack/puppet-ceilometer/blob/master/manifests/init.pp#L160
|
||||
class { '::ceilometer::logging':
|
||||
default_log_levels => $default_log_levels,
|
||||
}
|
||||
|
||||
# Configure authentication for agents
|
||||
class { '::ceilometer::agent::auth':
|
||||
auth_url => "http://${keystone_host}:5000/v2.0",
|
||||
|
|
|
@ -30,6 +30,7 @@ class openstack::cinder(
|
|||
$cinder_rate_limits = undef,
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$default_log_levels = undef,
|
||||
$idle_timeout = '3600',
|
||||
$max_pool_size = '10',
|
||||
$max_overflow = '30',
|
||||
|
@ -113,6 +114,13 @@ class openstack::cinder(
|
|||
database_max_overflow => $max_overflow,
|
||||
control_exchange => 'cinder',
|
||||
}
|
||||
|
||||
# TODO (iberezovskiy): Move to globals (as it is done for sahara)
|
||||
# after new sync with upstream because of
|
||||
# https://github.com/openstack/puppet-cinder/blob/master/manifests/init.pp#L299
|
||||
class { '::cinder::logging':
|
||||
default_log_levels => $default_log_levels,
|
||||
}
|
||||
cinder_config {
|
||||
'DEFAULT/kombu_reconnect_delay': value => '5.0';
|
||||
}
|
||||
|
|
|
@ -172,6 +172,7 @@ class openstack::controller (
|
|||
# General
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$default_log_levels = undef,
|
||||
$service_workers = $::processorcount,
|
||||
$export_resources = true,
|
||||
# if the cinder management components should be installed
|
||||
|
@ -302,6 +303,7 @@ class openstack::controller (
|
|||
verbose => $verbose,
|
||||
primary_controller => $primary_controller,
|
||||
debug => $debug,
|
||||
default_log_levels => $default_log_levels,
|
||||
enabled => $enabled,
|
||||
exported_resources => $export_resources,
|
||||
enabled_apis => $enabled_apis,
|
||||
|
|
|
@ -61,6 +61,7 @@ class openstack::glance (
|
|||
$glance_vcenter_api_retry_count = undef,
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$default_log_levels = undef,
|
||||
$enabled = true,
|
||||
$use_syslog = false,
|
||||
$use_stderr = true,
|
||||
|
@ -131,6 +132,29 @@ class openstack::glance (
|
|||
os_region_name => $region,
|
||||
}
|
||||
|
||||
# TODO (iberezovskiy): Move to globals (as it is done for sahara)
|
||||
# after new sync with upstream because of
|
||||
# https://github.com/openstack/puppet-glance/blob/master/manifests/api.pp#L237
|
||||
# https://github.com/openstack/puppet-glance/blob/master/manifests/registry.pp#L166
|
||||
if $default_log_levels {
|
||||
glance_api_config {
|
||||
'DEFAULT/default_log_levels' :
|
||||
value => join(sort(join_keys_to_values($default_log_levels, '=')), ',');
|
||||
}
|
||||
glance_registry_config {
|
||||
'DEFAULT/default_log_levels' :
|
||||
value => join(sort(join_keys_to_values($default_log_levels, '=')), ',');
|
||||
}
|
||||
} else {
|
||||
glance_api_config {
|
||||
'DEFAULT/default_log_levels' : ensure => absent;
|
||||
}
|
||||
glance_registry_config {
|
||||
'DEFAULT/default_log_levels' : ensure => absent;
|
||||
}
|
||||
}
|
||||
#
|
||||
|
||||
glance_api_config {
|
||||
'database/max_pool_size': value => $max_pool_size;
|
||||
'database/max_retries': value => $max_retries;
|
||||
|
|
|
@ -40,6 +40,7 @@ class openstack::heat (
|
|||
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$default_log_levels = undef,
|
||||
$use_syslog = false,
|
||||
$use_stderr = true,
|
||||
$syslog_log_facility = 'LOG_LOCAL0',
|
||||
|
@ -154,6 +155,13 @@ class openstack::heat (
|
|||
log_facility => $syslog_log_facility,
|
||||
}
|
||||
|
||||
# TODO (iberezovskiy): Move to globals (as it is done for sahara)
|
||||
# after new sync with upstream because of
|
||||
# https://github.com/openstack/puppet-heat/blob/master/manifests/init.pp#L305
|
||||
class { '::heat::logging':
|
||||
default_log_levels => $default_log_levels,
|
||||
}
|
||||
|
||||
heat_config {
|
||||
'DEFAULT/max_template_size': value => '5440000';
|
||||
'DEFAULT/max_json_body_size': value => '10880000';
|
||||
|
|
|
@ -53,6 +53,7 @@ class openstack::keystone (
|
|||
$db_name = 'keystone',
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$default_log_levels = undef,
|
||||
$public_bind_host = '0.0.0.0',
|
||||
$admin_bind_host = '0.0.0.0',
|
||||
$internal_address = false,
|
||||
|
@ -175,6 +176,13 @@ class openstack::keystone (
|
|||
memcache_pool_unused_timeout => '60',
|
||||
}
|
||||
|
||||
# TODO (iberezovskiy): Move to globals (as it is done for sahara)
|
||||
# after new sync with upstream because of
|
||||
# https://github.com/openstack/puppet-keystone/blob/master/manifests/init.pp#L564
|
||||
class { '::keystone::logging':
|
||||
default_log_levels => $default_log_levels,
|
||||
}
|
||||
|
||||
Package<| title == 'keystone'|> ~> Service<| title == 'keystone'|>
|
||||
if !defined(Service['keystone']) {
|
||||
notify{ "Module ${module_name} cannot notify service keystone on package update": }
|
||||
|
|
|
@ -81,6 +81,7 @@ class openstack::nova::controller (
|
|||
$cache_server_port = '11211',
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$default_log_levels = undef,
|
||||
$enabled = true,
|
||||
$exported_resources = true,
|
||||
$nameservers = undef,
|
||||
|
@ -248,6 +249,13 @@ class openstack::nova::controller (
|
|||
memcached_servers => $memcached_addresses,
|
||||
}
|
||||
|
||||
# TODO (iberezovskiy): Move to globals (as it is done for sahara)
|
||||
# after new sync with upstream because of
|
||||
# https://github.com/openstack/puppet-nova/blob/master/manifests/init.pp#L412
|
||||
class { '::nova::logging':
|
||||
default_log_levels => $default_log_levels,
|
||||
}
|
||||
|
||||
#NOTE(bogdando) exec update-kombu is always undef, so delete?
|
||||
if (defined(Exec['update-kombu']))
|
||||
{
|
||||
|
|
|
@ -27,11 +27,13 @@ $ceilometer_user_password = $ceilometer_hash['user_password']
|
|||
$ceilometer_metering_secret = $ceilometer_hash['metering_secret']
|
||||
$verbose = pick($ceilometer_hash['verbose'], hiera('verbose', true))
|
||||
$debug = pick($ceilometer_hash['debug'], hiera('debug', false))
|
||||
$default_log_levels = hiera_hash('default_log_levels')
|
||||
|
||||
if ($ceilometer_enabled) {
|
||||
class { 'openstack::ceilometer':
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
default_log_levels => $default_log_levels,
|
||||
use_syslog => $use_syslog,
|
||||
use_stderr => $use_stderr,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
|
|
|
@ -13,6 +13,7 @@ $default_ceilometer_hash = {
|
|||
$ceilometer_hash = hiera_hash('ceilometer', $default_ceilometer_hash)
|
||||
$verbose = pick($ceilometer_hash['verbose'], hiera('verbose', true))
|
||||
$debug = pick($ceilometer_hash['debug'], hiera('debug', false))
|
||||
$default_log_levels = hiera_hash('default_log_levels')
|
||||
$use_syslog = hiera('use_syslog', true)
|
||||
$use_stderr = hiera('use_stderr', false)
|
||||
$syslog_log_facility = hiera('syslog_log_facility_ceilometer', 'LOG_LOCAL0')
|
||||
|
@ -83,6 +84,7 @@ if ($ceilometer_enabled) {
|
|||
use_syslog => $use_syslog,
|
||||
use_stderr => $use_stderr,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
default_log_levels => $default_log_levels,
|
||||
db_type => $ceilometer_db_type,
|
||||
db_host => $mongo_hosts,
|
||||
db_user => $ceilometer_db_user,
|
||||
|
|
|
@ -22,6 +22,8 @@ $region = hiera('region','RegionOne')
|
|||
$glance_endpoint = $management_vip
|
||||
$service_workers = pick($glance_hash['glance_workers'], min(max($::processorcount, 2), 16))
|
||||
|
||||
$default_log_levels = hiera_hash('default_log_levels')
|
||||
|
||||
$db_type = 'mysql'
|
||||
$db_host = pick($glance_hash['db_host'], $database_vip)
|
||||
$api_bind_address = get_network_role_property('glance/api', 'ipaddr')
|
||||
|
@ -74,6 +76,7 @@ if ($storage_hash['images_ceph']) {
|
|||
class { 'openstack::glance':
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
default_log_levels => $default_log_levels,
|
||||
db_type => $db_type,
|
||||
db_host => $db_host,
|
||||
glance_db_user => $glance_db_user,
|
||||
|
|
|
@ -74,6 +74,50 @@ $apache_ports = hiera_array('apache_ports', ['80', '8888', '50
|
|||
|
||||
$token_provider = hiera('token_provider','keystone.token.providers.fernet.Provider')
|
||||
|
||||
if $debug {
|
||||
$default_log_levels = {
|
||||
'amqp' => 'WARN',
|
||||
'amqplib' => 'WARN',
|
||||
'boto' => 'WARN',
|
||||
'qpid' => 'WARN',
|
||||
'sqlalchemy' => 'WARN',
|
||||
'suds' => 'INFO',
|
||||
'oslo_messaging' => 'DEBUG',
|
||||
'oslo.messaging' => 'DEBUG',
|
||||
'iso8601' => 'WARN',
|
||||
'requests.packages.urllib3.connectionpool' => 'WARN',
|
||||
'urllib3.connectionpool' => 'WARN',
|
||||
'websocket' => 'WARN',
|
||||
'requests.packages.urllib3.util.retry' => 'WARN',
|
||||
'urllib3.util.retry' => 'WARN',
|
||||
'keystonemiddleware' => 'WARN',
|
||||
'routes.middleware' => 'WARN',
|
||||
'stevedore' => 'WARN',
|
||||
'taskflow' => 'WARN'
|
||||
}
|
||||
} else {
|
||||
$default_log_levels = {
|
||||
'amqp' => 'WARN',
|
||||
'amqplib' => 'WARN',
|
||||
'boto' => 'WARN',
|
||||
'qpid' => 'WARN',
|
||||
'sqlalchemy' => 'WARN',
|
||||
'suds' => 'INFO',
|
||||
'oslo_messaging' => 'INFO',
|
||||
'oslo.messaging' => 'INFO',
|
||||
'iso8601' => 'WARN',
|
||||
'requests.packages.urllib3.connectionpool' => 'WARN',
|
||||
'urllib3.connectionpool' => 'WARN',
|
||||
'websocket' => 'WARN',
|
||||
'requests.packages.urllib3.util.retry' => 'WARN',
|
||||
'urllib3.util.retry' => 'WARN',
|
||||
'keystonemiddleware' => 'WARN',
|
||||
'routes.middleware' => 'WARN',
|
||||
'stevedore' => 'WARN',
|
||||
'taskflow' => 'WARN'
|
||||
}
|
||||
}
|
||||
|
||||
$openstack_version = hiera('openstack_version',
|
||||
{
|
||||
'keystone' => 'installed',
|
||||
|
|
|
@ -11,6 +11,7 @@ $idle_timeout = hiera('idle_timeout')
|
|||
$service_endpoint = hiera('service_endpoint')
|
||||
$debug = pick($heat_hash['debug'], hiera('debug', false))
|
||||
$verbose = pick($heat_hash['verbose'], hiera('verbose', true))
|
||||
$default_log_levels = hiera_hash('default_log_levels')
|
||||
$use_stderr = hiera('use_stderr', false)
|
||||
$use_syslog = hiera('use_syslog', true)
|
||||
$syslog_log_facility_heat = hiera('syslog_log_facility_heat')
|
||||
|
@ -87,6 +88,7 @@ class { 'openstack::heat' :
|
|||
idle_timeout => $idle_timeout,
|
||||
debug => $debug,
|
||||
verbose => $verbose,
|
||||
default_log_levels => $default_log_levels,
|
||||
use_syslog => $use_syslog,
|
||||
use_stderr => $use_stderr,
|
||||
syslog_log_facility => $syslog_log_facility_heat,
|
||||
|
|
|
@ -12,6 +12,7 @@ $neutron_endpoint = hiera('neutron_endpoint', $management_vip)
|
|||
$glance_api_servers = hiera('glance_api_servers', "${management_vip}:9292")
|
||||
$debug = hiera('debug', false)
|
||||
$verbose = hiera('verbose', true)
|
||||
$default_log_levels = hiera_hash('default_log_levels')
|
||||
$use_syslog = hiera('use_syslog', true)
|
||||
$syslog_log_facility_ironic = hiera('syslog_log_facility_ironic', 'LOG_USER')
|
||||
$rabbit_hash = hiera_hash('rabbit_hash', {})
|
||||
|
@ -49,6 +50,21 @@ class { 'ironic':
|
|||
glance_api_servers => $glance_api_servers,
|
||||
}
|
||||
|
||||
# TODO (iberezovskiy): Move to globals (as it is done for sahara)
|
||||
# after new sync with upstream because of
|
||||
# https://github.com/openstack/puppet-ironic/blob/master/manifests/init.pp#L261
|
||||
if $default_log_levels {
|
||||
ironic_config {
|
||||
'DEFAULT/default_log_levels' :
|
||||
value => join(sort(join_keys_to_values($default_log_levels, '=')), ',');
|
||||
}
|
||||
} else {
|
||||
ironic_config {
|
||||
'DEFAULT/default_log_levels' : ensure => absent;
|
||||
}
|
||||
}
|
||||
#
|
||||
|
||||
class { 'ironic::client': }
|
||||
|
||||
class { 'ironic::api':
|
||||
|
|
|
@ -26,6 +26,7 @@ $rabbit_hash = hiera_hash('rabbit_hash', {})
|
|||
$neutron_user_password = hiera('neutron_user_password', false)
|
||||
$service_workers = pick($keystone_hash['workers'],
|
||||
min(max($::processorcount, 2), 16))
|
||||
$default_log_levels = hiera_hash('default_log_levels')
|
||||
|
||||
$db_type = 'mysql'
|
||||
$db_host = pick($keystone_hash['db_host'], $database_vip)
|
||||
|
@ -103,6 +104,7 @@ if has_key($murano_settings_hash, 'murano_repo_url') {
|
|||
class { 'openstack::keystone':
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
default_log_levels => $default_log_levels,
|
||||
db_type => $db_type,
|
||||
db_host => $db_host,
|
||||
db_password => $db_password,
|
||||
|
|
|
@ -16,6 +16,7 @@ $service_endpoint = hiera('service_endpoint')
|
|||
$syslog_log_facility_murano = hiera('syslog_log_facility_murano')
|
||||
$debug = pick($murano_hash['debug'], hiera('debug', false))
|
||||
$verbose = pick($murano_hash['verbose'], hiera('verbose', true))
|
||||
$default_log_levels = hiera_hash('default_log_levels')
|
||||
$use_syslog = hiera('use_syslog', true)
|
||||
$use_stderr = hiera('use_stderr', false)
|
||||
$rabbit_ha_queues = hiera('rabbit_ha_queues')
|
||||
|
@ -103,6 +104,21 @@ if $murano_hash['enabled'] {
|
|||
use_trusts => true,
|
||||
}
|
||||
|
||||
# TODO (iberezovskiy): Move to globals (as it is done for sahara)
|
||||
# after new sync with upstream because of
|
||||
# https://github.com/openstack/puppet-murano/blob/master/manifests/init.pp#L237
|
||||
if $default_log_levels {
|
||||
murano_config {
|
||||
'DEFAULT/default_log_levels':
|
||||
value => join(sort(join_keys_to_values($default_log_levels, '=')), ',');
|
||||
}
|
||||
} else {
|
||||
murano_config {
|
||||
'DEFAULT/default_log_levels': ensure => absent;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
class { 'murano::api':
|
||||
host => $api_bind_host,
|
||||
port => $api_bind_port,
|
||||
|
|
|
@ -83,6 +83,7 @@ class {'openstack::cinder':
|
|||
use_stderr => hiera('use_stderr', false),
|
||||
verbose => pick($cinder_hash['verbose'], hiera('verbose', true)),
|
||||
debug => pick($cinder_hash['debug'], hiera('debug', true)),
|
||||
default_log_levels => hiera_hash('default_log_levels'),
|
||||
syslog_log_facility => hiera('syslog_log_facility_cinder', 'LOG_LOCAL3'),
|
||||
cinder_rate_limits => hiera('cinder_rate_limits'),
|
||||
max_retries => $max_retries,
|
||||
|
|
|
@ -104,6 +104,7 @@ class { '::openstack::controller':
|
|||
network_provider => $network_provider,
|
||||
verbose => pick($openstack_controller_hash['verbose'], true),
|
||||
debug => pick($openstack_controller_hash['debug'], hiera('debug', true)),
|
||||
default_log_levels => hiera_hash('default_log_levels'),
|
||||
auto_assign_floating_ip => hiera('auto_assign_floating_ip', false),
|
||||
glance_api_servers => $glance_api_servers,
|
||||
primary_controller => $primary_controller,
|
||||
|
|
|
@ -61,6 +61,8 @@ if $use_neutron {
|
|||
|
||||
}
|
||||
|
||||
$default_log_levels = hiera_hash('default_log_levels')
|
||||
|
||||
class { 'neutron' :
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
|
@ -84,6 +86,15 @@ if $use_neutron {
|
|||
advertise_mtu => true,
|
||||
}
|
||||
|
||||
if $default_log_levels {
|
||||
neutron_config {
|
||||
'DEFAULT/default_log_levels' :
|
||||
value => join(sort(join_keys_to_values($default_log_levels, '=')), ',');
|
||||
}
|
||||
} else {
|
||||
neutron_config { 'DEFAULT/default_log_levels' : ensure => absent; }
|
||||
}
|
||||
|
||||
if $use_syslog {
|
||||
neutron_config { 'DEFAULT/use_syslog_rfc_format': value => true; }
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@ $service_endpoint = hiera('service_endpoint')
|
|||
$syslog_log_facility_sahara = hiera('syslog_log_facility_sahara')
|
||||
$debug = pick($sahara_hash['debug'], hiera('debug', false))
|
||||
$verbose = pick($sahara_hash['verbose'], hiera('verbose', true))
|
||||
$default_log_levels = hiera_hash('default_log_levels')
|
||||
$use_syslog = hiera('use_syslog', true)
|
||||
$use_stderr = hiera('use_stderr', false)
|
||||
$rabbit_ha_queues = hiera('rabbit_ha_queues')
|
||||
|
|
|
@ -75,6 +75,8 @@
|
|||
<% globals.store "storage_hash", @storage_hash -%>
|
||||
<% globals.store "swift_hash", @swift_hash -%>
|
||||
<% globals.store "syslog_hash", @syslog_hash -%>
|
||||
<% globals.store "default_log_levels", @default_log_levels -%>
|
||||
<% globals.store "sahara::logging::default_log_levels", @default_log_levels -%>
|
||||
<% globals.store "syslog_log_facility_ceilometer", @syslog_log_facility_ceilometer -%>
|
||||
<% globals.store "syslog_log_facility_ceph", @syslog_log_facility_ceph -%>
|
||||
<% globals.store "syslog_log_facility_cinder", @syslog_log_facility_cinder -%>
|
||||
|
|
|
@ -5,6 +5,9 @@ manifest = 'ceilometer/compute.pp'
|
|||
describe manifest do
|
||||
shared_examples 'catalog' do
|
||||
ceilometer_hash = Noop.hiera_structure 'ceilometer'
|
||||
default_log_levels_hash = Noop.hiera_structure 'default_log_levels'
|
||||
default_log_levels = Noop.puppet_function 'join_keys_to_values',default_log_levels_hash,'='
|
||||
|
||||
if ceilometer_hash['enabled']
|
||||
it 'should configure OS ENDPOINT TYPE for ceilometer' do
|
||||
should contain_ceilometer_config('service_credentials/os_endpoint_type').with(:value => 'internalURL')
|
||||
|
@ -22,6 +25,10 @@ describe manifest do
|
|||
it 'should disable use_stderr option' do
|
||||
should contain_ceilometer_config('DEFAULT/use_stderr').with(:value => 'false')
|
||||
end
|
||||
|
||||
it 'should configure default_log_levels' do
|
||||
should contain_ceilometer_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
|
||||
end
|
||||
end
|
||||
end # end of shared_examples
|
||||
|
||||
|
|
|
@ -11,6 +11,8 @@ describe manifest do
|
|||
rabbit_password = Noop.hiera_structure 'rabbit/password'
|
||||
ceilometer_hash = Noop.hiera_structure 'ceilometer'
|
||||
rabbit_ha_queues = 'true'
|
||||
default_log_levels_hash = Noop.hiera_structure 'default_log_levels'
|
||||
default_log_levels = Noop.puppet_function 'join_keys_to_values',default_log_levels_hash,'='
|
||||
|
||||
# Ceilometer
|
||||
if ceilometer_hash['enabled']
|
||||
|
@ -36,6 +38,10 @@ describe manifest do
|
|||
it 'should configure timeout for HTTP requests' do
|
||||
should contain_ceilometer_config('DEFAULT/http_timeout').with(:value => http_timeout)
|
||||
end
|
||||
|
||||
it 'should configure default log levels' do
|
||||
should contain_ceilometer_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
|
||||
end
|
||||
end
|
||||
|
||||
end # end of shared_examples
|
||||
|
|
|
@ -14,6 +14,8 @@ describe manifest do
|
|||
use_syslog = Noop.hiera('use_syslog', 'true')
|
||||
use_stderr = Noop.hiera('use_stderr', 'false')
|
||||
region = Noop.hiera('region', 'RegionOne')
|
||||
default_log_levels_hash = Noop.hiera_hash 'default_log_levels'
|
||||
default_log_levels = Noop.puppet_function 'join_keys_to_values',default_log_levels_hash,'='
|
||||
if glance_config && glance_config.has_key?('pipeline')
|
||||
pipeline = glance_config['pipeline']
|
||||
else
|
||||
|
@ -77,6 +79,11 @@ describe manifest do
|
|||
end
|
||||
end
|
||||
|
||||
it 'should configure default_log_levels' do
|
||||
should contain_glance_api_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
|
||||
should contain_glance_registry_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
|
||||
end
|
||||
|
||||
if storage_config && storage_config.has_key?('images_ceph') && storage_config['images_ceph']
|
||||
if glance_config && glance_config.has_key?('show_image_direct_url')
|
||||
show_image_direct_url = glance_config['show_image_direct_url']
|
||||
|
|
|
@ -26,6 +26,12 @@ describe manifest do
|
|||
let(:public_address) { public_ssl ? public_ssl_hostname : public_ip }
|
||||
|
||||
use_syslog = Noop.hiera 'use_syslog'
|
||||
default_log_levels_hash = Noop.hiera_hash 'default_log_levels'
|
||||
default_log_levels = Noop.puppet_function 'join_keys_to_values',default_log_levels_hash,'='
|
||||
|
||||
it 'should configure default_log_levels' do
|
||||
should contain_heat_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
|
||||
end
|
||||
|
||||
it 'should use auth_uri and identity_uri' do
|
||||
should contain_class('openstack::heat').with(
|
||||
|
|
|
@ -9,6 +9,12 @@ if ironic_enabled
|
|||
shared_examples 'catalog' do
|
||||
rabbit_user = Noop.hiera_structure 'rabbit/user', 'nova'
|
||||
rabbit_password = Noop.hiera_structure 'rabbit/password'
|
||||
default_log_levels_hash = Noop.hiera_hash 'default_log_levels'
|
||||
default_log_levels = Noop.puppet_function 'join_keys_to_values',default_log_levels_hash,'='
|
||||
|
||||
it 'should configure default_log_levels' do
|
||||
should contain_ironic_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
|
||||
end
|
||||
|
||||
it 'should declare ironic class correctly' do
|
||||
should contain_class('ironic').with(
|
||||
|
@ -16,6 +22,11 @@ if ironic_enabled
|
|||
'rabbit_password' => rabbit_password,
|
||||
)
|
||||
end
|
||||
|
||||
# TODO (iberezovskiy): uncomment this test after ironic module update
|
||||
#it 'should configure default log levels' do
|
||||
# should contain_class('ironic::logging').with('default_log_levels' => default_log_levels)
|
||||
#end
|
||||
end
|
||||
test_ubuntu_and_centos manifest
|
||||
end
|
||||
|
|
|
@ -50,6 +50,12 @@ describe manifest do
|
|||
ceilometer_hash = Noop.hiera_structure 'ceilometer'
|
||||
token_provider = Noop.hiera('token_provider')
|
||||
|
||||
default_log_levels_hash = Noop.hiera_hash 'default_log_levels'
|
||||
default_log_levels = Noop.puppet_function 'join_keys_to_values',default_log_levels_hash,'='
|
||||
|
||||
it 'should configure default_log_levels' do
|
||||
should contain_keystone_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
|
||||
end
|
||||
|
||||
it 'should declare keystone class with admin_token' do
|
||||
should contain_class('keystone').with(
|
||||
|
|
|
@ -82,6 +82,9 @@ describe manifest do
|
|||
#############################################################################
|
||||
|
||||
enable = Noop.hiera_structure('murano/enabled')
|
||||
default_log_levels_hash = Noop.hiera_hash 'default_log_levels'
|
||||
default_log_levels = Noop.puppet_function 'join_keys_to_values',default_log_levels_hash,'='
|
||||
|
||||
context 'if murano is enabled', :if => enable do
|
||||
it 'should declare murano class correctly' do
|
||||
should contain_class('murano').with(
|
||||
|
@ -114,6 +117,10 @@ describe manifest do
|
|||
)
|
||||
end
|
||||
|
||||
it 'should configure default_log_levels' do
|
||||
should contain_murano_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
|
||||
end
|
||||
|
||||
it 'should declare murano::api class correctly' do
|
||||
should contain_class('murano::api').with(
|
||||
'host' => bind_address,
|
||||
|
|
|
@ -12,6 +12,12 @@ describe manifest do
|
|||
cinder_user = Noop.hiera_structure('cinder/user', "cinder")
|
||||
cinder_user_password = Noop.hiera_structure('cinder/user_password')
|
||||
cinder_tenant = Noop.hiera_structure('cinder/tenant', "services")
|
||||
default_log_levels_hash = Noop.hiera_hash 'default_log_levels'
|
||||
default_log_levels = Noop.puppet_function 'join_keys_to_values',default_log_levels_hash,'='
|
||||
|
||||
it 'should configure default_log_levels' do
|
||||
should contain_cinder_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
|
||||
end
|
||||
|
||||
it 'ensures cinder_config contains "oslo_messaging_rabbit/rabbit_ha_queues" ' do
|
||||
should contain_cinder_config('oslo_messaging_rabbit/rabbit_ha_queues').with(
|
||||
|
|
|
@ -18,8 +18,15 @@ describe manifest do
|
|||
keystone_host = Noop.hiera 'management_vip'
|
||||
end
|
||||
|
||||
default_log_levels_hash = Noop.hiera_hash 'default_log_levels'
|
||||
default_log_levels = Noop.puppet_function 'join_keys_to_values',default_log_levels_hash,'='
|
||||
|
||||
# TODO All this stuff should be moved to shared examples controller* tests.
|
||||
|
||||
it 'should configure default_log_levels' do
|
||||
should contain_nova_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
|
||||
end
|
||||
|
||||
# Nova config options
|
||||
it 'nova config should have use_stderr set to false' do
|
||||
should contain_nova_config('DEFAULT/use_stderr').with(
|
||||
|
|
|
@ -68,6 +68,12 @@ describe manifest do
|
|||
should contain_class('neutron').with('rabbit_hosts' => Noop.hiera('amqp_hosts', '').split(','))
|
||||
end
|
||||
|
||||
default_log_levels_hash = Noop.hiera_hash 'default_log_levels'
|
||||
default_log_levels = Noop.puppet_function 'join_keys_to_values',default_log_levels_hash,'='
|
||||
it 'should configure default_log_levels' do
|
||||
should contain_neutron_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -98,6 +98,12 @@ describe manifest do
|
|||
)
|
||||
end
|
||||
|
||||
default_log_levels_hash = Noop.hiera_hash 'default_log_levels'
|
||||
default_log_levels = Noop.puppet_function 'join_keys_to_values',default_log_levels_hash,'='
|
||||
it 'should configure default_log_levels' do
|
||||
should contain_sahara_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
|
||||
end
|
||||
|
||||
enable = (Noop.hiera_structure('sahara/enabled') and Noop.hiera_structure('public_ssl/services'))
|
||||
context 'with public_ssl enabled', :if => enable do
|
||||
it { should contain_file('/etc/pki/tls/certs').with(
|
||||
|
|
Loading…
Reference in New Issue