Merge "Fix bool defaults for debug, verbose, use_syslog"

This commit is contained in:
Jenkins 2014-02-20 17:25:47 +00:00 committed by Gerrit Code Review
commit c36cf9f6fb
29 changed files with 118 additions and 110 deletions

View File

@ -8,9 +8,9 @@
# [*package_ensure*]
# ensure state for package. Optional. Defaults to 'present'
# [*verbose*]
# should the daemons log verbose messages. Optional. Defaults to 'False'
# should the daemons log verbose messages. Optional. Defaults to false
# [*debug*]
# should the daemons log debug messages. Optional. Defaults to 'False'
# should the daemons log debug messages. Optional. Defaults to false
# [*rabbit_host*]
# ip or hostname of the rabbit server. Optional. Defaults to '127.0.0.1'
# [*rabbit_port*]
@ -35,8 +35,8 @@
class ceilometer(
$metering_secret = false,
$package_ensure = 'present',
$verbose = 'False',
$debug = 'False',
$verbose = false,
$debug = false,
$use_syslog = false,
$syslog_log_facility = 'LOG_SYSLOG',
$syslog_log_level = 'WARNING',

View File

@ -6,8 +6,8 @@ describe 'ceilometer' do
{
:metering_secret => 'metering-s3cr3t',
:package_ensure => 'present',
:verbose => 'False',
:debug => 'False',
:verbose => false,
:debug => false,
:rabbit_host => '127.0.0.1',
:rabbit_port => 5672,
:rabbit_userid => 'guest',

View File

@ -24,8 +24,8 @@ class cinder::base (
$qpid_port = 5672,
$qpid_userid = 'nova',
$package_ensure = 'present',
$verbose = 'False',
$debug = 'False',
$verbose = false,
$debug = false,
$use_syslog = false,
$syslog_log_facility = 'LOG_LOCAL3',
$syslog_log_level = 'WARNING',
@ -75,7 +75,7 @@ class cinder::base (
File['cinder-logging.conf'] ~> Service <| title == 'cinder-scheduler' |>
} else { #other syslog debug or nonsyslog debug/nondebug cases
cinder_config {
'DEFAULT/logdir':value=> $log_dir;
'DEFAULT/logdir': value=> $log_dir;
'DEFAULT/use_syslog': value => false;
}
}

View File

@ -43,8 +43,8 @@ node default {
class role_glance_sqlite {
class { 'glance::api':
verbose => 'True',
debug => 'True',
verbose => true,
debug => true,
auth_type => 'keystone',
keystone_tenant => 'services',
keystone_user => 'glance',
@ -53,8 +53,8 @@ class role_glance_sqlite {
class { 'glance::backend::file': }
class { 'glance::registry':
verbose => 'True',
debug => 'True',
verbose => true,
debug => true,
auth_type => 'keystone',
keystone_tenant => 'services',
keystone_user => 'glance',
@ -66,8 +66,8 @@ class role_glance_sqlite {
class role_glance_mysql {
class { 'glance::api':
verbose => 'True',
debug => 'True',
verbose => true,
debug => true,
auth_type => 'keystone',
keystone_tenant => 'services',
keystone_user => 'glance',
@ -85,8 +85,8 @@ class role_glance_mysql {
}
class { 'glance::registry':
verbose => 'True',
debug => 'True',
verbose => true,
debug => true,
auth_type => 'keystone',
keystone_tenant => 'services',
keystone_user => 'glance',

View File

@ -39,12 +39,13 @@
# $clean_minute - cron minute to launch glance-cache-cleaner.
# Optional. Default: 0
#
# $use_syslog - Rather or not service should log to syslog. Optional.
# $use_syslog - Rather or not service should log to syslog. Optional.
# Default: false
#
class glance::api(
$keystone_password,
$verbose = 'False',
$debug = 'False',
$verbose = false,
$debug = false,
$bind_host = '0.0.0.0',
$bind_port = '9292',
$backlog = '4096',

View File

@ -3,8 +3,8 @@
#
class glance::registry(
$keystone_password,
$verbose = 'False',
$debug = 'False',
$verbose = false,
$debug = false,
$bind_host = '0.0.0.0',
$bind_port = '9191',
$log_file = '/var/log/glance/registry.log',

View File

@ -11,8 +11,8 @@ describe 'glance::api' do
let :default_params do
{
:verbose => 'False',
:debug => 'False',
:verbose => false,
:debug => false,
:bind_host => '0.0.0.0',
:bind_port => '9292',
:registry_host => '0.0.0.0',
@ -36,8 +36,8 @@ describe 'glance::api' do
[{:keystone_password => 'ChangeMe'},
{
:verbose => 'true',
:debug => 'true',
:verbose => true,
:debug => true,
:bind_host => '127.0.0.1',
:bind_port => '9222',
:registry_host => '127.0.0.1',

View File

@ -10,8 +10,8 @@ describe 'glance::registry' do
let :default_params do
{
:verbose => 'False',
:debug => 'False',
:verbose => false,
:debug => false,
:bind_host => '0.0.0.0',
:bind_port => '9191',
:log_file => '/var/log/glance/registry.log',
@ -31,8 +31,8 @@ describe 'glance::registry' do
[
{:keystone_password => 'ChangeMe'},
{
:verbose => 'True',
:debug => 'True',
:verbose => true,
:debug => true,
:bind_host => '127.0.0.1',
:bind_port => '9111',
:log_file => '/var/log/glance-registry.log',

View File

@ -1,4 +1,4 @@
class { 'glance::api':
debug => 'true',
verbose => 'true',
debug => true,
verbose => true,
}

View File

@ -1,4 +1,4 @@
class { 'glance::registry':
debug =>'true',
verbose => 'true',
debug => true,
verbose => true,
}

View File

@ -20,7 +20,7 @@
# $django_verbose True/False. enable/disables verbose logging (info level). defaults to false
# $log_level Syslog level would be used for logging. If Verbose -> INFO, Debug -> DEBUG, otherwise -> the value given
# $api_result_limit max number of Swift containers/objects to display on a single page
# $use_syslog Redirect all apache logging to syslog. Required for FUEL-WEB.
# $use_syslog Redirect all apache logging to syslog. Required for FUEL-UI. Defaults to false.
#
class horizon(
$secret_key,
@ -35,8 +35,8 @@ class horizon(
$keystone_port = 5000,
$keystone_scheme = 'http',
$keystone_default_role = 'Member',
$django_debug = 'False',
$django_verbose = 'False',
$django_debug = false,
$django_verbose = false,
$api_result_limit = 1000,
$http_port = 80,
$https_port = 443,

View File

@ -49,7 +49,7 @@ describe 'horizon' do
:keystone_port => 4682,
:keystone_scheme => 'https',
:keystone_default_role => 'SwiftOperator',
:django_debug => 'True',
:django_debug => true,
:api_result_limit => 4682,
}
end

View File

@ -312,7 +312,7 @@ LOGGING = {
# Logging from django.db.backends is VERY verbose, send to null
# by default.
'django.db.backends': {
'handlers':<% if django_debug=='True' and use_syslog -%> ['syslog']<% else -%> ['null']<% end -%>,
'handlers':<% if django_debug and use_syslog -%> ['syslog']<% else -%> ['null']<% end -%>,
'level': 'DEBUG',
'propagate': False
},

View File

@ -36,7 +36,7 @@ It must be used together with a class that expresses the db backend to use:
for example:
class { 'keystone':
log_verbose => 'True',
verbose => true,
admin_token => 'my_secret_token'
}

View File

@ -14,11 +14,11 @@
# [admin_token] Admin token that can be used to authenticate as a keystone
# admin. Required.
# [verbose] Rather keystone should log at verbose level. Optional.
# Defaults to False.
# Defaults to false.
# [debug] Rather keystone should log at debug level. Optional.
# Defaults to False.
# Defaults to false.
# [use_syslog] Rather or not keystone should log to syslog. Optional.
# Defaults to False.
# Defaults to false.
# [syslog_log_facility] Facility for syslog, if used. Optional.
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
# [catalog_type] Type of catalog that keystone uses to store endpoints,services. Optional.
@ -37,7 +37,7 @@
# == Examples
#
# class { 'keystone':
# log_verbose => 'True',
# verbose => true,
# admin_token => 'my_special_token',
# }
#
@ -56,8 +56,8 @@ class keystone(
$public_port = '5000',
$admin_port = '35357',
$compute_port = '3000',
$verbose = 'False',
$debug = 'False',
$verbose = false,
$debug = false,
$use_syslog = false,
$syslog_log_facility = 'LOG_LOCAL7',
$syslog_log_level = 'WARNING',

View File

@ -14,9 +14,9 @@ describe 'keystone' do
'admin_port' => '35357',
'admin_token' => 'service_token',
'compute_port' => '3000',
'verbose' => 'False',
'debug' => 'False',
'use_syslog' => 'False',
'verbose' => false,
'debug' => false,
'use_syslog' => false,
'catalog_type' => 'sql',
'enabled' => true,
'sql_connection' => 'sqlite:////var/lib/keystone/keystone.db',
@ -32,8 +32,8 @@ describe 'keystone' do
'admin_port' => '35358',
'admin_token' => 'service_token_override',
'compute_port' => '3001',
'verbose' => 'True',
'debug' => 'True',
'verbose' => true,
'debug' => true,
'catalog_type' => 'template',
'enabled' => false,
'sql_connection' => 'mysql://a:b@c/d',

View File

@ -1,7 +1,7 @@
class { 'neutron':
rabbit_password => '1',
verbose => 'True',
debug => 'True',
verbose => true,
debug => true,
rabbit_host => '172.18.66.112',
}
@ -18,12 +18,12 @@
}
class { 'neutron::agents::dhcp':
debug => 'True',
debug => true,
use_namespaces => 'False',
}
class { 'neutron::agents::l3':
debug => 'True',
debug => true,
auth_url => 'http://172.18.66.112:5000/v2.0',
auth_password => '1',
use_namespaces => 'False',

View File

@ -1,8 +1,8 @@
#
class neutron::agents::dhcp (
$neutron_config = {},
$verbose = 'False',
$debug = 'False',
$verbose = false,
$debug = false,
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
$dhcp_driver = 'neutron.agent.linux.dhcp.Dnsmasq',
$dhcp_agent_manager='neutron.agent.dhcp_agent.DhcpAgentWithStateReport',
@ -67,6 +67,7 @@ class neutron::agents::dhcp (
'DEFAULT/log_dir': ensure => absent;
'DEFAULT/log_file': ensure => absent;
'DEFAULT/log_config': ensure => absent;
#TODO(bogdando) fix syslog usage after Oslo logging patch synced in I
'DEFAULT/use_syslog': ensure => absent;
'DEFAULT/use_stderr': ensure => absent;
'DEFAULT/state_path': value => $state_path;
@ -238,4 +239,3 @@ class neutron::agents::dhcp (
}
# vim: set ts=2 sw=2 et :

View File

@ -1,8 +1,8 @@
#
class neutron::agents::l3 (
$neutron_config = {},
$verbose = 'False',
$debug = 'False',
$verbose = false,
$debug = false,
$interface_driver = 'neutron.agent.linux.interface.OVSInterfaceDriver',
$service_provider = 'generic'
) {
@ -52,6 +52,7 @@ class neutron::agents::l3 (
'DEFAULT/log_dir': ensure => absent;
'DEFAULT/log_file': ensure => absent;
'DEFAULT/log_config': ensure => absent;
#TODO(bogdando) fix syslog usage after Oslo logging patch synced in I
'DEFAULT/use_syslog': ensure => absent;
'DEFAULT/use_stderr': ensure => absent;
'DEFAULT/router_id': ensure => absent;
@ -247,4 +248,3 @@ class neutron::agents::l3 (
}
# vim: set ts=2 sw=2 et :

View File

@ -6,8 +6,8 @@
class neutron (
$neutron_config = {},
$enabled = true,
$verbose = 'False',
$debug = 'False',
$verbose = false,
$debug = false,
$core_plugin = 'neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2',
$auth_strategy = 'keystone',
$log_file = '/var/log/neutron/server.log',
@ -111,6 +111,7 @@ class neutron (
'DEFAULT/log_dir': ensure => absent;
'DEFAULT/log_file': ensure => absent;
'DEFAULT/log_config': ensure => absent;
#TODO(bogdando) fix syslog usage after Oslo logging patch synced in I.
'DEFAULT/use_syslog': value => false;
'DEFAULT/use_stderr': value => true;
'DEFAULT/publish_errors': value => false;
@ -175,4 +176,3 @@ class neutron (
anchor {'neutron-init-done':}
}
# vim: set ts=2 sw=2 et :

View File

@ -30,13 +30,15 @@
# [glance_db_password] The password for the db user for glance. Optional. Defaults to 'glance_pass'.
# [glance_user_password] The password of the glance service user. Optional. Defaults to 'glance_pass'.
# [secret_key] The secret key for horizon. Optional. Defaults to 'dummy_secret_key'.
# [verbose] Rather to print more verbose (INFO+) output. If non verbose and non debug, would give syslog_log_level (default is WARNING) output. Optional. Defaults to false.
# [debug] Rather to print even more verbose (DEBUG+) output. If true, would ignore verbose option. Optional. Defaults to false.
# [verbose] Rather to print more verbose (INFO+) output. If non verbose and non debug, would give syslog_log_level
# (default is WARNING) output. Optional. Defaults to false.
# [debug] Rather to print even more verbose (DEBUG+) output. If true, would ignore verbose option.
# Optional. Defaults to false.
# [purge_nova_config] Whether unmanaged nova.conf entries should be purged. Optional. Defaults to true.
# [libvirt_type] The virualization type being controlled by libvirt. Optional. Defaults to 'kvm'.
# [nova_volume] The name of the volume group to use for nova volume allocation. Optional. Defaults to 'nova-volumes'.
# [horizon] (bool) is horizon installed. Defaults to: true
# [use_syslog] Rather or not service should log to syslog. Optional.
# [use_syslog] Rather or not service should log to syslog. Optional. Defaults to false.
# [syslog_log_facility] Facility for syslog, if used. Optional. Note: duplicating conf option
# wouldn't have been used, but more powerfull rsyslog features managed via conf template instead
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
@ -141,12 +143,12 @@ class openstack::all (
$vnc_enabled = true,
# General
$enabled = true,
$verbose = 'False',
$debug = 'False',
$verbose = false,
$debug = false,
$service_endpoint = '127.0.0.1',
$glance_backend = 'file',
$use_syslog = false,
$syslog_log_level = 'WARNING',
$syslog_log_level = 'WARNING',
$syslog_log_facility_glance = 'LOG_LOCAL2',
$syslog_log_facility_cinder = 'LOG_LOCAL3',
$syslog_log_facility_neutron = 'LOG_LOCAL4',

View File

@ -8,9 +8,9 @@ class openstack::ceilometer (
$rabbit_password,
$keystone_password = 'ceilometer_pass',
$metering_secret = 'ceilometer',
$verbose = 'False',
$use_syslog = 'False',
$debug = 'False',
$verbose = false,
$use_syslog = false,
$debug = false,
$db_type = 'mysql',
$db_host = 'localhost',
$db_user = 'ceilometer',

View File

@ -1,4 +1,4 @@
# [use_syslog] Rather or not service should log to syslog. Optional.
# [use_syslog] Rather or not service should log to syslog. Optional. Defaults to false.
# [syslog_log_facility] Facility for syslog, if used. Optional. Note: duplicating conf option
# wouldn't have been used, but more powerfull rsyslog features managed via conf template instead
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
@ -21,14 +21,14 @@ class openstack::cinder(
$iscsi_bind_host = '0.0.0.0',
$use_syslog = false,
$syslog_log_facility = 'LOG_LOCAL3',
$syslog_log_level = 'WARNING',
$syslog_log_level = 'WARNING',
$cinder_rate_limits = undef,
$verbose = 'False',
$debug = 'False',
$queue_provider = 'rabbitmq',
$qpid_password = 'qpid_pw',
$qpid_user = 'nova',
$qpid_nodes = ['127.0.0.1'],
$verbose = false,
$debug = false,
$queue_provider = 'rabbitmq',
$qpid_password = 'qpid_pw',
$qpid_user = 'nova',
$qpid_nodes = ['127.0.0.1'],
) {
include cinder::params
# if ($purge_cinder_config) {

View File

@ -30,8 +30,10 @@
# Defaults to false.
# [network_config] Hash that can be used to pass implementation specifc
# network settings. Optioal. Defaults to {}
# [verbose] Rather to print more verbose (INFO+) output. If non verbose and non debug, would give syslog_log_level (default is WARNING) output. Optional. Defaults to false.
# [debug] Rather to print even more verbose (DEBUG+) output. If true, would ignore verbose option. Optional. Defaults to false.
# [verbose] Rather to print more verbose (INFO+) output. If non verbose and non debug, would give
# syslog_log_level (default is WARNING) output. Optional. Defaults to false.
# [debug] Rather to print even more verbose (DEBUG+) output. If true, would ignore verbose option.
# Optional. Defaults to false.
# [export_resources] Rather to export resources.
# Horizon related config - assumes puppetlabs-horizon code
# [secret_key] secret key to encode cookies,
@ -46,7 +48,7 @@
# [horizon_app_links] array as in '[ ["Nagios","http://nagios_addr:port/path"],["Ganglia","http://ganglia_addr"] ]'
# [enabled] Whether services should be enabled. This parameter can be used to
# implement services in active-passive modes for HA. Optional. Defaults to true.
# [use_syslog] Rather or not service should log to syslog. Optional.
# [use_syslog] Rather or not service should log to syslog. Optional. Defaults to false.
# [syslog_log_facility] Facility for syslog, if used. Optional. Note: duplicating conf option
# wouldn't have been used, but more powerfull rsyslog features managed via conf template instead
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
@ -154,8 +156,8 @@ class openstack::controller (
$cinder = true,
$horizon_app_links = undef,
# General
$verbose = 'False',
$debug = 'False',
$verbose = false,
$debug = false,
$export_resources = true,
# if the cinder management components should be installed
$cinder_user_password = 'cinder_user_pass',

View File

@ -18,11 +18,13 @@
# [db_type] Type of sql databse to use. Optional. Defaults to 'mysql'
# [glance_db_user] Name of glance DB user. Optional. Defaults to 'glance'
# [glance_db_dbname] Name of glance DB. Optional. Defaults to 'glance'
# [verbose] Rather to print more verbose (INFO+) output. If non verbose and non debug, would give syslog_log_level (default is WARNING) output. Optional. Defaults to false.
# [debug] Rather to print even more verbose (DEBUG+) output. If true, would ignore verbose option. Optional. Defaults to false.
# [verbose] Rather to print more verbose (INFO+) output. If non verbose and non debug, would give
# syslog_log_level (default is WARNING) output. Optional. Defaults to false.
# [debug] Rather to print even more verbose (DEBUG+) output. If true, would ignore verbose option.
# Optional. Defaults to false.
# [enabled] Used to indicate if the service should be active (true) or passive (false).
# Optional. Defaults to true
# [use_syslog] Rather or not service should log to syslog. Optional.
# [use_syslog] Rather or not service should log to syslog. Optional. Default to false.
# [syslog_log_facility] Facility for syslog, if used. Optional. Note: duplicating conf option
# wouldn't have been used, but more powerfull rsyslog features managed via conf template instead
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
@ -48,8 +50,8 @@ class openstack::glance (
$glance_db_user = 'glance',
$glance_db_dbname = 'glance',
$glance_backend = 'file',
$verbose = 'False',
$debug = 'False',
$verbose = false,
$debug = false,
$enabled = true,
$use_syslog = false,
# Facility is common for all glance services

View File

@ -30,8 +30,8 @@ class openstack::horizon (
$keystone_host = '127.0.0.1',
$keystone_scheme = 'http',
$keystone_default_role = 'Member',
$verbose = 'false',
$debug = 'false',
$verbose = false,
$debug = false,
$api_result_limit = 1000,
$package_ensure = present,
$use_ssl = false,
@ -46,16 +46,16 @@ class openstack::horizon (
# }
if $debug { #syslog and nondebug case
#We don't realy want django debug, it is too verbose.
$django_debug = 'False'
$django_verbose = 'False'
$django_debug = false
$django_verbose = false
$log_level_real = 'DEBUG'
} elsif $verbose =~ /(?i)(true|yes)/ {
$django_verbose = 'True'
$django_debug = 'False'
} elsif $verbose {
$django_verbose = true
$django_debug = false
$log_level_real = 'INFO'
} else {
$django_verbose = 'False'
$django_debug = 'False'
$django_verbose = false
$django_debug = false
$log_level_real = $log_level
}

View File

@ -17,8 +17,10 @@
# [keystone_db_user] Name of keystone db user. Optional. Defaults to 'keystone'
# [keystone_db_dbname] Name of keystone DB. Optional. Defaults to 'keystone'
# [keystone_admin_tenant] Name of keystone admin tenant. Optional. Defaults to 'admin'
# [verbose] Rather to print more verbose (INFO+) output. If non verbose and non debug, would give syslog_log_level (default is WARNING) output. Optional. Defaults to false.
# [debug] Rather to print even more verbose (DEBUG+) output. If true, would ignore verbose option. Optional. Defaults to false.
# [verbose] Rather to print more verbose (INFO+) output. If non verbose and non debug, would
# give syslog_log_level (default is WARNING) output. Optional. Defaults to false.
# [debug] Rather to print even more verbose (DEBUG+) output. If true, would ignore verbose option.
# Optional. Defaults to false.
# [bind_host] Address that keystone binds to. Optional. Defaults to '0.0.0.0'
# [internal_address] Internal address for keystone. Optional. Defaults to $public_address
# [admin_address] Keystone admin address. Optional. Defaults to $internal_address
@ -26,7 +28,7 @@
# [nova] Set up nova endpoints and auth. Optional. Defaults to true
# [enabled] If the service is active (true) or passive (false).
# Optional. Defaults to true
# [use_syslog] Rather or not service should log to syslog. Optional.
# [use_syslog] Rather or not service should log to syslog. Optional. Default to false.
# [syslog_log_facility] Facility for syslog, if used. Optional. Note: duplicating conf option
# wouldn't have been used, but more powerfull rsyslog features managed via conf template instead
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
@ -58,8 +60,8 @@ class openstack::keystone (
$db_user = 'keystone',
$db_name = 'keystone',
$admin_tenant = 'admin',
$verbose = 'False',
$debug = 'False',
$verbose = false,
$debug = false,
$bind_host = '0.0.0.0',
$internal_address = false,
$admin_address = false,

View File

@ -5,8 +5,8 @@
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
class openstack::neutron_router (
$verbose = 'False',
$debug = 'False',
$verbose = false,
$debug = false,
$enabled = true,
$neutron = true,
$neutron_config = {},
@ -69,4 +69,3 @@ class openstack::neutron_router (
}
}
# vim: set ts=2 sw=2 et :

View File

@ -75,8 +75,8 @@ class openstack::nova::controller (
$vnc_enabled = true,
# General
$keystone_host = '127.0.0.1',
$verbose = 'False',
$debug = 'False',
$verbose = false,
$debug = false,
$enabled = true,
$exported_resources = true,
$rabbit_nodes = [$internal_address],