Add syslog level var, fix logging confs & classes calls
Signed-off-by: Bogdan Dobrelya <bogdando@mail.ru>
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
# $use_syslog = Rather or not service should log to syslog. Optional.
|
||||
# $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 main syslog files (/var/log/{messages, syslog, kern.log}). Optional.
|
||||
|
||||
class cinder::base (
|
||||
$rabbit_password,
|
||||
@@ -19,7 +20,10 @@ class cinder::base (
|
||||
$package_ensure = 'present',
|
||||
$verbose = 'True',
|
||||
$use_syslog = false,
|
||||
# TODO syslog facilities from site.pp
|
||||
# TODO syslog common level from site.pp
|
||||
$syslog_log_facility = "LOCAL3",
|
||||
$syslog_log_level = 'INFO',
|
||||
) {
|
||||
|
||||
include cinder::params
|
||||
|
||||
@@ -1,30 +1,35 @@
|
||||
[loggers]
|
||||
keys = root,service
|
||||
|
||||
# devel is reserved for future usage
|
||||
[handlers]
|
||||
keys = production,file,devel
|
||||
|
||||
[formatters]
|
||||
keys = normal_with_name,debug
|
||||
|
||||
# defines level and logger for /var/log/{messages,syslog,kern.log} files
|
||||
# includes node FQDN, duplicates to corresponding -all.log file,
|
||||
# so level should be greater than one for service logger
|
||||
[logger_root]
|
||||
level = DEBUG
|
||||
#handlers = production
|
||||
handlers = devel
|
||||
level = <%= @syslog_log_level %>
|
||||
handlers = production
|
||||
qualname = cinder
|
||||
|
||||
# defines level and logger for -all.log file
|
||||
# no node FQDN provided, duplicates nothing
|
||||
[logger_service]
|
||||
level = DEBUG
|
||||
handlers = file
|
||||
qualname = cinder
|
||||
|
||||
[formatter_normal_with_name]
|
||||
#class = cinder.openstack.common.log.LegacyFormatter
|
||||
format = %(asctime)s %(name)s: %(levelname)s %(message)s
|
||||
|
||||
[formatter_debug]
|
||||
format = (%(name)s): %(asctime)s %(levelname)s %(module)s %(funcName)s %(message)s
|
||||
|
||||
# defines -all.log file location and rotation
|
||||
[handler_file]
|
||||
class = handlers.TimedRotatingFileHandler
|
||||
args = ('/var/log/cinder-all.log', 'midnight', 1, 7)
|
||||
@@ -32,10 +37,11 @@ formatter = normal_with_name
|
||||
|
||||
[handler_production]
|
||||
class = handlers.SysLogHandler
|
||||
level = <%= @syslog_log_level %>
|
||||
args = ('/dev/log', handlers.SysLogHandler.LOG_<%= @syslog_log_facility %>)
|
||||
formatter = debug
|
||||
|
||||
# TODO find out how it could be usefull
|
||||
# TODO find out how it could be usefull and how it should be used
|
||||
[handler_devel]
|
||||
class = StreamHandler
|
||||
formatter = debug
|
||||
|
||||
@@ -4,7 +4,10 @@
|
||||
|
||||
class glance(
|
||||
$package_ensure = 'present',
|
||||
# TODO syslog facilities from site.pp
|
||||
# TODO syslog common level from site.pp
|
||||
$syslog_log_facility = 'LOCAL2',
|
||||
$syslog_log_level = 'INFO',
|
||||
) {
|
||||
|
||||
include glance::params
|
||||
|
||||
@@ -1,30 +1,35 @@
|
||||
[loggers]
|
||||
keys = root,service
|
||||
|
||||
# devel is reserved for future usage
|
||||
[handlers]
|
||||
keys = production,file,devel
|
||||
|
||||
[formatters]
|
||||
keys = normal_with_name,debug
|
||||
|
||||
# defines level and logger for /var/log/{messages,syslog,kern.log} files
|
||||
# includes node FQDN, duplicates to corresponding -all.log file,
|
||||
# so level should be greater than one for service logger
|
||||
[logger_root]
|
||||
level = DEBUG
|
||||
#handlers = production
|
||||
handlers = devel
|
||||
level = <%= @syslog_log_level %>
|
||||
handlers = production
|
||||
qualname = glance
|
||||
|
||||
# defines level and logger for -all.log file
|
||||
# no node FQDN provided, duplicates nothing
|
||||
[logger_service]
|
||||
level = DEBUG
|
||||
handlers = file
|
||||
qualname = glance
|
||||
|
||||
[formatter_normal_with_name]
|
||||
#class = glance.openstack.common.log.LegacyFormatter
|
||||
format = %(asctime)s %(name)s: %(levelname)s %(message)s
|
||||
|
||||
[formatter_debug]
|
||||
format = (%(name)s): %(asctime)s %(levelname)s %(module)s %(funcName)s %(message)s
|
||||
|
||||
# defines -all.log file location and rotation
|
||||
[handler_file]
|
||||
class = handlers.TimedRotatingFileHandler
|
||||
args = ('/var/log/glance-all.log', 'midnight', 1, 7)
|
||||
@@ -32,10 +37,11 @@ formatter = normal_with_name
|
||||
|
||||
[handler_production]
|
||||
class = handlers.SysLogHandler
|
||||
level = <%= @syslog_log_level %>
|
||||
args = ('/dev/log', handlers.SysLogHandler.LOG_<%= @syslog_log_facility %>)
|
||||
formatter = debug
|
||||
|
||||
# TODO find out how it could be usefull
|
||||
# TODO find out how it could be usefull and how it should be used
|
||||
[handler_devel]
|
||||
class = StreamHandler
|
||||
formatter = debug
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
# 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 main syslog files (/var/log/{messages, syslog, kern.log}). Optional.
|
||||
# [catalog_type] Type of catalog that keystone uses to store endpoints,services. Optional.
|
||||
# Defaults to sql. (Also accepts template)
|
||||
# [token_format] Format keystone uses for tokens. Optional. Defaults to UUID (PKI is grizzly native mode though).
|
||||
@@ -51,22 +52,25 @@
|
||||
#
|
||||
class keystone(
|
||||
$admin_token,
|
||||
$package_ensure = 'present',
|
||||
$bind_host = '0.0.0.0',
|
||||
$public_port = '5000',
|
||||
$admin_port = '35357',
|
||||
$compute_port = '3000',
|
||||
$verbose = 'False',
|
||||
$debug = 'False',
|
||||
$use_syslog = false,
|
||||
$package_ensure = 'present',
|
||||
$bind_host = '0.0.0.0',
|
||||
$public_port = '5000',
|
||||
$admin_port = '35357',
|
||||
$compute_port = '3000',
|
||||
$verbose = 'False',
|
||||
$debug = 'False',
|
||||
$use_syslog = false,
|
||||
# TODO syslog facilities from site.pp
|
||||
# TODO syslog common level from site.pp
|
||||
$syslog_log_facility = 'LOCAL7',
|
||||
$catalog_type = 'sql',
|
||||
$token_format = 'UUID',
|
||||
# $token_format = 'PKI',
|
||||
$cache_dir = '/var/cache/keystone',
|
||||
$enabled = true,
|
||||
$sql_connection = 'sqlite:////var/lib/keystone/keystone.db',
|
||||
$idle_timeout = '200'
|
||||
$syslog_log_level = 'INFO',
|
||||
$catalog_type = 'sql',
|
||||
$token_format = 'UUID',
|
||||
# $token_format = 'PKI',
|
||||
$cache_dir = '/var/cache/keystone',
|
||||
$enabled = true,
|
||||
$sql_connection = 'sqlite:////var/lib/keystone/keystone.db',
|
||||
$idle_timeout = '200'
|
||||
) {
|
||||
|
||||
validate_re($catalog_type, 'template|sql')
|
||||
|
||||
@@ -1,30 +1,35 @@
|
||||
[loggers]
|
||||
keys = root,service
|
||||
|
||||
# devel is reserved for future usage
|
||||
[handlers]
|
||||
keys = production,file,devel
|
||||
|
||||
[formatters]
|
||||
keys = normal_with_name,debug
|
||||
|
||||
# defines level and logger for /var/log/{messages,syslog,kern.log} files
|
||||
# includes node FQDN, duplicates to corresponding -all.log file,
|
||||
# so level should be greater than one for service logger
|
||||
[logger_root]
|
||||
level = DEBUG
|
||||
#handlers = production
|
||||
handlers = devel
|
||||
level = <%= @syslog_log_level %>
|
||||
handlers = production
|
||||
qualname = keystone
|
||||
|
||||
# defines level and logger for -all.log file
|
||||
# no node FQDN provided, duplicates nothing
|
||||
[logger_service]
|
||||
level = DEBUG
|
||||
handlers = file
|
||||
qualname = keystone
|
||||
|
||||
[formatter_normal_with_name]
|
||||
#class = keystone.openstack.common.log.LegacyFormatter
|
||||
format = %(asctime)s %(name)s: %(levelname)s %(message)s
|
||||
|
||||
[formatter_debug]
|
||||
format = (%(name)s): %(asctime)s %(levelname)s %(module)s %(funcName)s %(message)s
|
||||
|
||||
# defines -all.log file location and rotation
|
||||
[handler_file]
|
||||
class = handlers.TimedRotatingFileHandler
|
||||
args = ('/var/log/keystone-all.log', 'midnight', 1, 7)
|
||||
@@ -32,10 +37,11 @@ formatter = normal_with_name
|
||||
|
||||
[handler_production]
|
||||
class = handlers.SysLogHandler
|
||||
level = <%= @syslog_log_level %>
|
||||
args = ('/dev/log', handlers.SysLogHandler.LOG_<%= @syslog_log_facility %>)
|
||||
formatter = debug
|
||||
|
||||
# TODO find out how it could be usefull
|
||||
# TODO find out how it could be usefull and how it should be used
|
||||
[handler_devel]
|
||||
class = StreamHandler
|
||||
formatter = debug
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
# [use_syslog] Rather or not service should log to syslog. Optional.
|
||||
# [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 main syslog files (/var/log/{messages, syslog, kern.log}). Optional.
|
||||
#
|
||||
class nova(
|
||||
$ensure_package = 'present',
|
||||
@@ -42,7 +43,10 @@ class nova(
|
||||
$nova_cluster_id='localcluster',
|
||||
$sql_connection = false,
|
||||
$use_syslog = false,
|
||||
# TODO syslog facilities from site.pp
|
||||
# TODO syslog common level from site.pp
|
||||
$syslog_log_facility = "LOCAL6",
|
||||
$syslog_log_level = 'INFO',
|
||||
$image_service = 'nova.image.glance.GlanceImageService',
|
||||
# these glance params should be optional
|
||||
# this should probably just be configured as a glance client
|
||||
|
||||
@@ -1,30 +1,35 @@
|
||||
[loggers]
|
||||
keys = root,service
|
||||
|
||||
# devel is reserved for future usage
|
||||
[handlers]
|
||||
keys = production,file,devel
|
||||
|
||||
[formatters]
|
||||
keys = normal_with_name,debug
|
||||
|
||||
# defines level and logger for /var/log/{messages,syslog,kern.log} files
|
||||
# includes node FQDN, duplicates to corresponding -all.log file,
|
||||
# so level should be greater than one for service logger
|
||||
[logger_root]
|
||||
level = DEBUG
|
||||
#handlers = production
|
||||
handlers = devel
|
||||
level = <%= @syslog_log_level %>
|
||||
handlers = production
|
||||
qualname = nova
|
||||
|
||||
# defines level and logger for -all.log file
|
||||
# no node FQDN provided, duplicates nothing
|
||||
[logger_service]
|
||||
level = DEBUG
|
||||
handlers = file
|
||||
qualname = nova
|
||||
|
||||
[formatter_normal_with_name]
|
||||
#class = nova.openstack.common.log.LegacyFormatter
|
||||
format = %(asctime)s %(name)s: %(levelname)s %(message)s
|
||||
|
||||
[formatter_debug]
|
||||
format = (%(name)s): %(asctime)s %(levelname)s %(module)s %(funcName)s %(message)s
|
||||
|
||||
# defines -all.log file location and rotation
|
||||
[handler_file]
|
||||
class = handlers.TimedRotatingFileHandler
|
||||
args = ('/var/log/nova-all.log', 'midnight', 1, 7)
|
||||
@@ -32,10 +37,11 @@ formatter = normal_with_name
|
||||
|
||||
[handler_production]
|
||||
class = handlers.SysLogHandler
|
||||
level = <%= @syslog_log_level %>
|
||||
args = ('/dev/log', handlers.SysLogHandler.LOG_<%= @syslog_log_facility %>)
|
||||
formatter = debug
|
||||
|
||||
# TODO find out how it could be usefull
|
||||
# TODO find out how it could be usefull and how it should be used
|
||||
[handler_devel]
|
||||
class = StreamHandler
|
||||
formatter = debug
|
||||
|
||||
@@ -38,6 +38,7 @@
|
||||
# [use_syslog] Rather or not service should log to syslog. Optional.
|
||||
# [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 main syslog files (/var/log/{messages, syslog, kern.log}). Optional.
|
||||
#
|
||||
# === Examples
|
||||
#
|
||||
@@ -143,6 +144,9 @@ class openstack::all (
|
||||
$service_endpoint = '127.0.0.1',
|
||||
$glance_backend = 'file',
|
||||
$use_syslog = false,
|
||||
# TODO syslog facilities for services from site.pp
|
||||
# TODO syslog common level for services from site.pp
|
||||
$syslog_log_level = 'INFO',
|
||||
$nova_rate_limits = undef,
|
||||
) {
|
||||
|
||||
@@ -213,6 +217,7 @@ class openstack::all (
|
||||
quantum_user_password => $quantum_user_password,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => 'LOCAL7',
|
||||
syslog_log_level => $syslog_log_level,
|
||||
}
|
||||
|
||||
######## GLANCE ##########
|
||||
@@ -232,6 +237,7 @@ class openstack::all (
|
||||
registry_host => $service_endpoint,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => 'LOCAL2',
|
||||
syslog_log_level => $syslog_log_level,
|
||||
}
|
||||
|
||||
######## NOVA ###########
|
||||
@@ -310,6 +316,7 @@ class openstack::all (
|
||||
verbose => $verbose,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => 'LOCAL6',
|
||||
syslog_log_level => $syslog_log_level,
|
||||
rabbit_host => '127.0.0.1',
|
||||
}
|
||||
|
||||
@@ -364,6 +371,7 @@ class openstack::all (
|
||||
rabbit_password => $rabbit_password,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => 'LOCAL4',
|
||||
syslog_log_level => $syslog_log_level,
|
||||
}
|
||||
|
||||
class { 'quantum::server':
|
||||
|
||||
@@ -1,26 +1,30 @@
|
||||
# [use_syslog] Rather or not service should log to syslog. Optional.
|
||||
# [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 main syslog files (/var/log/{messages, syslog, kern.log}). Optional.
|
||||
|
||||
class openstack::cinder(
|
||||
$sql_connection,
|
||||
$cinder_user_password,
|
||||
$rabbit_password,
|
||||
$rabbit_host = false,
|
||||
$rabbit_nodes = ['127.0.0.1'],
|
||||
$rabbit_ha_virtual_ip = false,
|
||||
$rabbit_host = false,
|
||||
$rabbit_nodes = ['127.0.0.1'],
|
||||
$rabbit_ha_virtual_ip = false,
|
||||
$glance_api_servers,
|
||||
$volume_group = 'cinder-volumes',
|
||||
$physical_volume = undef,
|
||||
$manage_volumes = false,
|
||||
$enabled = true,
|
||||
$purge_cinder_config = true,
|
||||
$auth_host = '127.0.0.1',
|
||||
$bind_host = '0.0.0.0',
|
||||
$iscsi_bind_host = '0.0.0.0',
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOCAL3',
|
||||
$cinder_rate_limits = undef
|
||||
$volume_group = 'cinder-volumes',
|
||||
$physical_volume = undef,
|
||||
$manage_volumes = false,
|
||||
$enabled = true,
|
||||
$purge_cinder_config = true,
|
||||
$auth_host = '127.0.0.1',
|
||||
$bind_host = '0.0.0.0',
|
||||
$iscsi_bind_host = '0.0.0.0',
|
||||
$use_syslog = false,
|
||||
# TODO syslog facilities from site.pp
|
||||
# TODO syslog common level from site.pp
|
||||
$syslog_log_facility = 'LOCAL3',
|
||||
$syslog_log_level = 'INFO',
|
||||
$cinder_rate_limits = undef
|
||||
) {
|
||||
include cinder::params
|
||||
# if ($purge_cinder_config) {
|
||||
@@ -59,6 +63,7 @@ class openstack::cinder(
|
||||
verbose => $verbose,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
}
|
||||
if ($bind_host) {
|
||||
class { 'cinder::api':
|
||||
|
||||
@@ -45,6 +45,7 @@
|
||||
# [use_syslog] Rather or not service should log to syslog. Optional.
|
||||
# [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 main syslog files (/var/log/{messages, syslog, kern.log}). Optional.
|
||||
#
|
||||
# class { 'openstack::nova::compute':
|
||||
# internal_address => '192.168.2.2',
|
||||
@@ -92,29 +93,31 @@ class openstack::compute (
|
||||
$tenant_network_type = 'gre',
|
||||
$segment_range = '1:4094',
|
||||
# nova compute configuration parameters
|
||||
$verbose = false,
|
||||
$service_endpoint = '127.0.0.1',
|
||||
$ssh_private_key = undef,
|
||||
$cache_server_ip = ['127.0.0.1'],
|
||||
$cache_server_port = '11211',
|
||||
$ssh_public_key = undef,
|
||||
$verbose = false,
|
||||
$service_endpoint = '127.0.0.1',
|
||||
$ssh_private_key = undef,
|
||||
$cache_server_ip = ['127.0.0.1'],
|
||||
$cache_server_port = '11211',
|
||||
$ssh_public_key = undef,
|
||||
# if the cinder management components should be installed
|
||||
$manage_volumes = false,
|
||||
$nv_physical_volume = undef,
|
||||
$cinder_volume_group = 'cinder-volumes',
|
||||
$cinder = true,
|
||||
$cinder_user_password = 'cinder_user_pass',
|
||||
$cinder_db_password = 'cinder_db_pass',
|
||||
$cinder_db_user = 'cinder',
|
||||
$cinder_db_dbname = 'cinder',
|
||||
$cinder_iscsi_bind_addr = false,
|
||||
$db_host = '127.0.0.1',
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOCAL6',
|
||||
$nova_rate_limits = undef,
|
||||
$cinder_rate_limits = undef,
|
||||
$create_networks = false,
|
||||
$state_path = '/var/lib/nova'
|
||||
$manage_volumes = false,
|
||||
$nv_physical_volume = undef,
|
||||
$cinder_volume_group = 'cinder-volumes',
|
||||
$cinder = true,
|
||||
$cinder_user_password = 'cinder_user_pass',
|
||||
$cinder_db_password = 'cinder_db_pass',
|
||||
$cinder_db_user = 'cinder',
|
||||
$cinder_db_dbname = 'cinder',
|
||||
$cinder_iscsi_bind_addr = false,
|
||||
$db_host = '127.0.0.1',
|
||||
$use_syslog = false,
|
||||
# TODO syslog facilities for compute services from site.pp
|
||||
# TODO syslog common level for compute services from site.pp
|
||||
$syslog_log_facility = 'LOCAL6',
|
||||
$syslog_log_level = 'INFO',
|
||||
$nova_rate_limits = undef,
|
||||
$cinder_rate_limits = undef,
|
||||
$create_networks = false
|
||||
) {
|
||||
|
||||
#
|
||||
@@ -178,6 +181,7 @@ class openstack::compute (
|
||||
rabbit_host => $rabbit_host,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
api_bind_address => $internal_address,
|
||||
rabbit_ha_virtual_ip => $rabbit_ha_virtual_ip,
|
||||
state_path => $state_path,
|
||||
@@ -202,7 +206,6 @@ class openstack::compute (
|
||||
iscsi_bind_host => $cinder_iscsi_bind_addr,
|
||||
cinder_user_password => $cinder_user_password,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
cinder_rate_limits => $cinder_rate_limits,
|
||||
rabbit_ha_virtual_ip => $rabbit_ha_virtual_ip,
|
||||
}
|
||||
@@ -356,7 +359,6 @@ class openstack::compute (
|
||||
rabbit_user => $rabbit_user,
|
||||
rabbit_password => $rabbit_password,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
rabbit_ha_virtual_ip => $rabbit_ha_virtual_ip,
|
||||
}
|
||||
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
# [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.
|
||||
# [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 main syslog files (/var/log/{messages, syslog, kern.log}). Optional.
|
||||
#
|
||||
# === Examples
|
||||
#
|
||||
@@ -164,6 +167,9 @@ class openstack::controller (
|
||||
$manage_volumes = false,
|
||||
$nv_physical_volume = undef,
|
||||
$use_syslog = false,
|
||||
# TODO syslog facilities for controller services from site.pp
|
||||
# TODO syslog common level for controller services from site.pp
|
||||
$syslog_log_level = 'INFO',
|
||||
$horizon_use_ssl = false,
|
||||
$nova_rate_limits = undef,
|
||||
$cinder_rate_limits = undef,
|
||||
@@ -250,6 +256,7 @@ class openstack::controller (
|
||||
package_ensure => $::openstack_keystone_version,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => 'LOCAL7',
|
||||
syslog_log_level => $syslog_log_level,
|
||||
}
|
||||
|
||||
|
||||
@@ -270,6 +277,7 @@ class openstack::controller (
|
||||
registry_host => $service_endpoint,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => 'LOCAL2',
|
||||
syslog_log_level => $syslog_log_level,
|
||||
}
|
||||
|
||||
######## BEGIN NOVA ###########
|
||||
@@ -342,6 +350,7 @@ class openstack::controller (
|
||||
ensure_package => $::openstack_version['nova'],
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => 'LOCAL6',
|
||||
syslog_log_level => $syslog_log_level,
|
||||
nova_rate_limits => $nova_rate_limits,
|
||||
cinder => $cinder
|
||||
}
|
||||
@@ -365,6 +374,7 @@ class openstack::controller (
|
||||
cinder_user_password => $cinder_user_password,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => 'LOCAL3',
|
||||
syslog_log_level => $syslog_log_level,
|
||||
cinder_rate_limits => $cinder_rate_limits,
|
||||
rabbit_ha_virtual_ip => $rabbit_ha_virtual_ip,
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
# [use_syslog] Rather or not service should log to syslog. Optional.
|
||||
# [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 main syslog files (/var/log/{messages, syslog, kern.log}). Optional.
|
||||
#
|
||||
# === Example
|
||||
#
|
||||
@@ -50,6 +51,7 @@ class openstack::glance (
|
||||
$use_syslog = false,
|
||||
# Facility is common for all glance services
|
||||
$syslog_log_facility = 'LOCAL2',
|
||||
$syslog_log_level = 'INFO',
|
||||
) {
|
||||
|
||||
# Configure the db string
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
# [use_syslog] Rather or not service should log to syslog. Optional.
|
||||
# [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 main syslog files (/var/log/{messages, syslog, kern.log}). Optional.
|
||||
#
|
||||
# === Example
|
||||
#
|
||||
@@ -77,9 +78,12 @@ class openstack::keystone (
|
||||
$cinder = true,
|
||||
$quantum = true,
|
||||
$enabled = true,
|
||||
$package_ensure = present,
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOCAL7',
|
||||
$package_ensure = present,
|
||||
$use_syslog = false,
|
||||
# TODO syslog facilities from site.pp
|
||||
# TODO syslog common level from site.pp
|
||||
$syslog_log_facility = 'LOCAL7',
|
||||
$syslog_log_level = 'INFO',
|
||||
) {
|
||||
|
||||
# Install and configure Keystone
|
||||
@@ -173,6 +177,7 @@ class openstack::keystone (
|
||||
package_ensure => $package_ensure,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
}
|
||||
|
||||
if ($enabled) {
|
||||
|
||||
@@ -81,7 +81,10 @@ class openstack::nova::controller (
|
||||
$enabled_apis = 'ec2,osapi_compute',
|
||||
$api_bind_address = '0.0.0.0',
|
||||
$use_syslog = false,
|
||||
# TODO syslog facilities for nova services from site.pp
|
||||
# TODO syslog common level for nova services from site.pp
|
||||
$syslog_log_facility = 'LOCAL6',
|
||||
$syslog_log_level = 'INFO',
|
||||
$nova_rate_limits = undef,
|
||||
$cinder = true
|
||||
) {
|
||||
@@ -155,6 +158,7 @@ class openstack::nova::controller (
|
||||
api_bind_address => $api_bind_address,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
rabbit_ha_virtual_ip => $rabbit_ha_virtual_ip,
|
||||
}
|
||||
} else {
|
||||
@@ -170,6 +174,7 @@ class openstack::nova::controller (
|
||||
api_bind_address => $api_bind_address,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
}
|
||||
}
|
||||
class {'nova::quota':
|
||||
@@ -241,7 +246,8 @@ class openstack::nova::controller (
|
||||
verbose => $verbose,
|
||||
debug => $verbose,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => 'LOCAL4',
|
||||
# TODO syslog facilities from site.pp
|
||||
# TODO syslog common level from site.pp
|
||||
}
|
||||
}
|
||||
class { 'nova::network::quantum':
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# [use_syslog] Rather or not service should log to syslog. Optional.
|
||||
# [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 main syslog files (/var/log/{messages, syslog, kern.log}). Optional.
|
||||
|
||||
class openstack::quantum_router (
|
||||
$db_host,
|
||||
@@ -36,7 +37,10 @@ class openstack::quantum_router (
|
||||
$quantum_netnode_on_cnt = false,
|
||||
$tenant_network_type = 'gre',
|
||||
$use_syslog = false,
|
||||
# TODO syslog facility from site.pp
|
||||
# TODO syslog common level from site.pp
|
||||
$syslog_log_facility = 'LOCAL4',
|
||||
$syslog_log_level = 'INFO',
|
||||
$ha_mode = false,
|
||||
$service_provider = 'generic'
|
||||
) {
|
||||
@@ -57,6 +61,7 @@ class openstack::quantum_router (
|
||||
debug => $verbose,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
server_ha_mode => $ha_mode,
|
||||
|
||||
}
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
# [use_syslog] Rather or not service should log to syslog. Optional.
|
||||
# [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 main syslog files (/var/log/{messages, syslog, kern.log}). Optional.
|
||||
#
|
||||
class quantum (
|
||||
$rabbit_password,
|
||||
@@ -29,6 +30,7 @@ class quantum (
|
||||
$log_file = '/var/log/quantum/server.log',
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOCAL4',
|
||||
$syslog_log_level = 'INFO',
|
||||
) {
|
||||
include 'quantum::params'
|
||||
|
||||
|
||||
@@ -1,30 +1,35 @@
|
||||
[loggers]
|
||||
keys = root,service
|
||||
|
||||
# devel is reserved for future usage
|
||||
[handlers]
|
||||
keys = production,file,devel
|
||||
|
||||
[formatters]
|
||||
keys = normal_with_name,debug
|
||||
|
||||
# defines level and logger for /var/log/{messages,syslog,kern.log} files
|
||||
# includes node FQDN, duplicates to corresponding -all.log file,
|
||||
# so level should be greater than one for service logger
|
||||
[logger_root]
|
||||
level = DEBUG
|
||||
#handlers = production
|
||||
handlers = devel
|
||||
level = <%= @syslog_log_level %>
|
||||
handlers = production
|
||||
qualname = quantum
|
||||
|
||||
# defines level and logger for -all.log file
|
||||
# no node FQDN provided, duplicates nothing
|
||||
[logger_service]
|
||||
level = DEBUG
|
||||
handlers = file
|
||||
qualname = quantum
|
||||
|
||||
[formatter_normal_with_name]
|
||||
#class = quantum.openstack.common.log.LegacyFormatter
|
||||
format = %(asctime)s %(name)s: %(levelname)s %(message)s
|
||||
|
||||
[formatter_debug]
|
||||
format = (%(name)s): %(asctime)s %(levelname)s %(module)s %(funcName)s %(message)s
|
||||
|
||||
# defines -all.log file location and rotation
|
||||
[handler_file]
|
||||
class = handlers.TimedRotatingFileHandler
|
||||
args = ('/var/log/quantum-all.log', 'midnight', 1, 7)
|
||||
@@ -32,10 +37,11 @@ formatter = normal_with_name
|
||||
|
||||
[handler_production]
|
||||
class = handlers.SysLogHandler
|
||||
level = <%= @syslog_log_level %>
|
||||
args = ('/dev/log', handlers.SysLogHandler.LOG_<%= @syslog_log_facility %>)
|
||||
formatter = debug
|
||||
|
||||
# TODO find out how it could be usefull
|
||||
# TODO find out how it could be usefull and how it should be used
|
||||
[handler_devel]
|
||||
class = StreamHandler
|
||||
formatter = debug
|
||||
|
||||
Reference in New Issue
Block a user