Sync logging from upstream puppet modules for OS
* Sync log_dir/log_file/use_syslog usage from upstream in order to use the same logging guidelines for all OS modules in Fuel as well * Add new use_syslog_rfc_format option in addition to use_syslog in order to ensure RFC5424 comliant logging to syslog for all OS services * Add section for handling the deprecated things in OS logging class * Fix remote logs matching for multiline messages (Use octet-framing at sender side) * Simplify matching logic (&~) for remote logs processing * Remove artificial separation for DEBUG and other OS logging cases * Remove unneeded anymore imfile::templates * Remove unneeded anymore python log configs templates for OS and syslog_log_level option used for its log configs as well * Remove artificial logging w/a for Neutron and its imfile templates * Fix ceilometer facility to LOCAL0 and its facility parameter usage * Move Fuel customizations from rsyslog module to openstack * Move custom logging templates and configuration * Move checksum_udp and use rsyslog port as a class var * Keep custom port and escapenewline vars for rsyslog module, * Disable RELP package for syslog module unless it would be used in Fuel * Fix identations... Implemenets step2 for blueprint refactor-logging-puppet-openstack-services Change-Id: Ie20725b9c91584311350a520107a79a4828937bc Signed-off-by: Bogdan Dobrelya <bdobrelia@mirantis.com>
This commit is contained in:
parent
b63f3233d5
commit
a3ec3ce2b8
|
@ -11,6 +11,16 @@
|
||||||
# should the daemons log verbose messages. Optional. Defaults to false
|
# should the daemons log verbose messages. Optional. Defaults to false
|
||||||
# [*debug*]
|
# [*debug*]
|
||||||
# should the daemons log debug messages. Optional. Defaults to false
|
# should the daemons log debug messages. Optional. Defaults to false
|
||||||
|
# [*log_dir*]
|
||||||
|
# (optional) directory to which ceilometer logs are sent.
|
||||||
|
# If set to boolean false, it will not log to any directory.
|
||||||
|
# Defaults to '/var/log/ceilometer'
|
||||||
|
# [*use_syslog*]
|
||||||
|
# (optional) Use syslog for logging
|
||||||
|
# Defaults to false
|
||||||
|
# [*syslog_log_facility*]
|
||||||
|
# (optional) Syslog facility to receive log lines.
|
||||||
|
# Defaults to 'LOG_LOCAL0'
|
||||||
# [*amqp_hosts*]
|
# [*amqp_hosts*]
|
||||||
# AMQP servers connection string. Optional. Defaults to '127.0.0.1'
|
# AMQP servers connection string. Optional. Defaults to '127.0.0.1'
|
||||||
# [*amqp_user*]
|
# [*amqp_user*]
|
||||||
|
@ -27,9 +37,9 @@ class ceilometer(
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$verbose = false,
|
$verbose = false,
|
||||||
$debug = false,
|
$debug = false,
|
||||||
|
$log_dir = '/var/log/ceilometer',
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
$syslog_log_facility = 'LOG_SYSLOG',
|
$syslog_log_facility = 'LOG_LOCAL0',
|
||||||
$syslog_log_level = 'WARNING',
|
|
||||||
$queue_provider = 'rabbitmq',
|
$queue_provider = 'rabbitmq',
|
||||||
$amqp_hosts = '127.0.0.1',
|
$amqp_hosts = '127.0.0.1',
|
||||||
$amqp_user = 'guest',
|
$amqp_user = 'guest',
|
||||||
|
@ -111,29 +121,27 @@ class ceilometer(
|
||||||
'DEFAULT/verbose' : value => $verbose;
|
'DEFAULT/verbose' : value => $verbose;
|
||||||
}
|
}
|
||||||
|
|
||||||
# Configure logging
|
# Log configuration
|
||||||
if $use_syslog and !$debug { #syslog and nondebug case
|
if $log_dir {
|
||||||
File['ceilometer-logging.conf'] -> Ceilometer_config['DEFAULT/log_config']
|
|
||||||
ceilometer_config {
|
ceilometer_config {
|
||||||
'DEFAULT/log_config' : value => '/etc/ceilometer/logging.conf';
|
'DEFAULT/log_dir' : value => $log_dir;
|
||||||
'DEFAULT/use_syslog' : value => true;
|
|
||||||
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
|
||||||
}
|
}
|
||||||
file { 'ceilometer-logging.conf':
|
} else {
|
||||||
content => template('ceilometer/logging.conf.erb'),
|
|
||||||
path => '/etc/ceilometer/logging.conf',
|
|
||||||
}
|
|
||||||
# We must notify services to apply new logging rules
|
|
||||||
File['ceilometer-logging.conf'] ~> Service <| title == 'ceilometer-api' |>
|
|
||||||
File['ceilometer-logging.conf'] ~> Service <| title == 'ceilometer-collector' |>
|
|
||||||
File['ceilometer-logging.conf'] ~> Service <| title == 'ceilometer-agent-central' |>
|
|
||||||
File['ceilometer-logging.conf'] ~> Service <| title == 'ceilometer-agent-compute' |>
|
|
||||||
File['ceilometer-logging.conf'] ~> Service <| title == 'ceilometer-agent-notification' |>
|
|
||||||
} else { #other syslog debug or nonsyslog debug/nondebug cases
|
|
||||||
ceilometer_config {
|
ceilometer_config {
|
||||||
'DEFAULT/log_config': ensure => absent;
|
'DEFAULT/log_dir' : ensure => absent;
|
||||||
'DEFAULT/log_dir': value => $::ceilometer::params::log_dir;
|
}
|
||||||
'DEFAULT/use_syslog': value => false;
|
}
|
||||||
|
|
||||||
|
# Syslog configuration
|
||||||
|
if $use_syslog {
|
||||||
|
ceilometer_config {
|
||||||
|
'DEFAULT/use_syslog': value => true;
|
||||||
|
'DEFAULT/use_syslog_rfc_format': value => true;
|
||||||
|
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ceilometer_config {
|
||||||
|
'DEFAULT/use_syslog': value => false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,7 +4,6 @@ class ceilometer::params {
|
||||||
|
|
||||||
$dbsync_command =
|
$dbsync_command =
|
||||||
'ceilometer-dbsync --config-file=/etc/ceilometer/ceilometer.conf'
|
'ceilometer-dbsync --config-file=/etc/ceilometer/ceilometer.conf'
|
||||||
$log_dir = '/var/log/ceilometer'
|
|
||||||
|
|
||||||
# ssl keys/certs
|
# ssl keys/certs
|
||||||
$ssl_cert_file = '/etc/keystone/ssl/certs/signing_cert.pem'
|
$ssl_cert_file = '/etc/keystone/ssl/certs/signing_cert.pem'
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
[loggers]
|
|
||||||
keys = root
|
|
||||||
|
|
||||||
[handlers]
|
|
||||||
keys = production,devel,stderr
|
|
||||||
|
|
||||||
[formatters]
|
|
||||||
keys = normal,debug
|
|
||||||
|
|
||||||
[logger_root]
|
|
||||||
level = NOTSET
|
|
||||||
handlers = production,devel,stderr
|
|
||||||
propagate = 1
|
|
||||||
|
|
||||||
[formatter_debug]
|
|
||||||
format = ceilometer-%(name)s %(levelname)s: %(module)s %(funcName)s %(message)s
|
|
||||||
|
|
||||||
[formatter_normal]
|
|
||||||
format = ceilometer-%(name)s %(levelname)s: %(message)s
|
|
||||||
|
|
||||||
# logging info to <%= @syslog_log_facility %> with debug:<%= @debug %> and verbose:<%= @verbose %>
|
|
||||||
[handler_production]
|
|
||||||
class = handlers.SysLogHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = ('/dev/log', handlers.SysLogHandler.<%= @syslog_log_facility %>)
|
|
||||||
|
|
||||||
# TODO find out how it could be usefull and how it should be used
|
|
||||||
[handler_stderr]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stderr,)
|
|
||||||
|
|
||||||
[handler_devel]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stdout,)
|
|
|
@ -90,7 +90,6 @@ class ceph (
|
||||||
enable => true,
|
enable => true,
|
||||||
require => Class['ceph::conf']
|
require => Class['ceph::conf']
|
||||||
}
|
}
|
||||||
#FIXME(bogdando) using collection for clumsy params-ensured packages
|
|
||||||
Package<| title == 'ceph' |> ~> Service<| title == 'ceph' |>
|
Package<| title == 'ceph' |> ~> Service<| title == 'ceph' |>
|
||||||
if !defined(Service['ceph']) {
|
if !defined(Service['ceph']) {
|
||||||
notify{ "Module ${module_name} cannot notify service ceph on packages update": }
|
notify{ "Module ${module_name} cannot notify service ceph on packages update": }
|
||||||
|
|
|
@ -3,9 +3,19 @@
|
||||||
# $state_path = /opt/stack/data/cinder
|
# $state_path = /opt/stack/data/cinder
|
||||||
# $osapi_volume_extension = cinder.api.openstack.volume.contrib.standard_extensions
|
# $osapi_volume_extension = cinder.api.openstack.volume.contrib.standard_extensions
|
||||||
# $root_helper = sudo /usr/local/bin/cinder-rootwrap /etc/cinder/rootwrap.conf
|
# $root_helper = sudo /usr/local/bin/cinder-rootwrap /etc/cinder/rootwrap.conf
|
||||||
# $use_syslog = Rather or not service should log to syslog. Optional.
|
# [*use_syslog*]
|
||||||
# $syslog_log_facility = Facility for syslog, if used. Optional.
|
# Use syslog for logging.
|
||||||
# $syslog_log_level = logging level for non verbose and non debug mode. Optional.
|
# (Optional) Defaults to false.
|
||||||
|
#
|
||||||
|
# [*syslog_log_facility*]
|
||||||
|
# Syslog facility to receive log lines.
|
||||||
|
# (Optional) Defaults to LOG_LOCAL3.
|
||||||
|
#
|
||||||
|
# [*log_dir*]
|
||||||
|
# (optional) Directory where logs should be stored.
|
||||||
|
# If set to boolean false, it will not log to any directory.
|
||||||
|
# Defaults to '/var/log/cinder'
|
||||||
|
#
|
||||||
|
|
||||||
class cinder::base (
|
class cinder::base (
|
||||||
$sql_connection,
|
$sql_connection,
|
||||||
|
@ -19,7 +29,6 @@ class cinder::base (
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
$syslog_log_facility = 'LOG_LOCAL3',
|
$syslog_log_facility = 'LOG_LOCAL3',
|
||||||
$syslog_log_level = 'WARNING',
|
|
||||||
$log_dir = '/var/log/cinder',
|
$log_dir = '/var/log/cinder',
|
||||||
$idle_timeout = '3600',
|
$idle_timeout = '3600',
|
||||||
$max_pool_size = '10',
|
$max_pool_size = '10',
|
||||||
|
@ -53,29 +62,6 @@ class cinder::base (
|
||||||
require => Package['cinder'],
|
require => Package['cinder'],
|
||||||
}
|
}
|
||||||
|
|
||||||
if $use_syslog and !$debug { #syslog and nondebug case
|
|
||||||
cinder_config {
|
|
||||||
'DEFAULT/log_config': value => "/etc/cinder/logging.conf";
|
|
||||||
'DEFAULT/use_syslog': value => true;
|
|
||||||
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
|
||||||
}
|
|
||||||
file { "cinder-logging.conf":
|
|
||||||
content => template('cinder/logging.conf.erb'),
|
|
||||||
path => "/etc/cinder/logging.conf",
|
|
||||||
require => File[$::cinder::params::cinder_conf],
|
|
||||||
}
|
|
||||||
# We must notify services to apply new logging rules
|
|
||||||
File['cinder-logging.conf'] ~> Service <| title == 'cinder-api' |>
|
|
||||||
File['cinder-logging.conf'] ~> Service <| title == 'cinder-volume' |>
|
|
||||||
File['cinder-logging.conf'] ~> Service <| title == 'cinder-scheduler' |>
|
|
||||||
} else { #other syslog debug or nonsyslog debug/nondebug cases
|
|
||||||
cinder_config {
|
|
||||||
'DEFAULT/log_config': ensure=> absent;
|
|
||||||
'DEFAULT/logdir': value=> $log_dir;
|
|
||||||
'DEFAULT/use_syslog': value => false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
file { $::cinder::params::cinder_conf: }
|
file { $::cinder::params::cinder_conf: }
|
||||||
file { $::cinder::params::cinder_paste_api_ini: }
|
file { $::cinder::params::cinder_paste_api_ini: }
|
||||||
|
|
||||||
|
@ -131,10 +117,33 @@ class cinder::base (
|
||||||
tries => 10,
|
tries => 10,
|
||||||
try_sleep => 3,
|
try_sleep => 3,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $log_dir {
|
||||||
|
cinder_config {
|
||||||
|
'DEFAULT/log_dir': value => $log_dir;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cinder_config {
|
||||||
|
'DEFAULT/log_dir': ensure => absent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if $use_syslog {
|
||||||
|
cinder_config {
|
||||||
|
'DEFAULT/use_syslog': value => true;
|
||||||
|
'DEFAULT/use_syslog_rfc_format': value => true;
|
||||||
|
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
cinder_config {
|
||||||
|
'DEFAULT/use_syslog': value => false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Cinder_config<||> -> Exec['cinder-manage db_sync']
|
Cinder_config<||> -> Exec['cinder-manage db_sync']
|
||||||
Nova_config<||> -> Exec['cinder-manage db_sync']
|
Nova_config<||> -> Exec['cinder-manage db_sync']
|
||||||
Cinder_api_paste_ini<||> -> Exec['cinder-manage db_sync']
|
Cinder_api_paste_ini<||> -> Exec['cinder-manage db_sync']
|
||||||
Exec['cinder-manage db_sync'] -> Service<| title == $::cinder::params::api_service |>
|
Exec['cinder-manage db_sync'] -> Service<| title == $::cinder::params::api_service |>
|
||||||
Exec['cinder-manage db_sync'] -> Service<| title == $::cinder::params::volume_service |>
|
Exec['cinder-manage db_sync'] -> Service<| title == $::cinder::params::volume_service |>
|
||||||
Exec['cinder-manage db_sync'] -> Service<| title == $::cinder::params::scheduler_service |>
|
Exec['cinder-manage db_sync'] -> Service<| title == $::cinder::params::scheduler_service |>
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
[loggers]
|
|
||||||
keys = root
|
|
||||||
|
|
||||||
[handlers]
|
|
||||||
keys = production,devel,stderr
|
|
||||||
|
|
||||||
[formatters]
|
|
||||||
keys = normal,debug
|
|
||||||
|
|
||||||
[logger_root]
|
|
||||||
level = NOTSET
|
|
||||||
handlers = production,devel,stderr
|
|
||||||
propagate = 1
|
|
||||||
|
|
||||||
[formatter_debug]
|
|
||||||
format = cinder-%(name)s %(levelname)s: %(module)s %(funcName)s %(message)s
|
|
||||||
|
|
||||||
[formatter_normal]
|
|
||||||
format = cinder-%(name)s %(levelname)s: %(message)s
|
|
||||||
|
|
||||||
# logging info to <%= @syslog_log_facility %> with debug:<%= @debug %> and verbose:<%= @verbose %>
|
|
||||||
[handler_production]
|
|
||||||
class = handlers.SysLogHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = ('/dev/log', handlers.SysLogHandler.<%= @syslog_log_facility %>)
|
|
||||||
|
|
||||||
# TODO find out how it could be usefull and how it should be used
|
|
||||||
[handler_stderr]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stderr,)
|
|
||||||
|
|
||||||
[handler_devel]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stdout,)
|
|
|
@ -23,8 +23,23 @@
|
||||||
# $registry_port - The port of the Glance registry service.
|
# $registry_port - The port of the Glance registry service.
|
||||||
# Optional. Default: 9191
|
# Optional. Default: 9191
|
||||||
#
|
#
|
||||||
# $log_file - The path of file used for logging
|
# [*use_syslog*]
|
||||||
# Optional. Default: /var/log/glance/api.log
|
# (optional) Use syslog for logging.
|
||||||
|
# Defaults to false.
|
||||||
|
#
|
||||||
|
# [*syslog_log_facility*]
|
||||||
|
# (optional) Syslog facility to receive log lines.
|
||||||
|
# Defaults to LOG_LOCAL2.
|
||||||
|
#
|
||||||
|
# [*log_file*]
|
||||||
|
# (optional) The path of file used for logging
|
||||||
|
# If set to boolean false, it will not log to any file.
|
||||||
|
# Default: /var/log/glance/api.log
|
||||||
|
#
|
||||||
|
# [*log_dir*]
|
||||||
|
# (optional) directory to which glance logs are sent.
|
||||||
|
# If set to boolean false, it will not log to any directory.
|
||||||
|
# Defaults to '/var/log/glance'
|
||||||
#
|
#
|
||||||
# $prune_hour - cron hour to launch glance-cache-pruner.
|
# $prune_hour - cron hour to launch glance-cache-pruner.
|
||||||
# Optional. Default: 0
|
# Optional. Default: 0
|
||||||
|
@ -39,44 +54,42 @@
|
||||||
# $clean_minute - cron minute to launch glance-cache-cleaner.
|
# $clean_minute - cron minute to launch glance-cache-cleaner.
|
||||||
# Optional. Default: 0
|
# Optional. Default: 0
|
||||||
#
|
#
|
||||||
# $use_syslog - Rather or not service should log to syslog. Optional.
|
|
||||||
# Default: false
|
|
||||||
#
|
#
|
||||||
class glance::api(
|
class glance::api(
|
||||||
$keystone_password,
|
$keystone_password,
|
||||||
$verbose = false,
|
$verbose = false,
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$bind_host = '0.0.0.0',
|
$bind_host = '0.0.0.0',
|
||||||
$bind_port = '9292',
|
$bind_port = '9292',
|
||||||
$backlog = '4096',
|
$backlog = '4096',
|
||||||
$workers = $::processorcount,
|
$workers = $::processorcount,
|
||||||
$log_file = '/var/log/glance/api.log',
|
$log_file = '/var/log/glance/api.log',
|
||||||
$registry_host = '0.0.0.0',
|
$log_dir = '/var/log/glance',
|
||||||
$registry_port = '9191',
|
$registry_host = '0.0.0.0',
|
||||||
$auth_type = 'keystone',
|
$registry_port = '9191',
|
||||||
$auth_host = '127.0.0.1',
|
$auth_type = 'keystone',
|
||||||
$auth_port = '35357',
|
$auth_host = '127.0.0.1',
|
||||||
$auth_protocol = 'http',
|
$auth_port = '35357',
|
||||||
$auth_url = "http://127.0.0.1:5000/",
|
$auth_protocol = 'http',
|
||||||
$keystone_tenant = 'admin',
|
$auth_url = "http://127.0.0.1:5000/",
|
||||||
$keystone_user = 'admin',
|
$keystone_tenant = 'admin',
|
||||||
$enabled = true,
|
$keystone_user = 'admin',
|
||||||
$idle_timeout = '3600',
|
$enabled = true,
|
||||||
$max_pool_size = '10',
|
$idle_timeout = '3600',
|
||||||
$max_overflow = '30',
|
$max_pool_size = '10',
|
||||||
$max_retries = '-1',
|
$max_overflow = '30',
|
||||||
$sql_connection = 'sqlite:///var/lib/glance/glance.sqlite',
|
$max_retries = '-1',
|
||||||
$use_syslog = false,
|
$sql_connection = 'sqlite:///var/lib/glance/glance.sqlite',
|
||||||
$syslog_log_facility = 'LOG_LOCAL2',
|
$use_syslog = false,
|
||||||
$syslog_log_level = 'WARNING',
|
$syslog_log_facility = 'LOG_LOCAL2',
|
||||||
$prune_hour = 0,
|
$prune_hour = 0,
|
||||||
$prune_minute = 0,
|
$prune_minute = 0,
|
||||||
$prune_ensure = 'present',
|
$prune_ensure = 'present',
|
||||||
$clean_hour = 1,
|
$clean_hour = 1,
|
||||||
$clean_minute = 0,
|
$clean_minute = 0,
|
||||||
$clean_ensure = 'present',
|
$clean_ensure = 'present',
|
||||||
$image_cache_max_size = '10737418240',
|
$image_cache_max_size = '10737418240',
|
||||||
$notify_mech = 'noop',
|
$notify_mech = 'noop',
|
||||||
) inherits glance {
|
) inherits glance {
|
||||||
|
|
||||||
# used to configure concat
|
# used to configure concat
|
||||||
|
@ -122,51 +135,83 @@ class glance::api(
|
||||||
include "glance::notify::${notify_mech}"
|
include "glance::notify::${notify_mech}"
|
||||||
}
|
}
|
||||||
|
|
||||||
if $use_syslog and !$debug { #syslog and nondebug case
|
# Logging
|
||||||
|
if $log_file {
|
||||||
glance_api_config {
|
glance_api_config {
|
||||||
'DEFAULT/log_config': value => "/etc/glance/logging.conf";
|
'DEFAULT/log_file': value => $log_file;
|
||||||
'DEFAULT/use_syslog': value => true;
|
|
||||||
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
|
||||||
}
|
}
|
||||||
if !defined(File["glance-logging.conf"]) {
|
glance_cache_config {
|
||||||
file {"glance-logging.conf":
|
'DEFAULT/log_file': value => $log_file;
|
||||||
content => template('glance/logging.conf.erb'),
|
|
||||||
path => "/etc/glance/logging.conf",
|
|
||||||
notify => Service['glance-api'],
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
} else { #other syslog debug or nonsyslog debug/nondebug cases
|
} else {
|
||||||
glance_api_config {
|
glance_api_config {
|
||||||
'DEFAULT/log_config': ensure=> absent;
|
'DEFAULT/log_file': ensure => absent;
|
||||||
'DEFAULT/log_file':value=> $log_file;
|
|
||||||
'DEFAULT/use_syslog': value => false;
|
|
||||||
}
|
}
|
||||||
} #end if
|
glance_cache_config {
|
||||||
|
'DEFAULT/log_file': ensure => absent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if $log_dir {
|
||||||
|
glance_api_config {
|
||||||
|
'DEFAULT/log_dir': value => $log_dir;
|
||||||
|
}
|
||||||
|
glance_cache_config {
|
||||||
|
'DEFAULT/log_dir': value => $log_dir;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
glance_api_config {
|
||||||
|
'DEFAULT/log_dir': ensure => absent;
|
||||||
|
}
|
||||||
|
glance_cache_config {
|
||||||
|
'DEFAULT/log_dir': ensure => absent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Syslog
|
||||||
|
if $use_syslog {
|
||||||
|
glance_api_config {
|
||||||
|
'DEFAULT/use_syslog' : value => true;
|
||||||
|
'DEFAULT/use_syslog_rfc_format': value => true;
|
||||||
|
'DEFAULT/syslog_log_facility' : value => $syslog_log_facility;
|
||||||
|
}
|
||||||
|
glance_cache_config {
|
||||||
|
'DEFAULT/use_syslog' : value => true;
|
||||||
|
'DEFAULT/use_syslog_rfc_format': value => true;
|
||||||
|
'DEFAULT/syslog_log_facility' : value => $syslog_log_facility;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
glance_api_config {
|
||||||
|
'DEFAULT/use_syslog': value => false;
|
||||||
|
}
|
||||||
|
glance_cache_config {
|
||||||
|
'DEFAULT/use_syslog': value => false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# basic service config
|
# basic service config
|
||||||
glance_api_config {
|
glance_api_config {
|
||||||
'DEFAULT/debug': value => $debug;
|
'DEFAULT/debug': value => $debug;
|
||||||
'DEFAULT/verbose': value => $verbose;
|
'DEFAULT/verbose': value => $verbose;
|
||||||
'DEFAULT/bind_host': value => $bind_host;
|
'DEFAULT/bind_host': value => $bind_host;
|
||||||
'DEFAULT/bind_port': value => $bind_port;
|
'DEFAULT/bind_port': value => $bind_port;
|
||||||
'DEFAULT/backlog': value => $backlog;
|
'DEFAULT/backlog': value => $backlog;
|
||||||
'DEFAULT/workers': value => $workers;
|
'DEFAULT/workers': value => $workers;
|
||||||
'DEFAULT/registry_client_protocol': value => "http";
|
'DEFAULT/registry_client_protocol': value => "http";
|
||||||
'DEFAULT/delayed_delete': value => "False";
|
'DEFAULT/delayed_delete': value => "False";
|
||||||
'DEFAULT/scrub_time': value => "43200";
|
'DEFAULT/scrub_time': value => "43200";
|
||||||
'DEFAULT/scrubber_datadir': value => "/var/lib/glance/scrubber";
|
'DEFAULT/scrubber_datadir': value => "/var/lib/glance/scrubber";
|
||||||
'DEFAULT/image_cache_dir': value => "/var/lib/glance/image-cache/";
|
'DEFAULT/image_cache_dir': value => "/var/lib/glance/image-cache/";
|
||||||
}
|
}
|
||||||
|
|
||||||
glance_cache_config {
|
glance_cache_config {
|
||||||
'DEFAULT/debug': value => $debug;
|
'DEFAULT/debug': value => $debug;
|
||||||
'DEFAULT/verbose': value => $verbose;
|
'DEFAULT/verbose': value => $verbose;
|
||||||
'DEFAULT/use_syslog': value => $use_syslog;
|
'DEFAULT/image_cache_dir': value => "/var/lib/glance/image-cache/";
|
||||||
'DEFAULT/image_cache_dir': value => "/var/lib/glance/image-cache/";
|
'DEFAULT/image_cache_stall_time': value => "86400";
|
||||||
'DEFAULT/log_file': value => "/var/log/glance/image-cache.log";
|
'DEFAULT/image_cache_invalid_entry_grace_period':
|
||||||
'DEFAULT/image_cache_stall_time': value => "86400";
|
value => "3600";
|
||||||
'DEFAULT/image_cache_invalid_entry_grace_period': value => "3600";
|
'DEFAULT/image_cache_max_size': value => $image_cache_max_size;
|
||||||
'DEFAULT/image_cache_max_size': value => $image_cache_max_size;
|
|
||||||
'DEFAULT/filesystem_store_datadir': value => "/var/lib/glance/images/";
|
'DEFAULT/filesystem_store_datadir': value => "/var/lib/glance/images/";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,21 @@
|
||||||
#
|
#
|
||||||
# [use_syslog] Rather or not service should log to syslog. Optional.
|
# [*use_syslog*]
|
||||||
|
# (optional) Use syslog for logging.
|
||||||
|
# Defaults to false.
|
||||||
|
#
|
||||||
|
# [*syslog_log_facility*]
|
||||||
|
# (optional) Syslog facility to receive log lines.
|
||||||
|
# Defaults to LOG_LOCAL2.
|
||||||
|
#
|
||||||
|
# [*log_file*]
|
||||||
|
# (optional) Log file for glance-registry.
|
||||||
|
# If set to boolean false, it will not log to any file.
|
||||||
|
# Defaults to '/var/log/glance/registry.log'.
|
||||||
|
#
|
||||||
|
# [*log_dir*]
|
||||||
|
# (optional) directory to which glance logs are sent.
|
||||||
|
# If set to boolean false, it will not log to any directory.
|
||||||
|
# Defaults to '/var/log/glance'
|
||||||
#
|
#
|
||||||
class glance::registry(
|
class glance::registry(
|
||||||
$keystone_password,
|
$keystone_password,
|
||||||
|
@ -8,6 +24,7 @@ class glance::registry(
|
||||||
$bind_host = '0.0.0.0',
|
$bind_host = '0.0.0.0',
|
||||||
$bind_port = '9191',
|
$bind_port = '9191',
|
||||||
$log_file = '/var/log/glance/registry.log',
|
$log_file = '/var/log/glance/registry.log',
|
||||||
|
$log_dir = '/var/log/glance',
|
||||||
$sql_connection = 'sqlite:///var/lib/glance/glance.sqlite',
|
$sql_connection = 'sqlite:///var/lib/glance/glance.sqlite',
|
||||||
$sql_idle_timeout = '3600',
|
$sql_idle_timeout = '3600',
|
||||||
$auth_type = 'keystone',
|
$auth_type = 'keystone',
|
||||||
|
@ -20,7 +37,6 @@ class glance::registry(
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
$syslog_log_facility = 'LOG_LOCAL2',
|
$syslog_log_facility = 'LOG_LOCAL2',
|
||||||
$idle_timeout = '3600',
|
$idle_timeout = '3600',
|
||||||
$syslog_log_level = 'WARNING',
|
|
||||||
$max_pool_size = '10',
|
$max_pool_size = '10',
|
||||||
$max_overflow = '30',
|
$max_overflow = '30',
|
||||||
$max_retries = '-1',
|
$max_retries = '-1',
|
||||||
|
@ -35,26 +51,39 @@ File {
|
||||||
require => Class['glance']
|
require => Class['glance']
|
||||||
}
|
}
|
||||||
|
|
||||||
if $use_syslog and !$debug { #syslog and nondebug case
|
# Logging
|
||||||
glance_registry_config {
|
if $log_file {
|
||||||
'DEFAULT/log_config': value => "/etc/glance/logging.conf";
|
glance_registry_config {
|
||||||
'DEFAULT/use_syslog': value => true;
|
'DEFAULT/log_file': value => $log_file;
|
||||||
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
}
|
||||||
}
|
} else {
|
||||||
if !defined(File["glance-logging.conf"]) {
|
glance_registry_config {
|
||||||
file {"glance-logging.conf":
|
'DEFAULT/log_file': ensure => absent;
|
||||||
content => template('glance/logging.conf.erb'),
|
|
||||||
path => "/etc/glance/logging.conf",
|
|
||||||
notify => Service['glance-registry'],
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { #other syslog debug or nonsyslog debug/nondebug cases
|
|
||||||
glance_registry_config {
|
if $log_dir {
|
||||||
'DEFAULT/log_config' : ensure => absent;
|
glance_registry_config {
|
||||||
'DEFAULT/log_file': value=>$log_file;
|
'DEFAULT/log_dir': value => $log_dir;
|
||||||
'DEFAULT/use_syslog': value => false;
|
}
|
||||||
|
} else {
|
||||||
|
glance_registry_config {
|
||||||
|
'DEFAULT/log_dir': ensure => absent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Syslog
|
||||||
|
if $use_syslog {
|
||||||
|
glance_registry_config {
|
||||||
|
'DEFAULT/use_syslog': value => true;
|
||||||
|
'DEFAULT/use_syslog_rfc_format': value => true;
|
||||||
|
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
glance_registry_config {
|
||||||
|
'DEFAULT/use_syslog': value => false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} #end if
|
|
||||||
|
|
||||||
require 'keystone::python'
|
require 'keystone::python'
|
||||||
|
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
[loggers]
|
|
||||||
keys = root
|
|
||||||
|
|
||||||
[handlers]
|
|
||||||
keys = production,devel,stderr
|
|
||||||
|
|
||||||
[formatters]
|
|
||||||
keys = normal,debug
|
|
||||||
|
|
||||||
[logger_root]
|
|
||||||
level = NOTSET
|
|
||||||
handlers = production,devel,stderr
|
|
||||||
propagate = 1
|
|
||||||
|
|
||||||
[formatter_debug]
|
|
||||||
format = glance-%(name)s %(levelname)s: %(module)s %(funcName)s %(message)s
|
|
||||||
|
|
||||||
[formatter_normal]
|
|
||||||
format = glance-%(name)s %(levelname)s: %(message)s
|
|
||||||
|
|
||||||
# logging info to <%= @syslog_log_facility %> with debug:<%= @debug %> and verbose:<%= @verbose %>
|
|
||||||
[handler_production]
|
|
||||||
class = handlers.SysLogHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = ('/dev/log', handlers.SysLogHandler.<%= @syslog_log_facility %>)
|
|
||||||
|
|
||||||
# TODO find out how it could be usefull and how it should be used
|
|
||||||
[handler_stderr]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stderr,)
|
|
||||||
|
|
||||||
[handler_devel]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stdout,)
|
|
|
@ -79,29 +79,27 @@ class heat::install (
|
||||||
name => $::heat::params::common_package_name,
|
name => $::heat::params::common_package_name,
|
||||||
}
|
}
|
||||||
|
|
||||||
$logging_file = '/etc/heat/logging.conf'
|
# Log configuration
|
||||||
if $use_syslog and !$debug { #syslog and nondebug case
|
if $log_dir {
|
||||||
heat_config {
|
heat_config {
|
||||||
'DEFAULT/log_config' : value => $logging_file;
|
'DEFAULT/log_dir' : value => $log_dir;
|
||||||
'DEFAULT/use_syslog' : value => true;
|
|
||||||
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
|
||||||
}
|
}
|
||||||
file {"heat-logging.conf":
|
} else {
|
||||||
content => template('heat/logging.conf.erb'),
|
|
||||||
path => $logging_file,
|
|
||||||
require => File['/etc/heat'],
|
|
||||||
}
|
|
||||||
# We must notify service for new logging rules
|
|
||||||
File['heat-logging.conf'] -> Heat_config['DEFAULT/log_config']
|
|
||||||
File['heat-logging.conf'] ~> Service <| title == 'heat-api-cfn' |>
|
|
||||||
File['heat-logging.conf'] ~> Service <| title == 'heat-api-cloudwatch' |>
|
|
||||||
File['heat-logging.conf'] ~> Service <| title == 'heat-api' |>
|
|
||||||
File['heat-logging.conf'] ~> Service <| title == 'heat-engine' |>
|
|
||||||
} else { #other syslog debug or nonsyslog debug/nondebug cases
|
|
||||||
heat_config {
|
heat_config {
|
||||||
'DEFAULT/log_config' : ensure => absent;
|
'DEFAULT/log_dir' : ensure => absent;
|
||||||
'DEFAULT/log_dir' : value => $log_dir;
|
}
|
||||||
'DEFAULT/use_syslog' : value => false;
|
}
|
||||||
|
|
||||||
|
# Syslog configuration
|
||||||
|
if $use_syslog {
|
||||||
|
heat_config {
|
||||||
|
'DEFAULT/use_syslog': value => true;
|
||||||
|
'DEFAULT/use_syslog_rfc_format': value => true;
|
||||||
|
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
heat_config {
|
||||||
|
'DEFAULT/use_syslog': value => false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,8 +114,6 @@ class heat::install (
|
||||||
'DEFAULT/instance_connection_is_secure' : value => $ic_is_secure;
|
'DEFAULT/instance_connection_is_secure' : value => $ic_is_secure;
|
||||||
'DEFAULT/rpc_backend' : value => $rpc_backend;
|
'DEFAULT/rpc_backend' : value => $rpc_backend;
|
||||||
'DEFAULT/use_stderr' : value => $use_stderr;
|
'DEFAULT/use_stderr' : value => $use_stderr;
|
||||||
#'DEFAULT/logging_context_format_string' : value => $logging_context_format_string;
|
|
||||||
#'DEFAULT/logging_default_format_string' : value => $logging_default_format_string;
|
|
||||||
'DEFAULT/rabbit_hosts' : value => $amqp_hosts;
|
'DEFAULT/rabbit_hosts' : value => $amqp_hosts;
|
||||||
'DEFAULT/rabbit_userid' : value => $amqp_user;
|
'DEFAULT/rabbit_userid' : value => $amqp_user;
|
||||||
'DEFAULT/rabbit_password' : value => $amqp_password;
|
'DEFAULT/rabbit_password' : value => $amqp_password;
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
[loggers]
|
|
||||||
keys = root
|
|
||||||
|
|
||||||
[handlers]
|
|
||||||
keys = production,devel,stderr
|
|
||||||
|
|
||||||
[formatters]
|
|
||||||
keys = normal,debug
|
|
||||||
|
|
||||||
[logger_root]
|
|
||||||
level = NOTSET
|
|
||||||
handlers = production,devel,stderr
|
|
||||||
propagate = 1
|
|
||||||
|
|
||||||
[formatter_debug]
|
|
||||||
format = heat-%(name)s %(levelname)s: %(module)s %(funcName)s %(message)s
|
|
||||||
|
|
||||||
[formatter_normal]
|
|
||||||
format = heat-%(name)s %(levelname)s: %(message)s
|
|
||||||
|
|
||||||
# logging info to <%= @syslog_log_facility %> with debug:<%= @debug %> and verbose:<%= @verbose %>
|
|
||||||
[handler_production]
|
|
||||||
class = handlers.SysLogHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = ('/dev/log', handlers.SysLogHandler.<%= @syslog_log_facility %>)
|
|
||||||
|
|
||||||
# TODO find out how it could be usefull and how it should be used
|
|
||||||
[handler_stderr]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stderr,)
|
|
||||||
|
|
||||||
[handler_devel]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stdout,)
|
|
|
@ -20,7 +20,10 @@
|
||||||
# [use_syslog] Rather or not keystone should log to syslog. Optional.
|
# [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_facility] Facility for syslog, if used. Optional.
|
||||||
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
|
# [*log_dir*]
|
||||||
|
# (optional) Directory where logs should be stored
|
||||||
|
# If set to boolean false, it will not log to any directory
|
||||||
|
# Defaults to '/var/log/keystone'
|
||||||
# [catalog_type] Type of catalog that keystone uses to store endpoints,services. Optional.
|
# [catalog_type] Type of catalog that keystone uses to store endpoints,services. Optional.
|
||||||
# Defaults to sql. (Also accepts template)
|
# Defaults to sql. (Also accepts template)
|
||||||
# [token_format] Format keystone uses for tokens. Optional. Defaults to UUID (PKI is grizzly native mode though).
|
# [token_format] Format keystone uses for tokens. Optional. Defaults to UUID (PKI is grizzly native mode though).
|
||||||
|
@ -51,30 +54,27 @@
|
||||||
#
|
#
|
||||||
class keystone(
|
class keystone(
|
||||||
$admin_token,
|
$admin_token,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$bind_host = '0.0.0.0',
|
$bind_host = '0.0.0.0',
|
||||||
$public_port = '5000',
|
$public_port = '5000',
|
||||||
$admin_port = '35357',
|
$admin_port = '35357',
|
||||||
$compute_port = '3000',
|
$compute_port = '3000',
|
||||||
$verbose = false,
|
$verbose = false,
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
$syslog_log_facility = 'LOG_LOCAL7',
|
$syslog_log_facility = 'LOG_LOCAL7',
|
||||||
$syslog_log_level = 'WARNING',
|
$log_dir = '/var/log/keystone',
|
||||||
$log_dir = '/var/log/keystone',
|
$catalog_type = 'sql',
|
||||||
$log_file = 'keystone.log',
|
$token_format = 'UUID',
|
||||||
$catalog_type = 'sql',
|
$cache_dir = '/var/cache/keystone',
|
||||||
$token_format = 'UUID',
|
$memcache_servers = false,
|
||||||
# $token_format = 'PKI',
|
|
||||||
$cache_dir = '/var/cache/keystone',
|
|
||||||
$memcache_servers = false,
|
|
||||||
$memcache_server_port = false,
|
$memcache_server_port = false,
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$sql_connection = 'sqlite:////var/lib/keystone/keystone.db',
|
$sql_connection = 'sqlite:////var/lib/keystone/keystone.db',
|
||||||
$idle_timeout = '200',
|
$idle_timeout = '200',
|
||||||
$max_pool_size = '10',
|
$max_pool_size = '10',
|
||||||
$max_overflow = '30',
|
$max_overflow = '30',
|
||||||
$max_retries = '-1',
|
$max_retries = '-1',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
validate_re($catalog_type, 'template|sql')
|
validate_re($catalog_type, 'template|sql')
|
||||||
|
@ -92,25 +92,14 @@ class keystone(
|
||||||
require => Package['keystone'],
|
require => Package['keystone'],
|
||||||
}
|
}
|
||||||
|
|
||||||
if $use_syslog and !$debug { #syslog and nondebug case
|
# logging config
|
||||||
|
if $log_dir {
|
||||||
keystone_config {
|
keystone_config {
|
||||||
'DEFAULT/log_config': value => "/etc/keystone/logging.conf";
|
'DEFAULT/log_dir': value => $log_dir;
|
||||||
'DEFAULT/use_syslog': value => true;
|
|
||||||
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
|
||||||
}
|
}
|
||||||
file {"keystone-logging.conf":
|
} else {
|
||||||
content => template('keystone/logging.conf.erb'),
|
|
||||||
path => "/etc/keystone/logging.conf",
|
|
||||||
require => File['/etc/keystone'],
|
|
||||||
# We must notify service for new logging rules
|
|
||||||
notify => Service['keystone'],
|
|
||||||
}
|
|
||||||
} else { #other syslog debug or nonsyslog debug/nondebug cases
|
|
||||||
keystone_config {
|
keystone_config {
|
||||||
'DEFAULT/log_config': ensure=> absent;
|
'DEFAULT/log_dir': ensure => absent;
|
||||||
'DEFAULT/log_dir':value=> $log_dir;
|
|
||||||
'DEFAULT/log_file': value => $log_file;
|
|
||||||
'DEFAULT/use_syslog': value => false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,4 +295,17 @@ class keystone(
|
||||||
subscribe => Package['keystone'],
|
subscribe => Package['keystone'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Syslog configuration
|
||||||
|
if $use_syslog {
|
||||||
|
keystone_config {
|
||||||
|
'DEFAULT/use_syslog': value => true;
|
||||||
|
'DEFAULT/use_syslog_rfc_format': value => true;
|
||||||
|
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
keystone_config {
|
||||||
|
'DEFAULT/use_syslog': value => false;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
[loggers]
|
|
||||||
keys = root
|
|
||||||
|
|
||||||
[handlers]
|
|
||||||
keys = production,devel,stderr
|
|
||||||
|
|
||||||
[formatters]
|
|
||||||
keys = normal,debug
|
|
||||||
|
|
||||||
[logger_root]
|
|
||||||
level = NOTSET
|
|
||||||
handlers = production,devel,stderr
|
|
||||||
propagate = 1
|
|
||||||
|
|
||||||
[formatter_debug]
|
|
||||||
format = keystone-%(name)s %(levelname)s: %(module)s %(funcName)s %(message)s
|
|
||||||
|
|
||||||
[formatter_normal]
|
|
||||||
format = keystone-%(name)s %(levelname)s: %(message)s
|
|
||||||
|
|
||||||
# logging info to <%= @syslog_log_facility %> with debug:<%= @debug %> and verbose:<%= @verbose %>
|
|
||||||
[handler_production]
|
|
||||||
class = handlers.SysLogHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = ('/dev/log', handlers.SysLogHandler.<%= @syslog_log_facility %>)
|
|
||||||
|
|
||||||
# TODO find out how it could be usefull and how it should be used
|
|
||||||
[handler_stderr]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stderr,)
|
|
||||||
|
|
||||||
[handler_devel]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stdout,)
|
|
|
@ -1,24 +0,0 @@
|
||||||
[loggers]
|
|
||||||
keys = root
|
|
||||||
|
|
||||||
[handlers]
|
|
||||||
keys = root
|
|
||||||
|
|
||||||
[formatters]
|
|
||||||
keys = default
|
|
||||||
|
|
||||||
[formatter_default]
|
|
||||||
format=%(asctime)s %(levelname)s %(name)s:%(lineno)d %(message)s
|
|
||||||
|
|
||||||
|
|
||||||
[logger_root]
|
|
||||||
level=NOTSET
|
|
||||||
handlers = root
|
|
||||||
propagate = 1
|
|
||||||
|
|
||||||
|
|
||||||
[handler_root]
|
|
||||||
class = StreamHandler
|
|
||||||
level=NOTSET
|
|
||||||
formatter = default
|
|
||||||
args = (sys.stdout,)
|
|
|
@ -1,63 +0,0 @@
|
||||||
[loggers]
|
|
||||||
keys = root
|
|
||||||
|
|
||||||
[handlers]
|
|
||||||
keys = production,devel,stderr
|
|
||||||
|
|
||||||
[formatters]
|
|
||||||
keys = normal,debug
|
|
||||||
|
|
||||||
[logger_root]
|
|
||||||
level = NOTSET
|
|
||||||
handlers = production,devel,stderr
|
|
||||||
propagate = 1
|
|
||||||
|
|
||||||
[formatter_debug]
|
|
||||||
format = murano-%(name)s %(levelname)s: %(module)s %(funcName)s %(message)s
|
|
||||||
|
|
||||||
[formatter_normal]
|
|
||||||
format = murano-%(name)s %(levelname)s: %(message)s
|
|
||||||
|
|
||||||
# logging info to <%= @syslog_log_facility %> with debug:<%= @debug %> and verbose:<%= @verbose %>
|
|
||||||
[handler_production]
|
|
||||||
class = handlers.SysLogHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = ('/dev/log', handlers.SysLogHandler.<%= @syslog_log_facility %>)
|
|
||||||
|
|
||||||
# TODO find out how it could be usefull and how it should be used
|
|
||||||
[handler_stderr]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stderr,)
|
|
||||||
|
|
||||||
[handler_devel]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stdout,)
|
|
|
@ -7,7 +7,6 @@ class {"::rsyslog::server":
|
||||||
server_dir => '/var/log/',
|
server_dir => '/var/log/',
|
||||||
port => 514,
|
port => 514,
|
||||||
high_precision_timestamps => true,
|
high_precision_timestamps => true,
|
||||||
virtual => str2bool($::is_virtual),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class {"::openstack::logrotate":
|
class {"::openstack::logrotate":
|
||||||
|
|
|
@ -64,12 +64,6 @@ class neutron::agents::dhcp (
|
||||||
neutron_dhcp_agent_config {
|
neutron_dhcp_agent_config {
|
||||||
'DEFAULT/debug': value => $debug;
|
'DEFAULT/debug': value => $debug;
|
||||||
'DEFAULT/verbose': value => $verbose;
|
'DEFAULT/verbose': value => $verbose;
|
||||||
'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;
|
'DEFAULT/state_path': value => $state_path;
|
||||||
'DEFAULT/interface_driver': value => $interface_driver;
|
'DEFAULT/interface_driver': value => $interface_driver;
|
||||||
'DEFAULT/dhcp_driver': value => $dhcp_driver;
|
'DEFAULT/dhcp_driver': value => $dhcp_driver;
|
||||||
|
@ -107,7 +101,6 @@ class neutron::agents::dhcp (
|
||||||
Package['pacemaker'] -> File['neutron-dhcp-agent-ocf']
|
Package['pacemaker'] -> File['neutron-dhcp-agent-ocf']
|
||||||
File['neutron-dhcp-agent-ocf'] -> Cs_resource["p_${::neutron::params::dhcp_agent_service}"]
|
File['neutron-dhcp-agent-ocf'] -> Cs_resource["p_${::neutron::params::dhcp_agent_service}"]
|
||||||
File['q-agent-cleanup.py'] -> Cs_resource["p_${::neutron::params::dhcp_agent_service}"]
|
File['q-agent-cleanup.py'] -> Cs_resource["p_${::neutron::params::dhcp_agent_service}"]
|
||||||
File<| title == 'neutron-logging.conf' |> -> Cs_resource["p_${::neutron::params::dhcp_agent_service}"]
|
|
||||||
File<| title == 'ocf-mirantis-path' |> -> File['neutron-dhcp-agent-ocf']
|
File<| title == 'ocf-mirantis-path' |> -> File['neutron-dhcp-agent-ocf']
|
||||||
Anchor['neutron-dhcp-agent'] -> File['neutron-dhcp-agent-ocf']
|
Anchor['neutron-dhcp-agent'] -> File['neutron-dhcp-agent-ocf']
|
||||||
Neutron_config <| |> -> File['neutron-dhcp-agent-ocf']
|
Neutron_config <| |> -> File['neutron-dhcp-agent-ocf']
|
||||||
|
@ -221,7 +214,6 @@ class neutron::agents::dhcp (
|
||||||
} else {
|
} else {
|
||||||
Neutron_config <| |> ~> Service['neutron-dhcp-service']
|
Neutron_config <| |> ~> Service['neutron-dhcp-service']
|
||||||
Neutron_dhcp_agent_config <| |> ~> Service['neutron-dhcp-service']
|
Neutron_dhcp_agent_config <| |> ~> Service['neutron-dhcp-service']
|
||||||
File<| title=='neutron-logging.conf' |> ->
|
|
||||||
service { 'neutron-dhcp-service':
|
service { 'neutron-dhcp-service':
|
||||||
name => $::neutron::params::dhcp_agent_service,
|
name => $::neutron::params::dhcp_agent_service,
|
||||||
enable => true,
|
enable => true,
|
||||||
|
|
|
@ -49,12 +49,6 @@ class neutron::agents::l3 (
|
||||||
neutron_l3_agent_config {
|
neutron_l3_agent_config {
|
||||||
'DEFAULT/debug': value => $debug;
|
'DEFAULT/debug': value => $debug;
|
||||||
'DEFAULT/verbose': value => $verbose;
|
'DEFAULT/verbose': value => $verbose;
|
||||||
'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;
|
'DEFAULT/router_id': ensure => absent;
|
||||||
'DEFAULT/handle_internal_only_routers': value => false;
|
'DEFAULT/handle_internal_only_routers': value => false;
|
||||||
'DEFAULT/root_helper': value => $neutron_config['root_helper'];
|
'DEFAULT/root_helper': value => $neutron_config['root_helper'];
|
||||||
|
|
|
@ -23,11 +23,6 @@ class neutron::agents::metadata (
|
||||||
neutron_metadata_agent_config {
|
neutron_metadata_agent_config {
|
||||||
'DEFAULT/debug': value => $debug;
|
'DEFAULT/debug': value => $debug;
|
||||||
'DEFAULT/verbose': value => $verbose;
|
'DEFAULT/verbose': value => $verbose;
|
||||||
'DEFAULT/log_dir': ensure => absent;
|
|
||||||
'DEFAULT/log_file': ensure => absent;
|
|
||||||
'DEFAULT/log_config': ensure => absent;
|
|
||||||
'DEFAULT/use_syslog': ensure => absent;
|
|
||||||
'DEFAULT/use_stderr': ensure => absent;
|
|
||||||
'DEFAULT/auth_region': value => $neutron_config['keystone']['auth_region'];
|
'DEFAULT/auth_region': value => $neutron_config['keystone']['auth_region'];
|
||||||
'DEFAULT/auth_url': value => $neutron_config['keystone']['auth_url'];
|
'DEFAULT/auth_url': value => $neutron_config['keystone']['auth_url'];
|
||||||
'DEFAULT/admin_user': value => $neutron_config['keystone']['admin_user'];
|
'DEFAULT/admin_user': value => $neutron_config['keystone']['admin_user'];
|
||||||
|
@ -90,7 +85,6 @@ class neutron::agents::metadata (
|
||||||
cs_shadow { $cib_name: cib => $cib_name }
|
cs_shadow { $cib_name: cib => $cib_name }
|
||||||
cs_commit { $cib_name: cib => $cib_name }
|
cs_commit { $cib_name: cib => $cib_name }
|
||||||
|
|
||||||
File<| title=='neutron-logging.conf' |> ->
|
|
||||||
cs_resource { "$res_name":
|
cs_resource { "$res_name":
|
||||||
ensure => present,
|
ensure => present,
|
||||||
cib => $cib_name,
|
cib => $cib_name,
|
||||||
|
|
|
@ -1,7 +1,21 @@
|
||||||
#
|
#
|
||||||
# [use_syslog] Rather or not service should log to syslog. Optional.
|
# TODO(bogdando) move logging options to the neutron_config hash as well
|
||||||
# [syslog_log_facility] Facility for syslog, if used. Optional.
|
# [*use_syslog*]
|
||||||
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
|
# (optional) Use syslog for logging
|
||||||
|
# Defaults to false
|
||||||
|
#
|
||||||
|
# [*syslog_log_facility*]
|
||||||
|
# (optional) Syslog facility to receive log lines
|
||||||
|
# Defaults to LOG_LOCAL4
|
||||||
|
#
|
||||||
|
# [*log_file*]
|
||||||
|
# (optional) Where to log
|
||||||
|
# Defaults to false
|
||||||
|
#
|
||||||
|
# [*log_dir*]
|
||||||
|
# (optional) Directory where logs should be stored
|
||||||
|
# If set to boolean false, it will not log to any directory
|
||||||
|
# Defaults to /var/log/neutron
|
||||||
#
|
#
|
||||||
class neutron (
|
class neutron (
|
||||||
$neutron_config = {},
|
$neutron_config = {},
|
||||||
|
@ -14,7 +28,6 @@ class neutron (
|
||||||
$log_dir = '/var/log/neutron',
|
$log_dir = '/var/log/neutron',
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
$syslog_log_facility = 'LOG_LOCAL4',
|
$syslog_log_facility = 'LOG_LOCAL4',
|
||||||
$syslog_log_level = 'WARNING',
|
|
||||||
$ssh_private_key = '/var/lib/astute/neutron/neutron',
|
$ssh_private_key = '/var/lib/astute/neutron/neutron',
|
||||||
$ssh_public_key = '/var/lib/astute/neutron/neutron.pub',
|
$ssh_public_key = '/var/lib/astute/neutron/neutron.pub',
|
||||||
$server_ha_mode = false,
|
$server_ha_mode = false,
|
||||||
|
@ -64,6 +77,38 @@ class neutron (
|
||||||
owner => neutron,
|
owner => neutron,
|
||||||
group => neutron,
|
group => neutron,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if $log_file {
|
||||||
|
neutron_config {
|
||||||
|
'DEFAULT/log_file': value => $log_file;
|
||||||
|
'DEFAULT/log_dir': value => $log_dir;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if $log_dir {
|
||||||
|
neutron_config {
|
||||||
|
'DEFAULT/log_dir': value => $log_dir;
|
||||||
|
'DEFAULT/log_file': ensure => absent;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
neutron_config {
|
||||||
|
'DEFAULT/log_dir': ensure => absent;
|
||||||
|
'DEFAULT/log_file': ensure => absent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if $use_syslog {
|
||||||
|
neutron_config {
|
||||||
|
'DEFAULT/use_syslog': value => true;
|
||||||
|
'DEFAULT/use_syslog_rfc_format': value => true;
|
||||||
|
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
neutron_config {
|
||||||
|
'DEFAULT/use_syslog': value => false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
case $neutron_config['amqp']['provider'] {
|
case $neutron_config['amqp']['provider'] {
|
||||||
'rabbitmq': {
|
'rabbitmq': {
|
||||||
neutron_config {
|
neutron_config {
|
||||||
|
@ -106,34 +151,28 @@ class neutron (
|
||||||
}
|
}
|
||||||
|
|
||||||
neutron_config {
|
neutron_config {
|
||||||
'DEFAULT/debug': value => $debug;
|
'DEFAULT/debug': value => $debug;
|
||||||
'DEFAULT/verbose': value => $verbose;
|
'DEFAULT/verbose': value => $verbose;
|
||||||
'DEFAULT/log_dir': ensure => absent;
|
'DEFAULT/publish_errors': value => false;
|
||||||
'DEFAULT/log_file': ensure => absent;
|
'DEFAULT/auth_strategy': value => $auth_strategy;
|
||||||
'DEFAULT/log_config': ensure => absent;
|
'DEFAULT/core_plugin': value => $core_plugin;
|
||||||
#TODO(bogdando) fix syslog usage after Oslo logging patch synced in I.
|
'DEFAULT/bind_host': value => $server_bind_host;
|
||||||
'DEFAULT/use_syslog': value => false;
|
'DEFAULT/bind_port': value => $neutron_config['server']['bind_port'];
|
||||||
'DEFAULT/use_stderr': value => true;
|
'DEFAULT/base_mac': value => $neutron_config['L2']['base_mac'];
|
||||||
'DEFAULT/publish_errors': value => false;
|
'DEFAULT/mac_generation_retries': value => $neutron_config['L2']['mac_generation_retries'];
|
||||||
'DEFAULT/auth_strategy': value => $auth_strategy;
|
'DEFAULT/dhcp_lease_duration': value => $neutron_config['L3']['dhcp_agent']['lease_duration'];
|
||||||
'DEFAULT/core_plugin': value => $core_plugin;
|
'DEFAULT/allow_bulk': value => $neutron_config['server']['allow_bulk'];
|
||||||
'DEFAULT/bind_host': value => $server_bind_host;
|
'DEFAULT/allow_overlapping_ips': value => $neutron_config['L3']['allow_overlapping_ips'];
|
||||||
'DEFAULT/bind_port': value => $neutron_config['server']['bind_port'];
|
'DEFAULT/control_exchange': value => $neutron_config['server']['control_exchange'];
|
||||||
'DEFAULT/base_mac': value => $neutron_config['L2']['base_mac'];
|
'DEFAULT/network_auto_schedule': value => $neutron_config['L3']['network_auto_schedule'];
|
||||||
'DEFAULT/mac_generation_retries': value => $neutron_config['L2']['mac_generation_retries'];
|
'DEFAULT/router_auto_schedule': value => $neutron_config['L3']['router_auto_schedule'];
|
||||||
'DEFAULT/dhcp_lease_duration': value => $neutron_config['L3']['dhcp_agent']['lease_duration'];
|
'DEFAULT/agent_down_time': value => $neutron_config['server']['agent_down_time'];
|
||||||
'DEFAULT/allow_bulk': value => $neutron_config['server']['allow_bulk'];
|
'DEFAULT/firewall_driver': value => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver';
|
||||||
'DEFAULT/allow_overlapping_ips': value => $neutron_config['L3']['allow_overlapping_ips'];
|
'DEFAULT/state_path': value => '/var/lib/neutron';
|
||||||
'DEFAULT/control_exchange': value => $neutron_config['server']['control_exchange'];
|
'DEFAULT/kombu_reconnect_delay': value => '5.0';
|
||||||
'DEFAULT/network_auto_schedule': value => $neutron_config['L3']['network_auto_schedule'];
|
'DEFAULT/lock_path': value => '/var/lib/neutron/lock';
|
||||||
'DEFAULT/router_auto_schedule': value => $neutron_config['L3']['router_auto_schedule'];
|
'agent/report_interval': value => $neutron_config['server']['report_interval'];
|
||||||
'DEFAULT/agent_down_time': value => $neutron_config['server']['agent_down_time'];
|
'agent/root_helper': value => $neutron_config['root_helper'];
|
||||||
'DEFAULT/firewall_driver': value => 'neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver';
|
|
||||||
'DEFAULT/state_path': value => '/var/lib/neutron';
|
|
||||||
'DEFAULT/kombu_reconnect_delay': value => '5.0';
|
|
||||||
'DEFAULT/lock_path': value => '/var/lib/neutron/lock';
|
|
||||||
'agent/report_interval': value => $neutron_config['server']['report_interval'];
|
|
||||||
'agent/root_helper': value => $neutron_config['root_helper'];
|
|
||||||
'keystone_authtoken/auth_host': value => $neutron_config['keystone']['auth_host'];
|
'keystone_authtoken/auth_host': value => $neutron_config['keystone']['auth_host'];
|
||||||
'keystone_authtoken/auth_port': value => $neutron_config['keystone']['auth_port'];
|
'keystone_authtoken/auth_port': value => $neutron_config['keystone']['auth_port'];
|
||||||
'keystone_authtoken/auth_protocol': value => $neutron_config['keystone']['auth_protocol'];
|
'keystone_authtoken/auth_protocol': value => $neutron_config['keystone']['auth_protocol'];
|
||||||
|
|
|
@ -115,7 +115,6 @@ class neutron::server (
|
||||||
|
|
||||||
anchor {'neutron-server-config-done':}
|
anchor {'neutron-server-config-done':}
|
||||||
|
|
||||||
File<| title=='neutron-logging.conf' |> ->
|
|
||||||
service {'neutron-server':
|
service {'neutron-server':
|
||||||
name => $::neutron::params::server_service,
|
name => $::neutron::params::server_service,
|
||||||
ensure => running,
|
ensure => running,
|
||||||
|
|
|
@ -1,120 +0,0 @@
|
||||||
<% if @debug then -%>
|
|
||||||
[loggers]
|
|
||||||
keys = root, l3agent, ovsagent, dhcpagent, metadata
|
|
||||||
|
|
||||||
[handlers]
|
|
||||||
keys = production,devel,stderr, l3agent, ovsagent, dhcpagent, metadata
|
|
||||||
|
|
||||||
<% else -%>
|
|
||||||
[loggers]
|
|
||||||
keys = root
|
|
||||||
|
|
||||||
[handlers]
|
|
||||||
keys = production,devel,stderr
|
|
||||||
|
|
||||||
<% end -%>
|
|
||||||
[formatters]
|
|
||||||
keys = normal,debug,default
|
|
||||||
|
|
||||||
[logger_root]
|
|
||||||
level = NOTSET
|
|
||||||
handlers = production,devel,stderr
|
|
||||||
propagate = 1
|
|
||||||
|
|
||||||
[formatter_debug]
|
|
||||||
format = neutron-%(name)s %(levelname)s: %(module)s %(funcName)s %(message)s
|
|
||||||
|
|
||||||
[formatter_normal]
|
|
||||||
format = neutron-%(name)s %(levelname)s: %(message)s
|
|
||||||
|
|
||||||
[formatter_default]
|
|
||||||
format=%(asctime)s %(levelname)s: %(module)s %(name)s:%(lineno)d %(funcName)s %(message)s
|
|
||||||
|
|
||||||
# logging info to <%= @syslog_log_facility %> with debug:<%= @debug %> and verbose:<%= @verbose %>
|
|
||||||
[handler_production]
|
|
||||||
class = handlers.SysLogHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = ('/dev/log', handlers.SysLogHandler.<%= @syslog_log_facility %>)
|
|
||||||
|
|
||||||
# TODO find out how it could be usefull and how it should be used
|
|
||||||
[handler_stderr]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stderr,)
|
|
||||||
|
|
||||||
[handler_devel]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stdout,)
|
|
||||||
|
|
||||||
<% if @debug then -%>
|
|
||||||
[logger_l3agent]
|
|
||||||
handlers = l3agent
|
|
||||||
level=NOTSET
|
|
||||||
qualname = neutron.agent.l3_agent
|
|
||||||
|
|
||||||
[handler_l3agent]
|
|
||||||
class = logging.FileHandler
|
|
||||||
args = ('/var/log/neutron/l3.log',)
|
|
||||||
formatter = default
|
|
||||||
|
|
||||||
|
|
||||||
[logger_dhcpagent]
|
|
||||||
handlers = dhcpagent
|
|
||||||
level=NOTSET
|
|
||||||
qualname = neutron.agent.dhcp_agent
|
|
||||||
|
|
||||||
[handler_dhcpagent]
|
|
||||||
class = logging.FileHandler
|
|
||||||
args = ('/var/log/neutron/dhcp.log',)
|
|
||||||
formatter = default
|
|
||||||
|
|
||||||
|
|
||||||
[logger_ovsagent]
|
|
||||||
handlers = ovsagent
|
|
||||||
level=NOTSET
|
|
||||||
qualname = neutron.plugins.openvswitch.agent.ovs_neutron_agent
|
|
||||||
|
|
||||||
[handler_ovsagent]
|
|
||||||
class = logging.FileHandler
|
|
||||||
args = ('/var/log/neutron/ovs.log',)
|
|
||||||
formatter = default
|
|
||||||
|
|
||||||
|
|
||||||
[logger_metadata]
|
|
||||||
handlers = metadata
|
|
||||||
level=NOTSET
|
|
||||||
qualname = neutron.agent.metadata
|
|
||||||
|
|
||||||
[handler_metadata]
|
|
||||||
class = logging.FileHandler
|
|
||||||
args = ('/var/log/neutron/metadata.log',)
|
|
||||||
formatter = default
|
|
||||||
<% end -%>
|
|
|
@ -20,7 +20,7 @@
|
||||||
# [logdir] Directory where logs should be stored. Optional. Defaults to '/var/log/nova'.
|
# [logdir] Directory where logs should be stored. Optional. Defaults to '/var/log/nova'.
|
||||||
# [state_path] Directory for storing state. Optional. Defaults to '/var/lib/nova'.
|
# [state_path] Directory for storing state. Optional. Defaults to '/var/lib/nova'.
|
||||||
# [lock_path] Directory for lock files. Optional. Distro specific default.
|
# [lock_path] Directory for lock files. Optional. Distro specific default.
|
||||||
# [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.
|
# [verbose] Rather to print more verbose (INFO+) output. Optional. Defaults to false.
|
||||||
# [debug] Rather to print even more verbose (DEBUG+) output. If true, would ignore verbose option. Optional. Defaults to false.
|
# [debug] Rather to print even more verbose (DEBUG+) output. If true, would ignore verbose option. Optional. Defaults to false.
|
||||||
# [periodic_interval] Seconds between running periodic tasks. Optional.
|
# [periodic_interval] Seconds between running periodic tasks. Optional.
|
||||||
# Defaults to '60'.
|
# Defaults to '60'.
|
||||||
|
@ -33,46 +33,44 @@
|
||||||
# add rabbit nodes hostname
|
# add rabbit nodes hostname
|
||||||
# [use_syslog] Rather or not service should log to syslog. Optional.
|
# [use_syslog] Rather or not service should log to syslog. Optional.
|
||||||
# [syslog_log_facility] Facility for syslog, if used. Optional.
|
# [syslog_log_facility] Facility for syslog, if used. Optional.
|
||||||
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
|
|
||||||
#
|
#
|
||||||
class nova(
|
class nova(
|
||||||
$ensure_package = 'present',
|
$ensure_package = 'present',
|
||||||
# this is how to query all resources from our clutser
|
# this is how to query all resources from our clutser
|
||||||
$nova_cluster_id='localcluster',
|
$nova_cluster_id ='localcluster',
|
||||||
$sql_connection = false,
|
$sql_connection = false,
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
$syslog_log_facility = 'LOG_LOCAL6',
|
$syslog_log_facility = 'LOG_LOCAL6',
|
||||||
$syslog_log_level = 'WARNING',
|
$image_service = 'nova.image.glance.GlanceImageService',
|
||||||
$image_service = 'nova.image.glance.GlanceImageService',
|
|
||||||
# these glance params should be optional
|
# these glance params should be optional
|
||||||
# this should probably just be configured as a glance client
|
# this should probably just be configured as a glance client
|
||||||
$glance_api_servers = 'localhost:9292',
|
$glance_api_servers = 'localhost:9292',
|
||||||
# RPC
|
# RPC
|
||||||
$queue_provider = 'rabbitmq',
|
$queue_provider = 'rabbitmq',
|
||||||
$amqp_hosts = 'localhost',
|
$amqp_hosts = 'localhost',
|
||||||
$amqp_user = 'guest',
|
$amqp_user = 'guest',
|
||||||
$amqp_password = 'guest',
|
$amqp_password = 'guest',
|
||||||
$rabbit_ha_queues = false,
|
$rabbit_ha_queues = false,
|
||||||
$rabbit_virtual_host='/',
|
$rabbit_virtual_host = '/',
|
||||||
$auth_strategy = 'keystone',
|
$auth_strategy = 'keystone',
|
||||||
$service_down_time = 60,
|
$service_down_time = 60,
|
||||||
$logdir = '/var/log/nova',
|
$logdir = '/var/log/nova',
|
||||||
$state_path = '/var/lib/nova',
|
$state_path = '/var/lib/nova',
|
||||||
$lock_path = $::nova::params::lock_path,
|
$lock_path = $::nova::params::lock_path,
|
||||||
$verbose = false,
|
$verbose = false,
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$periodic_interval = '60',
|
$periodic_interval = '60',
|
||||||
$report_interval = '10',
|
$report_interval = '10',
|
||||||
$root_wrap_config = '/etc/nova/rootwrap.conf',
|
$root_wrap_config = '/etc/nova/rootwrap.conf',
|
||||||
# deprecated in folsom
|
# deprecated in folsom
|
||||||
#$root_helper = $::nova::params::root_helper,
|
#$root_helper = $::nova::params::root_helper,
|
||||||
$monitoring_notifications = false,
|
$monitoring_notifications = false,
|
||||||
$api_bind_address = '0.0.0.0',
|
$api_bind_address = '0.0.0.0',
|
||||||
$remote_syslog_server = '127.0.0.1',
|
$remote_syslog_server = '127.0.0.1',
|
||||||
$idle_timeout = '3600',
|
$idle_timeout = '3600',
|
||||||
$max_pool_size = '10',
|
$max_pool_size = '10',
|
||||||
$max_overflow = '30',
|
$max_overflow = '30',
|
||||||
$max_retries = '-1',
|
$max_retries = '-1',
|
||||||
) inherits nova::params {
|
) inherits nova::params {
|
||||||
|
|
||||||
# all nova_config resources should be applied
|
# all nova_config resources should be applied
|
||||||
|
@ -141,39 +139,23 @@ class nova(
|
||||||
require => Package['nova-common'],
|
require => Package['nova-common'],
|
||||||
}
|
}
|
||||||
|
|
||||||
#Configure logging in nova.conf
|
# Syslog configuration
|
||||||
if $use_syslog and !$debug { #syslog and nondebug case
|
if $use_syslog {
|
||||||
nova_config {
|
nova_config {
|
||||||
'DEFAULT/log_config': value => "/etc/nova/logging.conf";
|
'DEFAULT/use_syslog': value => true;
|
||||||
'DEFAULT/use_syslog': value => true;
|
'DEFAULT/use_syslog_rfc_format': value => true;
|
||||||
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
nova_config {
|
||||||
|
'DEFAULT/use_syslog': value => false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
file {"nova-logging.conf":
|
|
||||||
content => template('nova/logging.conf.erb'),
|
|
||||||
path => "/etc/nova/logging.conf",
|
|
||||||
require => File[$logdir],
|
|
||||||
}
|
|
||||||
# We must notify services to apply new logging rules
|
|
||||||
File['nova-logging.conf'] ~> Nova::Generic_service <| |>
|
|
||||||
File['nova-logging.conf'] ~> Service <| title == 'nova-api'|>
|
|
||||||
File['nova-logging.conf'] ~> Service <| title == 'nova-compute'|>
|
|
||||||
} else { #other syslog debug or nonsyslog debug/nondebug cases
|
|
||||||
nova_config {
|
|
||||||
'DEFAULT/log_config': ensure=> absent;
|
|
||||||
'DEFAULT/logdir': value=> $logdir;
|
|
||||||
'DEFAULT/use_syslog': value => false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
file { $logdir:
|
file { $logdir:
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
mode => '0751',
|
mode => '0751',
|
||||||
}
|
}
|
||||||
file { "${logdir}/nova.log":
|
|
||||||
ensure => present,
|
|
||||||
mode => '0640',
|
|
||||||
require => [Package['nova-common'], File[$logdir]],
|
|
||||||
}
|
|
||||||
file { '/etc/nova/nova.conf':
|
file { '/etc/nova/nova.conf':
|
||||||
mode => '0640',
|
mode => '0640',
|
||||||
}
|
}
|
||||||
|
@ -243,6 +225,7 @@ if $use_syslog and !$debug { #syslog and nondebug case
|
||||||
nova_config {
|
nova_config {
|
||||||
'DEFAULT/debug': value => $debug;
|
'DEFAULT/debug': value => $debug;
|
||||||
'DEFAULT/verbose': value => $verbose;
|
'DEFAULT/verbose': value => $verbose;
|
||||||
|
'DEFAULT/logdir': value => $logdir;
|
||||||
# Following may need to be broken out to different nova services
|
# Following may need to be broken out to different nova services
|
||||||
'DEFAULT/state_path': value => $state_path;
|
'DEFAULT/state_path': value => $state_path;
|
||||||
'DEFAULT/lock_path': value => $lock_path;
|
'DEFAULT/lock_path': value => $lock_path;
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
[loggers]
|
|
||||||
keys = root
|
|
||||||
|
|
||||||
[handlers]
|
|
||||||
keys = production,devel,stderr
|
|
||||||
|
|
||||||
[formatters]
|
|
||||||
keys = normal,debug
|
|
||||||
|
|
||||||
[logger_root]
|
|
||||||
level = NOTSET
|
|
||||||
handlers = production,devel,stderr
|
|
||||||
propagate = 1
|
|
||||||
|
|
||||||
[formatter_debug]
|
|
||||||
format = nova-%(name)s %(levelname)s: %(module)s %(funcName)s %(message)s
|
|
||||||
|
|
||||||
[formatter_normal]
|
|
||||||
format = nova-%(name)s %(levelname)s: %(message)s
|
|
||||||
|
|
||||||
# logging info to <%= @syslog_log_facility %> with debug:<%= @debug %> and verbose:<%= @verbose %>
|
|
||||||
[handler_production]
|
|
||||||
class = handlers.SysLogHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = ('/dev/log', handlers.SysLogHandler.<%= @syslog_log_facility %>)
|
|
||||||
|
|
||||||
# TODO find out how it could be usefull and how it should be used
|
|
||||||
[handler_stderr]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stderr,)
|
|
||||||
|
|
||||||
[handler_devel]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stdout,)
|
|
|
@ -9,6 +9,7 @@ class openstack::ceilometer (
|
||||||
$metering_secret = 'ceilometer',
|
$metering_secret = 'ceilometer',
|
||||||
$verbose = false,
|
$verbose = false,
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
|
$syslog_log_facility = 'LOG_LOCAL0',
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$db_type = 'mysql',
|
$db_type = 'mysql',
|
||||||
$db_host = 'localhost',
|
$db_host = 'localhost',
|
||||||
|
@ -35,16 +36,17 @@ class openstack::ceilometer (
|
||||||
# This class is required by ceilometer agents & api classes
|
# This class is required by ceilometer agents & api classes
|
||||||
# The metering_secret parameter is mandatory
|
# The metering_secret parameter is mandatory
|
||||||
class { '::ceilometer':
|
class { '::ceilometer':
|
||||||
package_ensure => $::openstack_version['ceilometer'],
|
package_ensure => $::openstack_version['ceilometer'],
|
||||||
queue_provider => $queue_provider,
|
queue_provider => $queue_provider,
|
||||||
amqp_hosts => $amqp_hosts,
|
amqp_hosts => $amqp_hosts,
|
||||||
amqp_user => $amqp_user,
|
amqp_user => $amqp_user,
|
||||||
amqp_password => $amqp_password,
|
amqp_password => $amqp_password,
|
||||||
rabbit_ha_queues => $rabbit_ha_queues,
|
rabbit_ha_queues => $rabbit_ha_queues,
|
||||||
metering_secret => $metering_secret,
|
metering_secret => $metering_secret,
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
|
syslog_log_facility => $syslog_log_facility,
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::ceilometer::client': }
|
class { '::ceilometer::client': }
|
||||||
|
|
|
@ -1,18 +1,18 @@
|
||||||
class rsyslog::checksum_udp514 () {
|
class openstack::checksum_udp ($port = '514') {
|
||||||
|
|
||||||
Exec {path => '/usr/bin:/bin:/usr/sbin:/sbin'}
|
Exec {path => '/usr/bin:/bin:/usr/sbin:/sbin'}
|
||||||
|
|
||||||
case $operatingsystem {
|
case $operatingsystem {
|
||||||
/(?i)(centos|redhat)/ : {
|
/(?i)(centos|redhat)/ : {
|
||||||
exec { "checksum_fill_udp514":
|
exec { "checksum_fill_udp":
|
||||||
command => "iptables -t mangle -A POSTROUTING -p udp --dport 514 -j CHECKSUM --checksum-fill; /etc/init.d/iptables save",
|
command => "iptables -t mangle -A POSTROUTING -p udp --dport ${port} -j CHECKSUM --checksum-fill; /etc/init.d/iptables save",
|
||||||
unless => "iptables -t mangle -S POSTROUTING | grep -q \"^-A POSTROUTING -p udp -m udp --dport 514 -j CHECKSUM --checksum-fill\""
|
unless => "iptables -t mangle -S POSTROUTING | grep -q \"^-A POSTROUTING -p udp -m udp --dport ${port} -j CHECKSUM --checksum-fill\""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
/(?i)(debian|ubuntu)/ : {
|
/(?i)(debian|ubuntu)/ : {
|
||||||
exec { "checksum_fill_udp514":
|
exec { "checksum_fill_udp":
|
||||||
command => "iptables -t mangle -A POSTROUTING -p udp --dport 514 -j CHECKSUM --checksum-fill; iptables-save -c > /etc/iptables.rules",
|
command => "iptables -t mangle -A POSTROUTING -p udp --dport ${port} -j CHECKSUM --checksum-fill; iptables-save -c > /etc/iptables.rules",
|
||||||
unless => "iptables -t mangle -S POSTROUTING | grep -q \"^-A POSTROUTING -p udp -m udp --dport 514 -j CHECKSUM --checksum-fill\""
|
unless => "iptables -t mangle -S POSTROUTING | grep -q \"^-A POSTROUTING -p udp -m udp --dport ${port} -j CHECKSUM --checksum-fill\""
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,7 +1,6 @@
|
||||||
# [use_syslog] Rather or not service should log to syslog. Optional. Defaults to false.
|
# [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
|
# [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
|
# 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.
|
|
||||||
|
|
||||||
class openstack::cinder(
|
class openstack::cinder(
|
||||||
$sql_connection,
|
$sql_connection,
|
||||||
|
@ -22,7 +21,6 @@ class openstack::cinder(
|
||||||
$iscsi_bind_host = '0.0.0.0',
|
$iscsi_bind_host = '0.0.0.0',
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
$syslog_log_facility = 'LOG_LOCAL3',
|
$syslog_log_facility = 'LOG_LOCAL3',
|
||||||
$syslog_log_level = 'WARNING',
|
|
||||||
$cinder_rate_limits = undef,
|
$cinder_rate_limits = undef,
|
||||||
$verbose = false,
|
$verbose = false,
|
||||||
$debug = false,
|
$debug = false,
|
||||||
|
@ -63,7 +61,6 @@ class openstack::cinder(
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_facility => $syslog_log_facility,
|
syslog_log_facility => $syslog_log_facility,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
max_retries => $max_retries,
|
max_retries => $max_retries,
|
||||||
max_pool_size => $max_pool_size,
|
max_pool_size => $max_pool_size,
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
# Defaults to false. False indicates that a vnc proxy should not be configured.
|
# Defaults to false. False indicates that a vnc proxy should not be configured.
|
||||||
# [vnc_enabled] Rather vnc console should be enabled.
|
# [vnc_enabled] Rather vnc console should be enabled.
|
||||||
# Optional. Defaults to 'true',
|
# Optional. Defaults to 'true',
|
||||||
# [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.
|
# [verbose] Rather to print more verbose (INFO+) output. If non verbose and non debug. Optional. Defaults to false.
|
||||||
# [debug] Rather to print even more verbose (DEBUG+) output. If true, would ignore verbose option. Optional. Defaults to false.
|
# [debug] Rather to print even more verbose (DEBUG+) output. If true, would ignore verbose option. Optional. Defaults to false.
|
||||||
# [manage_volumes] Rather nova-volume should be enabled on this compute node.
|
# [manage_volumes] Rather nova-volume should be enabled on this compute node.
|
||||||
# Optional. Defaults to false.
|
# Optional. Defaults to false.
|
||||||
|
@ -45,7 +45,6 @@
|
||||||
# [use_syslog] Rather or not service should log to syslog. Optional.
|
# [use_syslog] Rather or not service should log to syslog. Optional.
|
||||||
# [syslog_log_facility] Facility for syslog, if used. Optional. Note: duplicating conf option
|
# [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
|
# 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.
|
|
||||||
# [ssh_private_key] path to private ssh key temporary location on this server where it was uploaded or generated
|
# [ssh_private_key] path to private ssh key temporary location on this server where it was uploaded or generated
|
||||||
# [ssh_public_key] path to public ssh key temporary location on this server where it was uploaded or generated
|
# [ssh_public_key] path to public ssh key temporary location on this server where it was uploaded or generated
|
||||||
#
|
#
|
||||||
|
@ -62,69 +61,68 @@ class openstack::compute (
|
||||||
$nova_user_password,
|
$nova_user_password,
|
||||||
# Network
|
# Network
|
||||||
# DB
|
# DB
|
||||||
$sql_connection = false,
|
$sql_connection = false,
|
||||||
# Nova
|
# Nova
|
||||||
$purge_nova_config = false,
|
$purge_nova_config = false,
|
||||||
# RPC
|
# RPC
|
||||||
$queue_provider = 'rabbitmq',
|
$queue_provider = 'rabbitmq',
|
||||||
$amqp_hosts = false,
|
$amqp_hosts = false,
|
||||||
$amqp_user = 'nova',
|
$amqp_user = 'nova',
|
||||||
$amqp_password = 'rabbit_pw',
|
$amqp_password = 'rabbit_pw',
|
||||||
$rabbit_ha_queues = false,
|
$rabbit_ha_queues = false,
|
||||||
# Glance
|
# Glance
|
||||||
$glance_api_servers = undef,
|
$glance_api_servers = undef,
|
||||||
# Virtualization
|
# Virtualization
|
||||||
$libvirt_type = 'kvm',
|
$libvirt_type = 'kvm',
|
||||||
# VNC
|
# VNC
|
||||||
$vnc_enabled = true,
|
$vnc_enabled = true,
|
||||||
$vncproxy_host = undef,
|
$vncproxy_host = undef,
|
||||||
$vncserver_listen = $internal_address,
|
$vncserver_listen = $internal_address,
|
||||||
# General
|
# General
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$multi_host = false,
|
$multi_host = false,
|
||||||
$auto_assign_floating_ip = false,
|
$auto_assign_floating_ip = false,
|
||||||
$network_config = {},
|
$network_config = {},
|
||||||
$public_interface,
|
$public_interface,
|
||||||
$private_interface,
|
$private_interface,
|
||||||
$network_manager,
|
$network_manager,
|
||||||
$fixed_range = undef,
|
$fixed_range = undef,
|
||||||
# Quantum
|
# Quantum
|
||||||
$quantum = false,
|
$quantum = false,
|
||||||
$quantum_config = {},
|
$quantum_config = {},
|
||||||
# Ceilometer
|
# Ceilometer
|
||||||
$ceilometer_user_password = 'ceilometer_pass',
|
$ceilometer_user_password = 'ceilometer_pass',
|
||||||
# nova compute configuration parameters
|
# nova compute configuration parameters
|
||||||
$verbose = false,
|
$verbose = false,
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$service_endpoint = '127.0.0.1',
|
$service_endpoint = '127.0.0.1',
|
||||||
$ssh_private_key = '/var/lib/astute/nova/nova',
|
$ssh_private_key = '/var/lib/astute/nova/nova',
|
||||||
$ssh_public_key = '/var/lib/astute/nova/nova.pub',
|
$ssh_public_key = '/var/lib/astute/nova/nova.pub',
|
||||||
$cache_server_ip = ['127.0.0.1'],
|
$cache_server_ip = ['127.0.0.1'],
|
||||||
$cache_server_port = '11211',
|
$cache_server_port = '11211',
|
||||||
# if the cinder management components should be installed
|
# if the cinder management components should be installed
|
||||||
$manage_volumes = false,
|
$manage_volumes = false,
|
||||||
$nv_physical_volume = undef,
|
$nv_physical_volume = undef,
|
||||||
$cinder_volume_group = 'cinder-volumes',
|
$cinder_volume_group = 'cinder-volumes',
|
||||||
$cinder = true,
|
$cinder = true,
|
||||||
$cinder_user_password = 'cinder_user_pass',
|
$cinder_user_password = 'cinder_user_pass',
|
||||||
$cinder_db_password = 'cinder_db_pass',
|
$cinder_db_password = 'cinder_db_pass',
|
||||||
$cinder_db_user = 'cinder',
|
$cinder_db_user = 'cinder',
|
||||||
$cinder_db_dbname = 'cinder',
|
$cinder_db_dbname = 'cinder',
|
||||||
$cinder_iscsi_bind_addr = false,
|
$cinder_iscsi_bind_addr = false,
|
||||||
$db_host = '127.0.0.1',
|
$db_host = '127.0.0.1',
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
$syslog_log_facility = 'LOG_LOCAL6',
|
$syslog_log_facility = 'LOG_LOCAL6',
|
||||||
$syslog_log_facility_cinder = 'LOG_LOCAL3',
|
$syslog_log_facility_neutron = 'LOG_LOCAL4',
|
||||||
$syslog_log_facility_neutron = 'LOG_LOCAL4',
|
$syslog_log_facility_ceilometer = 'LOG_LOCAL0',
|
||||||
$syslog_log_level = 'WARNING',
|
$nova_rate_limits = undef,
|
||||||
$nova_rate_limits = undef,
|
$nova_report_interval = '10',
|
||||||
$nova_report_interval = '10',
|
$nova_service_down_time = '60',
|
||||||
$nova_service_down_time = '60',
|
$cinder_rate_limits = undef,
|
||||||
$cinder_rate_limits = undef,
|
$create_networks = false,
|
||||||
$create_networks = false,
|
$state_path = '/var/lib/nova',
|
||||||
$state_path = '/var/lib/nova',
|
$ceilometer = false,
|
||||||
$ceilometer = false,
|
$ceilometer_metering_secret = "ceilometer",
|
||||||
$ceilometer_metering_secret = "ceilometer",
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@ -188,7 +186,6 @@ class openstack::compute (
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_facility => $syslog_log_facility,
|
syslog_log_facility => $syslog_log_facility,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
api_bind_address => $internal_address,
|
api_bind_address => $internal_address,
|
||||||
state_path => $state_path,
|
state_path => $state_path,
|
||||||
report_interval => $nova_report_interval,
|
report_interval => $nova_report_interval,
|
||||||
|
@ -248,17 +245,18 @@ class openstack::compute (
|
||||||
# configure ceilometer compute agent
|
# configure ceilometer compute agent
|
||||||
if ($ceilometer) {
|
if ($ceilometer) {
|
||||||
class { 'openstack::ceilometer':
|
class { 'openstack::ceilometer':
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
queue_provider => $queue_provider,
|
syslog_log_facility => $syslog_log_facility_ceilometer,
|
||||||
amqp_hosts => $amqp_hosts,
|
queue_provider => $queue_provider,
|
||||||
amqp_user => $amqp_user,
|
amqp_hosts => $amqp_hosts,
|
||||||
amqp_password => $amqp_password,
|
amqp_user => $amqp_user,
|
||||||
keystone_host => $service_endpoint,
|
amqp_password => $amqp_password,
|
||||||
keystone_password => $ceilometer_user_password,
|
keystone_host => $service_endpoint,
|
||||||
on_compute => true,
|
keystone_password => $ceilometer_user_password,
|
||||||
metering_secret => $ceilometer_metering_secret,
|
on_compute => true,
|
||||||
|
metering_secret => $ceilometer_metering_secret,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -332,7 +330,6 @@ class openstack::compute (
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
syslog_log_facility => $syslog_log_facility_neutron,
|
syslog_log_facility => $syslog_log_facility_neutron,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -30,8 +30,7 @@
|
||||||
# Defaults to false.
|
# Defaults to false.
|
||||||
# [network_config] Hash that can be used to pass implementation specifc
|
# [network_config] Hash that can be used to pass implementation specifc
|
||||||
# network settings. Optioal. Defaults to {}
|
# network settings. Optioal. Defaults to {}
|
||||||
# [verbose] Rather to print more verbose (INFO+) output. If non verbose and non debug, would give
|
# [verbose] Rather to print more verbose (INFO+) output. Optional. Defaults to false.
|
||||||
# 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.
|
# [debug] Rather to print even more verbose (DEBUG+) output. If true, would ignore verbose option.
|
||||||
# Optional. Defaults to false.
|
# Optional. Defaults to false.
|
||||||
# [export_resources] Rather to export resources.
|
# [export_resources] Rather to export resources.
|
||||||
|
@ -51,7 +50,6 @@
|
||||||
# [use_syslog] Rather or not service should log to syslog. Optional. Defaults to false.
|
# [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
|
# [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
|
# 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.
|
|
||||||
# [max_retries] number of reconnects to Sqlalchemy db backend. Defaults -1.
|
# [max_retries] number of reconnects to Sqlalchemy db backend. Defaults -1.
|
||||||
# [max_pool_size] QueuePool setting for Sqlalchemy db backend. Defaults 10.
|
# [max_pool_size] QueuePool setting for Sqlalchemy db backend. Defaults 10.
|
||||||
# [max_overflow] QueuePool setting for Sqlalchemy db backend. Defaults 30.
|
# [max_overflow] QueuePool setting for Sqlalchemy db backend. Defaults 30.
|
||||||
|
@ -80,129 +78,129 @@ class openstack::controller (
|
||||||
$public_interface,
|
$public_interface,
|
||||||
$private_interface,
|
$private_interface,
|
||||||
# Required Database
|
# Required Database
|
||||||
$mysql_root_password = 'sql_pass',
|
$mysql_root_password = 'sql_pass',
|
||||||
$custom_mysql_setup_class= undef,
|
$custom_mysql_setup_class = undef,
|
||||||
$admin_email = 'some_user@some_fake_email_address.foo',
|
$admin_email = 'some_user@some_fake_email_address.foo',
|
||||||
$admin_user = 'admin',
|
$admin_user = 'admin',
|
||||||
$admin_password = 'ChangeMe',
|
$admin_password = 'ChangeMe',
|
||||||
$keystone_db_password = 'keystone_pass',
|
$keystone_db_password = 'keystone_pass',
|
||||||
$keystone_admin_token = 'keystone_admin_token',
|
$keystone_admin_token = 'keystone_admin_token',
|
||||||
# Required Glance
|
# Required Glance
|
||||||
$glance_db_password = 'glance_pass',
|
$glance_db_password = 'glance_pass',
|
||||||
$glance_user_password = 'glance_pass',
|
$glance_user_password = 'glance_pass',
|
||||||
# Required Nova
|
# Required Nova
|
||||||
$nova_db_password = 'nova_pass',
|
$nova_db_password = 'nova_pass',
|
||||||
$nova_user_password = 'nova_pass',
|
$nova_user_password = 'nova_pass',
|
||||||
# Required Ceilometer
|
# Required Ceilometer
|
||||||
$ceilometer = false,
|
$ceilometer = false,
|
||||||
$ceilometer_db_password = 'ceilometer_pass',
|
$ceilometer_db_password = 'ceilometer_pass',
|
||||||
$ceilometer_user_password = 'ceilometer_pass',
|
$ceilometer_user_password = 'ceilometer_pass',
|
||||||
$ceilometer_db_user = 'ceilometer',
|
$ceilometer_db_user = 'ceilometer',
|
||||||
$ceilometer_db_dbname = 'ceilometer',
|
$ceilometer_db_dbname = 'ceilometer',
|
||||||
$ceilometer_metering_secret = 'ceilometer',
|
$ceilometer_metering_secret = 'ceilometer',
|
||||||
$ceilometer_db_type = 'mongodb',
|
$ceilometer_db_type = 'mongodb',
|
||||||
$ceilometer_db_host = '127.0.0.1',
|
$ceilometer_db_host = '127.0.0.1',
|
||||||
# Required Horizon
|
# Required Horizon
|
||||||
$secret_key = 'dummy_secret_key',
|
$secret_key = 'dummy_secret_key',
|
||||||
# not sure if this works correctly
|
# not sure if this works correctly
|
||||||
$internal_address,
|
$internal_address,
|
||||||
$admin_address,
|
$admin_address,
|
||||||
# RPC
|
# RPC
|
||||||
$queue_provider = 'rabbitmq',
|
$queue_provider = 'rabbitmq',
|
||||||
$amqp_hosts = '127.0.0.1',
|
$amqp_hosts = '127.0.0.1',
|
||||||
$amqp_user = 'nova',
|
$amqp_user = 'nova',
|
||||||
$amqp_password = 'rabbit_pw',
|
$amqp_password = 'rabbit_pw',
|
||||||
$rabbit_ha_queues = false,
|
$rabbit_ha_queues = false,
|
||||||
$rabbitmq_bind_ip_address = 'UNSET',
|
$rabbitmq_bind_ip_address = 'UNSET',
|
||||||
$rabbitmq_bind_port = '5672',
|
$rabbitmq_bind_port = '5672',
|
||||||
$rabbitmq_cluster_nodes = [],
|
$rabbitmq_cluster_nodes = [],
|
||||||
$rabbit_cluster = false,
|
$rabbit_cluster = false,
|
||||||
# network configuration
|
# network configuration
|
||||||
# this assumes that it is a flat network manager
|
# this assumes that it is a flat network manager
|
||||||
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||||
$fixed_range = '10.0.0.0/24',
|
$fixed_range = '10.0.0.0/24',
|
||||||
$floating_range = false,
|
$floating_range = false,
|
||||||
$create_networks = true,
|
$create_networks = true,
|
||||||
$num_networks = 1,
|
$num_networks = 1,
|
||||||
$network_size = 255,
|
$network_size = 255,
|
||||||
$multi_host = false,
|
$multi_host = false,
|
||||||
$auto_assign_floating_ip = false,
|
$auto_assign_floating_ip = false,
|
||||||
$network_config = {},
|
$network_config = {},
|
||||||
# Database
|
# Database
|
||||||
$db_host = '127.0.0.1',
|
$db_host = '127.0.0.1',
|
||||||
$db_type = 'mysql',
|
$db_type = 'mysql',
|
||||||
$mysql_account_security = true,
|
$mysql_account_security = true,
|
||||||
$mysql_bind_address = '0.0.0.0',
|
$mysql_bind_address = '0.0.0.0',
|
||||||
$allowed_hosts = [ '%', $::hostname ],
|
$allowed_hosts = [ '%', $::hostname ],
|
||||||
# Keystone
|
# Keystone
|
||||||
$keystone_db_user = 'keystone',
|
$keystone_db_user = 'keystone',
|
||||||
$keystone_db_dbname = 'keystone',
|
$keystone_db_dbname = 'keystone',
|
||||||
$keystone_admin_tenant = 'admin',
|
$keystone_admin_tenant = 'admin',
|
||||||
# Glance
|
# Glance
|
||||||
$glance_db_user = 'glance',
|
$glance_db_user = 'glance',
|
||||||
$glance_db_dbname = 'glance',
|
$glance_db_dbname = 'glance',
|
||||||
$glance_api_servers = undef,
|
$glance_api_servers = undef,
|
||||||
$glance_image_cache_max_size = '10737418240',
|
$glance_image_cache_max_size = '10737418240',
|
||||||
# Nova
|
# Nova
|
||||||
$nova_db_user = 'nova',
|
$nova_db_user = 'nova',
|
||||||
$nova_db_dbname = 'nova',
|
$nova_db_dbname = 'nova',
|
||||||
$purge_nova_config = false,
|
$purge_nova_config = false,
|
||||||
$nova_report_interval = '10',
|
$nova_report_interval = '10',
|
||||||
$nova_service_down_time = '60',
|
$nova_service_down_time = '60',
|
||||||
|
|
||||||
# Horizon
|
# Horizon
|
||||||
$cache_server_ip = ['127.0.0.1'],
|
$cache_server_ip = ['127.0.0.1'],
|
||||||
$cache_server_port = '11211',
|
$cache_server_port = '11211',
|
||||||
$swift = false,
|
$swift = false,
|
||||||
$cinder = true,
|
$cinder = true,
|
||||||
$horizon_app_links = undef,
|
$horizon_app_links = undef,
|
||||||
# General
|
# General
|
||||||
$verbose = false,
|
$verbose = false,
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$export_resources = true,
|
$export_resources = true,
|
||||||
# if the cinder management components should be installed
|
# if the cinder management components should be installed
|
||||||
$cinder_user_password = 'cinder_user_pass',
|
$cinder_user_password = 'cinder_user_pass',
|
||||||
$cinder_db_password = 'cinder_db_pass',
|
$cinder_db_password = 'cinder_db_pass',
|
||||||
$cinder_db_user = 'cinder',
|
$cinder_db_user = 'cinder',
|
||||||
$cinder_db_dbname = 'cinder',
|
$cinder_db_dbname = 'cinder',
|
||||||
$cinder_iscsi_bind_addr = false,
|
$cinder_iscsi_bind_addr = false,
|
||||||
$cinder_volume_group = 'cinder-volumes',
|
$cinder_volume_group = 'cinder-volumes',
|
||||||
#
|
#
|
||||||
$quantum = false,
|
$quantum = false,
|
||||||
$quantum_config = {},
|
$quantum_config = {},
|
||||||
$quantum_network_node = false,
|
$quantum_network_node = false,
|
||||||
$quantum_netnode_on_cnt = false,
|
$quantum_netnode_on_cnt = false,
|
||||||
$segment_range = '1:4094',
|
$segment_range = '1:4094',
|
||||||
$tenant_network_type = 'gre',
|
$tenant_network_type = 'gre',
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$api_bind_address = '0.0.0.0',
|
$api_bind_address = '0.0.0.0',
|
||||||
$service_endpoint = '127.0.0.1',
|
$service_endpoint = '127.0.0.1',
|
||||||
$galera_cluster_name = 'openstack',
|
$galera_cluster_name = 'openstack',
|
||||||
$primary_controller = false,
|
$primary_controller = false,
|
||||||
$galera_node_address = '127.0.0.1',
|
$galera_node_address = '127.0.0.1',
|
||||||
$glance_backend = 'file',
|
$glance_backend = 'file',
|
||||||
$galera_nodes = ['127.0.0.1'],
|
$galera_nodes = ['127.0.0.1'],
|
||||||
$novnc_address = '127.0.0.1',
|
$novnc_address = '127.0.0.1',
|
||||||
$mysql_skip_name_resolve = false,
|
$mysql_skip_name_resolve = false,
|
||||||
$manage_volumes = false,
|
$manage_volumes = false,
|
||||||
$nv_physical_volume = undef,
|
$nv_physical_volume = undef,
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
$syslog_log_level = 'WARNING',
|
$syslog_log_facility_ceilometer = 'LOG_LOCAL0',
|
||||||
$syslog_log_facility_glance = 'LOG_LOCAL2',
|
$syslog_log_facility_glance = 'LOG_LOCAL2',
|
||||||
$syslog_log_facility_cinder = 'LOG_LOCAL3',
|
$syslog_log_facility_cinder = 'LOG_LOCAL3',
|
||||||
$syslog_log_facility_neutron = 'LOG_LOCAL4',
|
$syslog_log_facility_neutron = 'LOG_LOCAL4',
|
||||||
$syslog_log_facility_nova = 'LOG_LOCAL6',
|
$syslog_log_facility_nova = 'LOG_LOCAL6',
|
||||||
$syslog_log_facility_keystone = 'LOG_LOCAL7',
|
$syslog_log_facility_keystone = 'LOG_LOCAL7',
|
||||||
$horizon_use_ssl = false,
|
$horizon_use_ssl = false,
|
||||||
$nova_rate_limits = undef,
|
$nova_rate_limits = undef,
|
||||||
$cinder_rate_limits = undef,
|
$cinder_rate_limits = undef,
|
||||||
$ha_mode = false,
|
$ha_mode = false,
|
||||||
$nameservers = undef,
|
$nameservers = undef,
|
||||||
#
|
#
|
||||||
$max_retries = '-1',
|
$max_retries = '-1',
|
||||||
$max_pool_size = '10',
|
$max_pool_size = '10',
|
||||||
$max_overflow = '30',
|
$max_overflow = '30',
|
||||||
$idle_timeout = '3600',
|
$idle_timeout = '3600',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
|
||||||
|
@ -226,79 +224,78 @@ class openstack::controller (
|
||||||
Class['glance::db::mysql'] -> Class['glance::registry']
|
Class['glance::db::mysql'] -> Class['glance::registry']
|
||||||
}
|
}
|
||||||
class { 'openstack::db::mysql':
|
class { 'openstack::db::mysql':
|
||||||
mysql_root_password => $mysql_root_password,
|
mysql_root_password => $mysql_root_password,
|
||||||
mysql_bind_address => $mysql_bind_address,
|
mysql_bind_address => $mysql_bind_address,
|
||||||
mysql_account_security => $mysql_account_security,
|
mysql_account_security => $mysql_account_security,
|
||||||
keystone_db_user => $keystone_db_user,
|
keystone_db_user => $keystone_db_user,
|
||||||
keystone_db_password => $keystone_db_password,
|
keystone_db_password => $keystone_db_password,
|
||||||
keystone_db_dbname => $keystone_db_dbname,
|
keystone_db_dbname => $keystone_db_dbname,
|
||||||
glance_db_user => $glance_db_user,
|
glance_db_user => $glance_db_user,
|
||||||
glance_db_password => $glance_db_password,
|
glance_db_password => $glance_db_password,
|
||||||
glance_db_dbname => $glance_db_dbname,
|
glance_db_dbname => $glance_db_dbname,
|
||||||
nova_db_user => $nova_db_user,
|
nova_db_user => $nova_db_user,
|
||||||
nova_db_password => $nova_db_password,
|
nova_db_password => $nova_db_password,
|
||||||
nova_db_dbname => $nova_db_dbname,
|
nova_db_dbname => $nova_db_dbname,
|
||||||
ceilometer => $ceilometer,
|
ceilometer => $ceilometer,
|
||||||
ceilometer_db_user => $ceilometer_db_user,
|
ceilometer_db_user => $ceilometer_db_user,
|
||||||
ceilometer_db_password => $ceilometer_db_password,
|
ceilometer_db_password => $ceilometer_db_password,
|
||||||
ceilometer_db_dbname => $ceilometer_db_dbname,
|
ceilometer_db_dbname => $ceilometer_db_dbname,
|
||||||
cinder => $cinder,
|
cinder => $cinder,
|
||||||
cinder_db_user => $cinder_db_user,
|
cinder_db_user => $cinder_db_user,
|
||||||
cinder_db_password => $cinder_db_password,
|
cinder_db_password => $cinder_db_password,
|
||||||
cinder_db_dbname => $cinder_db_dbname,
|
cinder_db_dbname => $cinder_db_dbname,
|
||||||
neutron => $quantum,
|
neutron => $quantum,
|
||||||
neutron_db_user => $quantum ? { true => $quantum_config['database']['username'], default=>undef},
|
neutron_db_user => $quantum ? { true => $quantum_config['database']['username'], default=>undef},
|
||||||
neutron_db_password => $quantum ? { true => $quantum_config['database']['passwd'], default=>""},
|
neutron_db_password => $quantum ? { true => $quantum_config['database']['passwd'], default=>""},
|
||||||
neutron_db_dbname => $quantum ? { true => $quantum_config['database']['dbname'], default=>undef},
|
neutron_db_dbname => $quantum ? { true => $quantum_config['database']['dbname'], default=>undef},
|
||||||
allowed_hosts => $allowed_hosts,
|
allowed_hosts => $allowed_hosts,
|
||||||
enabled => $enabled,
|
enabled => $enabled,
|
||||||
galera_cluster_name => $galera_cluster_name,
|
galera_cluster_name => $galera_cluster_name,
|
||||||
primary_controller => $primary_controller,
|
primary_controller => $primary_controller,
|
||||||
galera_node_address => $galera_node_address ,
|
galera_node_address => $galera_node_address ,
|
||||||
#db_host => $internal_address,
|
#db_host => $internal_address,
|
||||||
galera_nodes => $galera_nodes,
|
galera_nodes => $galera_nodes,
|
||||||
custom_setup_class => $custom_mysql_setup_class,
|
custom_setup_class => $custom_mysql_setup_class,
|
||||||
mysql_skip_name_resolve => $mysql_skip_name_resolve,
|
mysql_skip_name_resolve => $mysql_skip_name_resolve,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
####### KEYSTONE ###########
|
####### KEYSTONE ###########
|
||||||
class { 'openstack::keystone':
|
class { 'openstack::keystone':
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
db_type => $db_type,
|
db_type => $db_type,
|
||||||
db_host => $db_host,
|
db_host => $db_host,
|
||||||
db_password => $keystone_db_password,
|
db_password => $keystone_db_password,
|
||||||
db_name => $keystone_db_dbname,
|
db_name => $keystone_db_dbname,
|
||||||
db_user => $keystone_db_user,
|
db_user => $keystone_db_user,
|
||||||
admin_token => $keystone_admin_token,
|
admin_token => $keystone_admin_token,
|
||||||
admin_tenant => $keystone_admin_tenant,
|
admin_tenant => $keystone_admin_tenant,
|
||||||
admin_email => $admin_email,
|
admin_email => $admin_email,
|
||||||
admin_user => $admin_user,
|
admin_user => $admin_user,
|
||||||
admin_password => $admin_password,
|
admin_password => $admin_password,
|
||||||
public_address => $public_address,
|
public_address => $public_address,
|
||||||
internal_address => $internal_address,
|
internal_address => $internal_address,
|
||||||
admin_address => $admin_address,
|
admin_address => $admin_address,
|
||||||
glance_user_password => $glance_user_password,
|
glance_user_password => $glance_user_password,
|
||||||
nova_user_password => $nova_user_password,
|
nova_user_password => $nova_user_password,
|
||||||
cinder => $cinder,
|
cinder => $cinder,
|
||||||
cinder_user_password => $cinder_user_password,
|
cinder_user_password => $cinder_user_password,
|
||||||
quantum => $quantum,
|
quantum => $quantum,
|
||||||
quantum_config => $quantum_config,
|
quantum_config => $quantum_config,
|
||||||
ceilometer => $ceilometer,
|
ceilometer => $ceilometer,
|
||||||
ceilometer_user_password => $ceilometer_user_password,
|
ceilometer_user_password => $ceilometer_user_password,
|
||||||
bind_host => $api_bind_address,
|
bind_host => $api_bind_address,
|
||||||
enabled => $enabled,
|
enabled => $enabled,
|
||||||
package_ensure => $::openstack_keystone_version,
|
package_ensure => $::openstack_keystone_version,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_facility => $syslog_log_facility_keystone,
|
syslog_log_facility => $syslog_log_facility_keystone,
|
||||||
syslog_log_level => $syslog_log_level,
|
memcache_servers => $cache_server_ip,
|
||||||
memcache_servers => $cache_server_ip,
|
memcache_server_port => $cache_server_port,
|
||||||
memcache_server_port => $cache_server_port,
|
max_retries => $max_retries,
|
||||||
max_retries => $max_retries,
|
max_pool_size => $max_pool_size,
|
||||||
max_pool_size => $max_pool_size,
|
max_overflow => $max_overflow,
|
||||||
max_overflow => $max_overflow,
|
idle_timeout => $idle_timeout,
|
||||||
idle_timeout => $idle_timeout,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -320,7 +317,6 @@ class openstack::controller (
|
||||||
registry_host => $service_endpoint,
|
registry_host => $service_endpoint,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_facility => $syslog_log_facility_glance,
|
syslog_log_facility => $syslog_log_facility_glance,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
glance_image_cache_max_size => $glance_image_cache_max_size,
|
glance_image_cache_max_size => $glance_image_cache_max_size,
|
||||||
max_retries => $max_retries,
|
max_retries => $max_retries,
|
||||||
max_pool_size => $max_pool_size,
|
max_pool_size => $max_pool_size,
|
||||||
|
@ -360,73 +356,72 @@ class openstack::controller (
|
||||||
|
|
||||||
class { 'openstack::nova::controller':
|
class { 'openstack::nova::controller':
|
||||||
# Database
|
# Database
|
||||||
db_host => $db_host,
|
db_host => $db_host,
|
||||||
# Network
|
# Network
|
||||||
nameservers => $nameservers,
|
nameservers => $nameservers,
|
||||||
network_manager => $network_manager,
|
network_manager => $network_manager,
|
||||||
floating_range => $floating_range,
|
floating_range => $floating_range,
|
||||||
fixed_range => $fixed_range,
|
fixed_range => $fixed_range,
|
||||||
public_address => $public_address,
|
public_address => $public_address,
|
||||||
public_interface => $public_interface,
|
public_interface => $public_interface,
|
||||||
admin_address => $admin_address,
|
admin_address => $admin_address,
|
||||||
internal_address => $internal_address,
|
internal_address => $internal_address,
|
||||||
private_interface => $private_interface,
|
private_interface => $private_interface,
|
||||||
auto_assign_floating_ip => $auto_assign_floating_ip,
|
auto_assign_floating_ip => $auto_assign_floating_ip,
|
||||||
create_networks => $create_networks,
|
create_networks => $create_networks,
|
||||||
num_networks => $num_networks,
|
num_networks => $num_networks,
|
||||||
network_size => $network_size,
|
network_size => $network_size,
|
||||||
multi_host => $multi_host,
|
multi_host => $multi_host,
|
||||||
network_config => $network_config,
|
network_config => $network_config,
|
||||||
keystone_host => $service_endpoint,
|
keystone_host => $service_endpoint,
|
||||||
service_endpoint => $service_endpoint,
|
service_endpoint => $service_endpoint,
|
||||||
# Quantum
|
# Quantum
|
||||||
quantum => $quantum,
|
quantum => $quantum,
|
||||||
quantum_config => $quantum_config,
|
quantum_config => $quantum_config,
|
||||||
quantum_network_node => $quantum_network_node,
|
quantum_network_node => $quantum_network_node,
|
||||||
quantum_netnode_on_cnt => $quantum_netnode_on_cnt,
|
quantum_netnode_on_cnt => $quantum_netnode_on_cnt,
|
||||||
segment_range => $segment_range,
|
segment_range => $segment_range,
|
||||||
tenant_network_type => $tenant_network_type,
|
tenant_network_type => $tenant_network_type,
|
||||||
# Nova
|
# Nova
|
||||||
nova_user_password => $nova_user_password,
|
nova_user_password => $nova_user_password,
|
||||||
nova_db_password => $nova_db_password,
|
nova_db_password => $nova_db_password,
|
||||||
nova_db_user => $nova_db_user,
|
nova_db_user => $nova_db_user,
|
||||||
nova_db_dbname => $nova_db_dbname,
|
nova_db_dbname => $nova_db_dbname,
|
||||||
nova_quota_driver => $nova_quota_driver,
|
nova_quota_driver => $nova_quota_driver,
|
||||||
# RPC
|
# RPC
|
||||||
queue_provider => $queue_provider,
|
queue_provider => $queue_provider,
|
||||||
amqp_hosts => $amqp_hosts,
|
amqp_hosts => $amqp_hosts,
|
||||||
amqp_user => $amqp_user,
|
amqp_user => $amqp_user,
|
||||||
amqp_password => $amqp_password,
|
amqp_password => $amqp_password,
|
||||||
rabbit_ha_queues => $rabbit_ha_queues,
|
rabbit_ha_queues => $rabbit_ha_queues,
|
||||||
rabbitmq_bind_ip_address => $rabbitmq_bind_ip_address,
|
rabbitmq_bind_ip_address => $rabbitmq_bind_ip_address,
|
||||||
rabbitmq_bind_port => $rabbitmq_bind_port,
|
rabbitmq_bind_port => $rabbitmq_bind_port,
|
||||||
rabbitmq_cluster_nodes => $rabbitmq_cluster_nodes,
|
rabbitmq_cluster_nodes => $rabbitmq_cluster_nodes,
|
||||||
rabbit_cluster => $rabbit_cluster,
|
rabbit_cluster => $rabbit_cluster,
|
||||||
# Glance
|
# Glance
|
||||||
glance_api_servers => $glance_api_servers,
|
glance_api_servers => $glance_api_servers,
|
||||||
# General
|
# General
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
primary_controller => $primary_controller,
|
primary_controller => $primary_controller,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
enabled => $enabled,
|
enabled => $enabled,
|
||||||
exported_resources => $export_resources,
|
exported_resources => $export_resources,
|
||||||
enabled_apis => $enabled_apis,
|
enabled_apis => $enabled_apis,
|
||||||
api_bind_address => $api_bind_address,
|
api_bind_address => $api_bind_address,
|
||||||
ensure_package => $::openstack_version['nova'],
|
ensure_package => $::openstack_version['nova'],
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_facility => $syslog_log_facility_nova,
|
syslog_log_facility => $syslog_log_facility_nova,
|
||||||
syslog_log_facility_neutron => $syslog_log_facility_neutron,
|
syslog_log_facility_neutron => $syslog_log_facility_neutron,
|
||||||
syslog_log_level => $syslog_log_level,
|
nova_rate_limits => $nova_rate_limits,
|
||||||
nova_rate_limits => $nova_rate_limits,
|
nova_report_interval => $nova_report_interval,
|
||||||
nova_report_interval => $nova_report_interval,
|
nova_service_down_time => $nova_service_down_time,
|
||||||
nova_service_down_time => $nova_service_down_time,
|
cinder => $cinder,
|
||||||
cinder => $cinder,
|
|
||||||
# SQLAlchemy backend
|
# SQLAlchemy backend
|
||||||
max_retries => $max_retries,
|
max_retries => $max_retries,
|
||||||
max_pool_size => $max_pool_size,
|
max_pool_size => $max_pool_size,
|
||||||
max_overflow => $max_overflow,
|
max_overflow => $max_overflow,
|
||||||
idle_timeout => $idle_timeout,
|
idle_timeout => $idle_timeout,
|
||||||
novnc_address => $novnc_address,
|
novnc_address => $novnc_address,
|
||||||
}
|
}
|
||||||
|
|
||||||
######### Cinder Controller Services ########
|
######### Cinder Controller Services ########
|
||||||
|
@ -452,7 +447,6 @@ class openstack::controller (
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
syslog_log_facility => $syslog_log_facility_cinder,
|
syslog_log_facility => $syslog_log_facility_cinder,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
cinder_rate_limits => $cinder_rate_limits,
|
cinder_rate_limits => $cinder_rate_limits,
|
||||||
max_retries => $max_retries,
|
max_retries => $max_retries,
|
||||||
max_pool_size => $max_pool_size,
|
max_pool_size => $max_pool_size,
|
||||||
|
@ -486,6 +480,7 @@ class openstack::controller (
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
|
syslog_log_facility => $syslog_log_facility_ceilometer,
|
||||||
db_type => $ceilometer_db_type,
|
db_type => $ceilometer_db_type,
|
||||||
db_host => $ceilometer_db_host,
|
db_host => $ceilometer_db_host,
|
||||||
db_user => $ceilometer_db_user,
|
db_user => $ceilometer_db_user,
|
||||||
|
@ -522,9 +517,7 @@ class openstack::controller (
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
log_level => $syslog_log_level,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class { 'openstack::auth_file':
|
class { 'openstack::auth_file':
|
||||||
admin_user => $admin_user,
|
admin_user => $admin_user,
|
||||||
admin_password => $admin_password,
|
admin_password => $admin_password,
|
||||||
|
|
|
@ -2,55 +2,93 @@
|
||||||
class openstack::controller_ha (
|
class openstack::controller_ha (
|
||||||
$controllers,
|
$controllers,
|
||||||
$primary_controller,
|
$primary_controller,
|
||||||
$controller_public_addresses, $public_interface, $private_interface = 'eth2', $controller_internal_addresses,
|
$controller_public_addresses,
|
||||||
$internal_virtual_ip, $public_virtual_ip, $internal_address,
|
$public_interface,
|
||||||
$floating_range, $fixed_range, $multi_host, $network_manager, $verbose, $debug = false, $network_config = {}, $num_networks = 1, $network_size = 255,
|
$private_interface = 'eth2',
|
||||||
$auto_assign_floating_ip = false, $mysql_root_password, $admin_email, $admin_user = 'admin', $admin_password, $keystone_admin_tenant='admin',
|
$controller_internal_addresses,
|
||||||
$keystone_db_password, $keystone_admin_token, $glance_db_password, $glance_user_password, $glance_image_cache_max_size,
|
$internal_virtual_ip,
|
||||||
$nova_db_password, $nova_user_password,
|
$public_virtual_ip,
|
||||||
$queue_provider, $amqp_hosts, $amqp_user, $amqp_password, $rabbit_ha_queues=true,
|
$internal_address,
|
||||||
$rabbitmq_bind_ip_address, $rabbitmq_bind_port, $rabbitmq_cluster_nodes,
|
$floating_range,
|
||||||
$memcached_servers, $export_resources, $glance_backend='file', $swift_proxies=undef, $rgw_servers=undef,
|
$fixed_range,
|
||||||
$quantum = false,
|
$multi_host,
|
||||||
$quantum_config={},
|
$network_manager,
|
||||||
$cinder = false, $cinder_iscsi_bind_addr = false,
|
$verbose = true,
|
||||||
$nv_physical_volume = undef, $manage_volumes = false, $custom_mysql_setup_class = 'galera', $galera_nodes, $use_syslog = false, $syslog_log_level = 'WARNING',
|
$debug = false,
|
||||||
|
$network_config = {},
|
||||||
|
$num_networks = 1,
|
||||||
|
$network_size = 255,
|
||||||
|
$auto_assign_floating_ip = false,
|
||||||
|
$mysql_root_password,
|
||||||
|
$admin_email,
|
||||||
|
$admin_user = 'admin',
|
||||||
|
$admin_password,
|
||||||
|
$keystone_admin_tenant = 'admin',
|
||||||
|
$keystone_db_password,
|
||||||
|
$keystone_admin_token,
|
||||||
|
$glance_db_password,
|
||||||
|
$glance_user_password,
|
||||||
|
$glance_image_cache_max_size,
|
||||||
|
$nova_db_password,
|
||||||
|
$nova_user_password,
|
||||||
|
$queue_provider,
|
||||||
|
$amqp_hosts,
|
||||||
|
$amqp_user,
|
||||||
|
$amqp_password,
|
||||||
|
$rabbit_ha_queues = true,
|
||||||
|
$rabbitmq_bind_ip_address,
|
||||||
|
$rabbitmq_bind_port,
|
||||||
|
$rabbitmq_cluster_nodes,
|
||||||
|
$memcached_servers,
|
||||||
|
$export_resources,
|
||||||
|
$glance_backend = 'file',
|
||||||
|
$swift_proxies = undef,
|
||||||
|
$rgw_servers = undef,
|
||||||
|
$quantum = false,
|
||||||
|
$quantum_config = {},
|
||||||
|
$cinder = false,
|
||||||
|
$cinder_iscsi_bind_addr = false,
|
||||||
|
$nv_physical_volume = undef,
|
||||||
|
$manage_volumes = false,
|
||||||
|
$custom_mysql_setup_class = 'galera', $galera_nodes,
|
||||||
|
$use_syslog = false,
|
||||||
$novnc_address = undef,
|
$novnc_address = undef,
|
||||||
$syslog_log_facility_glance = 'LOG_LOCAL2',
|
$syslog_log_facility_glance = 'LOG_LOCAL2',
|
||||||
$syslog_log_facility_cinder = 'LOG_LOCAL3',
|
$syslog_log_facility_cinder = 'LOG_LOCAL3',
|
||||||
$syslog_log_facility_neutron = 'LOG_LOCAL4',
|
$syslog_log_facility_neutron = 'LOG_LOCAL4',
|
||||||
$syslog_log_facility_nova = 'LOG_LOCAL6',
|
$syslog_log_facility_nova = 'LOG_LOCAL6',
|
||||||
$syslog_log_facility_keystone = 'LOG_LOCAL7',
|
$syslog_log_facility_keystone = 'LOG_LOCAL7',
|
||||||
$cinder_rate_limits = undef, $nova_rate_limits = undef,
|
$syslog_log_facility_ceilometer = 'LOG_LOCAL0',
|
||||||
$cinder_volume_group = 'cinder-volumes',
|
$cinder_rate_limits = undef, $nova_rate_limits = undef,
|
||||||
$cinder_user_password = 'cinder_user_pass',
|
$cinder_volume_group = 'cinder-volumes',
|
||||||
$cinder_db_password = 'cinder_db_pass',
|
$cinder_user_password = 'cinder_user_pass',
|
||||||
$ceilometer = false,
|
$cinder_db_password = 'cinder_db_pass',
|
||||||
$ceilometer_db_password = 'ceilometer_pass',
|
$ceilometer = false,
|
||||||
$ceilometer_user_password = 'ceilometer_pass',
|
$ceilometer_db_password = 'ceilometer_pass',
|
||||||
$ceilometer_db_user = 'ceilometer',
|
$ceilometer_user_password = 'ceilometer_pass',
|
||||||
$ceilometer_db_dbname = 'ceilometer',
|
$ceilometer_db_user = 'ceilometer',
|
||||||
$ceilometer_metering_secret = 'ceilometer',
|
$ceilometer_db_dbname = 'ceilometer',
|
||||||
$ceilometer_db_type = 'mongodb',
|
$ceilometer_metering_secret = 'ceilometer',
|
||||||
$ceilometer_db_host = '127.0.0.1',
|
$ceilometer_db_type = 'mongodb',
|
||||||
$sahara = false,
|
$ceilometer_db_host = '127.0.0.1',
|
||||||
$murano = false,
|
$sahara = false,
|
||||||
$rabbit_node_ip_address = $internal_address,
|
$murano = false,
|
||||||
$horizon_use_ssl = false,
|
$rabbit_node_ip_address = $internal_address,
|
||||||
$quantum_network_node = false,
|
$horizon_use_ssl = false,
|
||||||
$quantum_netnode_on_cnt = false,
|
$quantum_network_node = false,
|
||||||
$mysql_skip_name_resolve = false,
|
$quantum_netnode_on_cnt = false,
|
||||||
$ha_provider = "pacemaker",
|
$mysql_skip_name_resolve = false,
|
||||||
$create_networks = true,
|
$ha_provider = "pacemaker",
|
||||||
$use_unicast_corosync = false,
|
$create_networks = true,
|
||||||
$ha_mode = true,
|
$use_unicast_corosync = false,
|
||||||
$nameservers = undef,
|
$ha_mode = true,
|
||||||
$idle_timeout = '3600',
|
$nameservers = undef,
|
||||||
$max_pool_size = '10',
|
$idle_timeout = '3600',
|
||||||
$max_overflow = '30',
|
$max_pool_size = '10',
|
||||||
$max_retries = '-1',
|
$max_overflow = '30',
|
||||||
$nova_report_interval = '10',
|
$max_retries = '-1',
|
||||||
$nova_service_down_time = '60',
|
$nova_report_interval = '10',
|
||||||
|
$nova_service_down_time = '60',
|
||||||
) {
|
) {
|
||||||
|
|
||||||
$is_primary_controller = $::fuel_settings['role'] ? { 'primary-controller'=>true, default=>false }
|
$is_primary_controller = $::fuel_settings['role'] ? { 'primary-controller'=>true, default=>false }
|
||||||
|
@ -72,99 +110,99 @@ class openstack::controller_ha (
|
||||||
}
|
}
|
||||||
|
|
||||||
class { '::openstack::controller':
|
class { '::openstack::controller':
|
||||||
private_interface => $private_interface,
|
private_interface => $private_interface,
|
||||||
public_interface => $public_interface,
|
public_interface => $public_interface,
|
||||||
public_address => $public_virtual_ip, # It is feature for HA mode.
|
public_address => $public_virtual_ip, # It is feature for HA mode.
|
||||||
internal_address => $internal_virtual_ip, # All internal traffic goes
|
internal_address => $internal_virtual_ip, # All internal traffic goes
|
||||||
admin_address => $internal_virtual_ip, # through load balancer.
|
admin_address => $internal_virtual_ip, # through load balancer.
|
||||||
floating_range => $floating_range,
|
floating_range => $floating_range,
|
||||||
fixed_range => $fixed_range,
|
fixed_range => $fixed_range,
|
||||||
multi_host => $multi_host,
|
multi_host => $multi_host,
|
||||||
network_config => $network_config,
|
network_config => $network_config,
|
||||||
num_networks => $num_networks,
|
num_networks => $num_networks,
|
||||||
network_size => $network_size,
|
network_size => $network_size,
|
||||||
network_manager => $network_manager,
|
network_manager => $network_manager,
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
auto_assign_floating_ip => $auto_assign_floating_ip,
|
auto_assign_floating_ip => $auto_assign_floating_ip,
|
||||||
mysql_root_password => $mysql_root_password,
|
mysql_root_password => $mysql_root_password,
|
||||||
custom_mysql_setup_class=> $custom_mysql_setup_class,
|
custom_mysql_setup_class => $custom_mysql_setup_class,
|
||||||
galera_cluster_name => 'openstack',
|
galera_cluster_name => 'openstack',
|
||||||
primary_controller => $primary_controller,
|
primary_controller => $primary_controller,
|
||||||
galera_node_address => $internal_address,
|
galera_node_address => $internal_address,
|
||||||
galera_nodes => $galera_nodes,
|
galera_nodes => $galera_nodes,
|
||||||
novnc_address => $novnc_address,
|
novnc_address => $novnc_address,
|
||||||
mysql_skip_name_resolve => $mysql_skip_name_resolve,
|
mysql_skip_name_resolve => $mysql_skip_name_resolve,
|
||||||
admin_email => $admin_email,
|
admin_email => $admin_email,
|
||||||
admin_user => $admin_user,
|
admin_user => $admin_user,
|
||||||
admin_password => $admin_password,
|
admin_password => $admin_password,
|
||||||
keystone_db_password => $keystone_db_password,
|
keystone_db_password => $keystone_db_password,
|
||||||
keystone_admin_token => $keystone_admin_token,
|
keystone_admin_token => $keystone_admin_token,
|
||||||
keystone_admin_tenant => $keystone_admin_tenant,
|
keystone_admin_tenant => $keystone_admin_tenant,
|
||||||
glance_db_password => $glance_db_password,
|
glance_db_password => $glance_db_password,
|
||||||
glance_user_password => $glance_user_password,
|
glance_user_password => $glance_user_password,
|
||||||
glance_api_servers => $glance_api_servers,
|
glance_api_servers => $glance_api_servers,
|
||||||
glance_image_cache_max_size => $glance_image_cache_max_size,
|
glance_image_cache_max_size => $glance_image_cache_max_size,
|
||||||
nova_db_password => $nova_db_password,
|
nova_db_password => $nova_db_password,
|
||||||
nova_user_password => $nova_user_password,
|
nova_user_password => $nova_user_password,
|
||||||
queue_provider => $queue_provider,
|
queue_provider => $queue_provider,
|
||||||
amqp_hosts => $amqp_hosts,
|
amqp_hosts => $amqp_hosts,
|
||||||
amqp_user => $amqp_user,
|
amqp_user => $amqp_user,
|
||||||
amqp_password => $amqp_password,
|
amqp_password => $amqp_password,
|
||||||
rabbit_ha_queues => $rabbit_ha_queues,
|
rabbit_ha_queues => $rabbit_ha_queues,
|
||||||
rabbitmq_bind_ip_address => $rabbitmq_bind_ip_address,
|
rabbitmq_bind_ip_address => $rabbitmq_bind_ip_address,
|
||||||
rabbitmq_bind_port => $rabbitmq_bind_port,
|
rabbitmq_bind_port => $rabbitmq_bind_port,
|
||||||
rabbitmq_cluster_nodes => $rabbitmq_cluster_nodes,
|
rabbitmq_cluster_nodes => $rabbitmq_cluster_nodes,
|
||||||
rabbit_cluster => true,
|
rabbit_cluster => true,
|
||||||
cache_server_ip => $memcached_servers,
|
cache_server_ip => $memcached_servers,
|
||||||
export_resources => false,
|
export_resources => false,
|
||||||
api_bind_address => $internal_address,
|
api_bind_address => $internal_address,
|
||||||
db_host => $internal_virtual_ip,
|
db_host => $internal_virtual_ip,
|
||||||
service_endpoint => $internal_virtual_ip,
|
service_endpoint => $internal_virtual_ip,
|
||||||
glance_backend => $glance_backend,
|
glance_backend => $glance_backend,
|
||||||
#require => Service['keepalived'],
|
#require => Service['keepalived'],
|
||||||
quantum => $quantum,
|
quantum => $quantum,
|
||||||
quantum_config => $quantum_config,
|
quantum_config => $quantum_config,
|
||||||
quantum_network_node => $quantum_network_node,
|
quantum_network_node => $quantum_network_node,
|
||||||
quantum_netnode_on_cnt => $quantum_netnode_on_cnt,
|
quantum_netnode_on_cnt => $quantum_netnode_on_cnt,
|
||||||
segment_range => $segment_range,
|
segment_range => $segment_range,
|
||||||
tenant_network_type => $tenant_network_type,
|
tenant_network_type => $tenant_network_type,
|
||||||
cinder => $cinder,
|
cinder => $cinder,
|
||||||
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
||||||
cinder_user_password => $cinder_user_password,
|
cinder_user_password => $cinder_user_password,
|
||||||
cinder_db_password => $cinder_db_password,
|
cinder_db_password => $cinder_db_password,
|
||||||
manage_volumes => $manage_volumes,
|
manage_volumes => $manage_volumes,
|
||||||
nv_physical_volume => $nv_physical_volume,
|
nv_physical_volume => $nv_physical_volume,
|
||||||
cinder_volume_group => $cinder_volume_group,
|
cinder_volume_group => $cinder_volume_group,
|
||||||
#
|
#
|
||||||
ceilometer => $ceilometer,
|
ceilometer => $ceilometer,
|
||||||
ceilometer_db_password => $ceilometer_db_password,
|
ceilometer_db_password => $ceilometer_db_password,
|
||||||
ceilometer_user_password => $ceilometer_user_password,
|
ceilometer_user_password => $ceilometer_user_password,
|
||||||
ceilometer_metering_secret => $ceilometer_metering_secret,
|
ceilometer_metering_secret => $ceilometer_metering_secret,
|
||||||
ceilometer_db_dbname => $ceilometer_db_dbname,
|
ceilometer_db_dbname => $ceilometer_db_dbname,
|
||||||
ceilometer_db_type => $ceilometer_db_type,
|
ceilometer_db_type => $ceilometer_db_type,
|
||||||
ceilometer_db_host => $ceilometer_db_host,
|
ceilometer_db_host => $ceilometer_db_host,
|
||||||
#
|
#
|
||||||
# turn on SWIFT_ENABLED option for Horizon dashboard
|
# turn on SWIFT_ENABLED option for Horizon dashboard
|
||||||
swift => $glance_backend ? { 'swift' => true, default => false },
|
swift => $glance_backend ? { 'swift' => true, default => false },
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_level => $syslog_log_level,
|
syslog_log_facility_glance => $syslog_log_facility_glance,
|
||||||
syslog_log_facility_glance => $syslog_log_facility_glance,
|
syslog_log_facility_cinder => $syslog_log_facility_cinder,
|
||||||
syslog_log_facility_cinder => $syslog_log_facility_cinder,
|
syslog_log_facility_nova => $syslog_log_facility_nova,
|
||||||
syslog_log_facility_nova => $syslog_log_facility_nova,
|
syslog_log_facility_keystone => $syslog_log_facility_keystone,
|
||||||
syslog_log_facility_keystone => $syslog_log_facility_keystone,
|
syslog_log_facility_ceilometer => $syslog_log_facility_ceilometer,
|
||||||
cinder_rate_limits => $cinder_rate_limits,
|
cinder_rate_limits => $cinder_rate_limits,
|
||||||
nova_rate_limits => $nova_rate_limits,
|
nova_rate_limits => $nova_rate_limits,
|
||||||
nova_report_interval => $nova_report_interval,
|
nova_report_interval => $nova_report_interval,
|
||||||
nova_service_down_time => $nova_service_down_time,
|
nova_service_down_time => $nova_service_down_time,
|
||||||
horizon_use_ssl => $horizon_use_ssl,
|
horizon_use_ssl => $horizon_use_ssl,
|
||||||
ha_mode => $ha_mode,
|
ha_mode => $ha_mode,
|
||||||
nameservers => $nameservers,
|
nameservers => $nameservers,
|
||||||
# SQLALchemy backend
|
# SQLALchemy backend
|
||||||
max_retries => $max_retries,
|
max_retries => $max_retries,
|
||||||
max_pool_size => $max_pool_size,
|
max_pool_size => $max_pool_size,
|
||||||
max_overflow => $max_overflow,
|
max_overflow => $max_overflow,
|
||||||
idle_timeout => $idle_timeout,
|
idle_timeout => $idle_timeout,
|
||||||
}
|
}
|
||||||
|
|
||||||
if $quantum and $quantum_network_node {
|
if $quantum and $quantum_network_node {
|
||||||
|
@ -185,7 +223,6 @@ class openstack::controller_ha (
|
||||||
#neutron_netnode_on_cnt=> $quantum_netnode_on_cnt,
|
#neutron_netnode_on_cnt=> $quantum_netnode_on_cnt,
|
||||||
service_provider => $ha_provider,
|
service_provider => $ha_provider,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
syslog_log_facility => $syslog_log_facility_neutron,
|
syslog_log_facility => $syslog_log_facility_neutron,
|
||||||
ha_mode => $ha_mode,
|
ha_mode => $ha_mode,
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,8 +18,7 @@
|
||||||
# [db_type] Type of sql databse to use. Optional. Defaults to 'mysql'
|
# [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_user] Name of glance DB user. Optional. Defaults to 'glance'
|
||||||
# [glance_db_dbname] Name of glance DB. 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
|
# [verbose] Rather to print more verbose (INFO+) output. Optional. Defaults to false.
|
||||||
# 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.
|
# [debug] Rather to print even more verbose (DEBUG+) output. If true, would ignore verbose option.
|
||||||
# Optional. Defaults to false.
|
# Optional. Defaults to false.
|
||||||
# [enabled] Used to indicate if the service should be active (true) or passive (false).
|
# [enabled] Used to indicate if the service should be active (true) or passive (false).
|
||||||
|
@ -27,7 +26,6 @@
|
||||||
# [use_syslog] Rather or not service should log to syslog. Optional. Default to false.
|
# [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
|
# [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
|
# 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.
|
|
||||||
# [glance_image_cache_max_size] the maximum size of glance image cache. Optional. Default is 10G.
|
# [glance_image_cache_max_size] the maximum size of glance image cache. Optional. Default is 10G.
|
||||||
#
|
#
|
||||||
# === Example
|
# === Example
|
||||||
|
@ -56,7 +54,6 @@ class openstack::glance (
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
# Facility is common for all glance services
|
# Facility is common for all glance services
|
||||||
$syslog_log_facility = 'LOG_LOCAL2',
|
$syslog_log_facility = 'LOG_LOCAL2',
|
||||||
$syslog_log_level = 'WARNING',
|
|
||||||
$glance_image_cache_max_size = '10737418240',
|
$glance_image_cache_max_size = '10737418240',
|
||||||
$idle_timeout = '3600',
|
$idle_timeout = '3600',
|
||||||
$max_pool_size = '10',
|
$max_pool_size = '10',
|
||||||
|
@ -101,7 +98,6 @@ class openstack::glance (
|
||||||
registry_host => $registry_host,
|
registry_host => $registry_host,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_facility => $syslog_log_facility,
|
syslog_log_facility => $syslog_log_facility,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
image_cache_max_size => $glance_image_cache_max_size,
|
image_cache_max_size => $glance_image_cache_max_size,
|
||||||
max_retries => $max_retries,
|
max_retries => $max_retries,
|
||||||
max_pool_size => $max_pool_size,
|
max_pool_size => $max_pool_size,
|
||||||
|
@ -124,7 +120,6 @@ class openstack::glance (
|
||||||
enabled => $enabled,
|
enabled => $enabled,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_facility => $syslog_log_facility,
|
syslog_log_facility => $syslog_log_facility,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
max_retries => $max_retries,
|
max_retries => $max_retries,
|
||||||
max_pool_size => $max_pool_size,
|
max_pool_size => $max_pool_size,
|
||||||
max_overflow => $max_overflow,
|
max_overflow => $max_overflow,
|
||||||
|
|
|
@ -17,8 +17,7 @@
|
||||||
# [keystone_db_user] Name of keystone db user. Optional. Defaults to 'keystone'
|
# [keystone_db_user] Name of keystone db user. Optional. Defaults to 'keystone'
|
||||||
# [keystone_db_dbname] Name of keystone DB. 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'
|
# [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
|
# [verbose] Rather to print more verbose (INFO+) output. Optional. Defaults to false.
|
||||||
# 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.
|
# [debug] Rather to print even more verbose (DEBUG+) output. If true, would ignore verbose option.
|
||||||
# Optional. Defaults to false.
|
# Optional. Defaults to false.
|
||||||
# [bind_host] Address that keystone binds to. Optional. Defaults to '0.0.0.0'
|
# [bind_host] Address that keystone binds to. Optional. Defaults to '0.0.0.0'
|
||||||
|
@ -31,7 +30,6 @@
|
||||||
# [use_syslog] Rather or not service should log to syslog. Optional. Default to false.
|
# [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
|
# [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
|
# 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.
|
|
||||||
#
|
#
|
||||||
# === Example
|
# === Example
|
||||||
#
|
#
|
||||||
|
@ -92,7 +90,6 @@ class openstack::keystone (
|
||||||
$package_ensure = present,
|
$package_ensure = present,
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
$syslog_log_facility = 'LOG_LOCAL7',
|
$syslog_log_facility = 'LOG_LOCAL7',
|
||||||
$syslog_log_level = 'WARNING',
|
|
||||||
$idle_timeout = '200',
|
$idle_timeout = '200',
|
||||||
$max_pool_size = '10',
|
$max_pool_size = '10',
|
||||||
$max_overflow = '30',
|
$max_overflow = '30',
|
||||||
|
@ -205,7 +202,6 @@ class openstack::keystone (
|
||||||
package_ensure => $package_ensure,
|
package_ensure => $package_ensure,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_facility => $syslog_log_facility,
|
syslog_log_facility => $syslog_log_facility,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
max_retries => $max_retries,
|
max_retries => $max_retries,
|
||||||
max_pool_size => $max_pool_size,
|
max_pool_size => $max_pool_size,
|
||||||
max_overflow => $max_overflow,
|
max_overflow => $max_overflow,
|
||||||
|
|
|
@ -1,10 +1,8 @@
|
||||||
# Class for rsyslog server/client logging
|
# Class for rsyslog server/client logging
|
||||||
# (assumes package rsyslog were installed at BM)
|
|
||||||
#
|
#
|
||||||
# [role] log server or client
|
# [role] log server or client
|
||||||
# [log_remote] send logs to remote server(s). Can be used with local logging.
|
# [log_remote] send logs to remote server(s). Can be used with local logging.
|
||||||
# [log_local], [log_auth_local] local & auth logging. Can be used with remote logging.
|
# [log_local], [log_auth_local] local & auth logging. Can be used with remote logging.
|
||||||
# [syslog_log_facility_XXX] syslog (client role only) facility for service XXX.
|
|
||||||
# [rotation] logrotate option for rotation period - daily, weekly, monthly, yearly.
|
# [rotation] logrotate option for rotation period - daily, weekly, monthly, yearly.
|
||||||
# [keep] logrotate option for number or rotated log files to keep.
|
# [keep] logrotate option for number or rotated log files to keep.
|
||||||
# [limitsize] logrotate option for log files would be rotated, if exceeded.
|
# [limitsize] logrotate option for log files would be rotated, if exceeded.
|
||||||
|
@ -16,102 +14,259 @@
|
||||||
# date-rfc3339: 2010-12-05T02:21:41.889482+01:00,
|
# date-rfc3339: 2010-12-05T02:21:41.889482+01:00,
|
||||||
# date-rfc3164: Dec 5 02:21:13,
|
# date-rfc3164: Dec 5 02:21:13,
|
||||||
# [virtual] if node is virtual, fix for udp checksums should be applied
|
# [virtual] if node is virtual, fix for udp checksums should be applied
|
||||||
# [rabbit_log_level] should be >= global syslog_log_level option,
|
# [rabbit_log_level] assign syslog log level for all rabbit messages which are not an ERROR
|
||||||
# otherwise none messages would have gone to syslog (client role only)
|
# (rabbit does not support syslog, imfile is used for log capturing)
|
||||||
# [debug] switch between debug and standard cases, client role only. imfile monitors for local logs would be used if debug.
|
#
|
||||||
|
|
||||||
class openstack::logging (
|
class openstack::logging (
|
||||||
$role = 'client',
|
$role = 'client',
|
||||||
$log_remote = true,
|
$log_remote = true,
|
||||||
$log_local = false,
|
$log_local = false,
|
||||||
$log_auth_local = false,
|
$log_auth_local = false,
|
||||||
$rotation = 'daily',
|
$rotation = 'daily',
|
||||||
$keep = '7',
|
$keep = '7',
|
||||||
$limitsize = '300M',
|
$limitsize = '300M',
|
||||||
$rservers = [{'remote_type'=>'udp', 'server'=>'master', 'port'=>'514'},],
|
$rservers = [{'remote_type'=>'udp', 'server'=>'master', 'port'=>'514'},],
|
||||||
$port = '514',
|
$port = '514',
|
||||||
$proto = 'udp',
|
$proto = 'udp',
|
||||||
$show_timezone = false,
|
$show_timezone = false,
|
||||||
$virtual = false,
|
$virtual = false,
|
||||||
$syslog_log_facility_murano = 'LOG_LOCAL0',
|
$rabbit_log_level = 'NOTICE',
|
||||||
$syslog_log_facility_glance = 'LOG_LOCAL2',
|
$production = 'prod',
|
||||||
$syslog_log_facility_cinder = 'LOG_LOCAL3',
|
$escapenewline = false,
|
||||||
$syslog_log_facility_neutron = 'LOG_LOCAL4',
|
|
||||||
$syslog_log_facility_nova = 'LOG_LOCAL6',
|
|
||||||
$syslog_log_facility_keystone = 'LOG_LOCAL7',
|
|
||||||
$syslog_log_facility_heat = 'LOG_LOCAL0',
|
|
||||||
$syslog_log_facility_sahara = 'LOG_LOCAL0',
|
|
||||||
$rabbit_log_level = 'NOTICE',
|
|
||||||
$debug = false,
|
|
||||||
$production = 'prod',
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
validate_re($proto, 'tcp|udp|both')
|
validate_re($proto, 'tcp|udp|both')
|
||||||
validate_re($role, 'client|server')
|
validate_re($role, 'client|server')
|
||||||
validate_re($rotation, 'daily|weekly|monthly|yearly')
|
validate_re($rotation, 'daily|weekly|monthly|yearly')
|
||||||
|
|
||||||
if $role == 'client' {
|
# Fix for udp checksums should be applied if running on virtual node
|
||||||
class { "::rsyslog::client":
|
if $virtual {
|
||||||
high_precision_timestamps => $show_timezone,
|
class { "openstack::checksum_udp" : port => $port }
|
||||||
log_remote => $log_remote,
|
|
||||||
log_local => $log_local,
|
|
||||||
log_auth_local => $log_auth_local,
|
|
||||||
rservers => $rservers,
|
|
||||||
virtual => $virtual,
|
|
||||||
syslog_log_facility_glance => $syslog_log_facility_glance,
|
|
||||||
syslog_log_facility_cinder => $syslog_log_facility_cinder,
|
|
||||||
syslog_log_facility_neutron => $syslog_log_facility_neutron,
|
|
||||||
syslog_log_facility_nova => $syslog_log_facility_nova,
|
|
||||||
syslog_log_facility_keystone => $syslog_log_facility_keystone,
|
|
||||||
syslog_log_facility_heat => $syslog_log_facility_heat,
|
|
||||||
syslog_log_facility_sahara => $syslog_log_facility_sahara,
|
|
||||||
log_level => $rabbit_log_level,
|
|
||||||
debug => $debug,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else { # server
|
include ::rsyslog::params
|
||||||
|
|
||||||
if $proto == 'both' {
|
# Configure syslog roles
|
||||||
firewall { "$port udp rsyslog":
|
if $role == 'client' {
|
||||||
port => $port,
|
|
||||||
proto => 'udp',
|
if $rservers == undef {
|
||||||
action => 'accept',
|
$rservers_real = [{'remote_type'=>$remote_type, 'server'=>$server, 'port'=>$port}]
|
||||||
}
|
}
|
||||||
firewall { "$port tcp rsyslog":
|
else {
|
||||||
port => $port,
|
$rservers_real = $rservers
|
||||||
proto => 'tcp',
|
|
||||||
action => 'accept',
|
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
firewall { "$port $proto rsyslog":
|
# Configure logging templates for rsyslog client side
|
||||||
port => $port,
|
# Rabbitmq does not support syslogging, use imfile
|
||||||
proto => $proto,
|
::rsyslog::imfile { "04-rabbitmq" :
|
||||||
action => 'accept',
|
file_name => "/var/log/rabbitmq/rabbit@${hostname}.log",
|
||||||
|
file_tag => "rabbitmq",
|
||||||
|
file_facility => "syslog",
|
||||||
|
file_severity => $rabbit_log_level,
|
||||||
|
notify => Class["::rsyslog::service"],
|
||||||
|
}
|
||||||
|
|
||||||
|
::rsyslog::imfile { "04-rabbitmq-sasl" :
|
||||||
|
file_name => "/var/log/rabbitmq/rabbit@${hostname}-sasl.log",
|
||||||
|
file_tag => "rabbitmq-sasl",
|
||||||
|
file_facility => "syslog",
|
||||||
|
file_severity => $rabbit_log_level,
|
||||||
|
notify => Class["::rsyslog::service"],
|
||||||
|
}
|
||||||
|
|
||||||
|
::rsyslog::imfile { "04-rabbitmq-startup_err" :
|
||||||
|
file_name => "/var/log/rabbitmq/startup_err",
|
||||||
|
file_tag => "rabbitmq-startup_err",
|
||||||
|
file_facility => "syslog",
|
||||||
|
file_severity => "ERROR",
|
||||||
|
notify => Class["::rsyslog::service"],
|
||||||
|
}
|
||||||
|
|
||||||
|
::rsyslog::imfile { "04-rabbitmq-shutdown_err" :
|
||||||
|
file_name => "/var/log/rabbitmq/shutdown_err",
|
||||||
|
file_tag => "rabbitmq-shutdown_err",
|
||||||
|
file_facility => "syslog",
|
||||||
|
file_severity => "ERROR",
|
||||||
|
notify => Class["::rsyslog::service"],
|
||||||
|
}
|
||||||
|
|
||||||
|
# mco does not support syslog also, hence use imfile
|
||||||
|
::rsyslog::imfile { "61-mco_agent_debug" :
|
||||||
|
file_name => "/var/log/mcollective.log",
|
||||||
|
file_tag => "mcollective",
|
||||||
|
file_facility => "daemon",
|
||||||
|
file_severity => "DEBUG",
|
||||||
|
notify => Class["::rsyslog::service"],
|
||||||
|
}
|
||||||
|
|
||||||
|
# Set access and notifications for rsyslog client
|
||||||
|
File {
|
||||||
|
owner => root,
|
||||||
|
group => $::rsyslog::params::run_group,
|
||||||
|
mode => 0640,
|
||||||
|
notify => Class["::rsyslog::service"],
|
||||||
|
}
|
||||||
|
|
||||||
|
# OS syslog configs for rsyslog client
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}10-nova.conf":
|
||||||
|
ensure => present,
|
||||||
|
content => template("${module_name}/10-nova.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}20-keystone.conf":
|
||||||
|
ensure => present,
|
||||||
|
content => template("${module_name}/20-keystone.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}/30-cinder.conf":
|
||||||
|
ensure => present,
|
||||||
|
content => template("${module_name}/30-cinder.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}40-glance.conf":
|
||||||
|
ensure => present,
|
||||||
|
content => template("${module_name}/40-glance.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}50-neutron.conf":
|
||||||
|
ensure => present,
|
||||||
|
content => template("${module_name}/50-neutron.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}51-ceilometer.conf":
|
||||||
|
ensure => present,
|
||||||
|
content => template("${module_name}/51-ceilometer.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}53-murano.conf":
|
||||||
|
ensure => present,
|
||||||
|
content => template("${module_name}/53-murano.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}54-heat.conf":
|
||||||
|
ensure => present,
|
||||||
|
content => template("${module_name}/54-heat.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}52-sahara.conf":
|
||||||
|
ensure => present,
|
||||||
|
content => template("${module_name}/52-sahara.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}02-ha.conf":
|
||||||
|
ensure => present,
|
||||||
|
content => template("${module_name}/02-ha.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}03-dashboard.conf":
|
||||||
|
ensure => present,
|
||||||
|
content => template("${module_name}/03-dashboard.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}04-mysql.conf":
|
||||||
|
ensure => present,
|
||||||
|
content => template("${module_name}/04-mysql.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}60-puppet-apply.conf":
|
||||||
|
content => template("${module_name}/60-puppet-apply.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}/61-mco-nailgun-agent.conf":
|
||||||
|
content => template("${module_name}/61-mco-nailgun-agent.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
# Custom settings for rsyslog client to define remote logging and local options
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}90-local.conf":
|
||||||
|
content => template("${module_name}/90-local.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
file { "${::rsyslog::params::rsyslog_d}00-remote.conf":
|
||||||
|
content => template("${module_name}/00-remote.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
class { "::rsyslog::client":
|
||||||
|
log_remote => $log_remote,
|
||||||
|
log_local => $log_local,
|
||||||
|
log_auth_local => $log_auth_local,
|
||||||
|
escapenewline => $escapenewline,
|
||||||
|
}
|
||||||
|
|
||||||
|
} else { # server
|
||||||
|
|
||||||
|
if $proto == 'both' {
|
||||||
|
firewall { "$port udp rsyslog":
|
||||||
|
port => $port,
|
||||||
|
proto => 'udp',
|
||||||
|
action => 'accept',
|
||||||
|
}
|
||||||
|
firewall { "$port tcp rsyslog":
|
||||||
|
port => $port,
|
||||||
|
proto => 'tcp',
|
||||||
|
action => 'accept',
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
firewall { "$port $proto rsyslog":
|
||||||
|
port => $port,
|
||||||
|
proto => $proto,
|
||||||
|
action => 'accept',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if $production =~ /docker/ {
|
||||||
|
$enable_tcp = false
|
||||||
|
$enable_udp = false
|
||||||
|
} else {
|
||||||
|
$enable_tcp = $proto ? { 'tcp' => true, 'both' => true, default => false }
|
||||||
|
$enable_udp = $proto ? { 'udp' => true, 'both' => true, default => true }
|
||||||
|
}
|
||||||
|
|
||||||
|
# Fuel specific config for logging parse formats used for /var/log/remote
|
||||||
|
$logconf = "${::rsyslog::params::rsyslog_d}30-remote-log.conf"
|
||||||
|
file { $logconf :
|
||||||
|
content => template("${module_name}/30-server-remote-log.conf.erb"),
|
||||||
|
}
|
||||||
|
|
||||||
|
class {"::rsyslog::server":
|
||||||
|
enable_tcp => $enable_tcp,
|
||||||
|
enable_udp => $enable_udp,
|
||||||
|
server_dir => '/var/log/',
|
||||||
|
high_precision_timestamps => $show_timezone,
|
||||||
|
port => $port,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if $production =~ /docker/ {
|
# Configure log rotation
|
||||||
$enable_tcp = false
|
|
||||||
$enable_udp = false
|
|
||||||
} else {
|
|
||||||
$enable_tcp = $proto ? { 'tcp' => true, 'both' => true, default => false }
|
|
||||||
$enable_udp = $proto ? { 'udp' => true, 'both' => true, default => true }
|
|
||||||
}
|
|
||||||
|
|
||||||
class {"::rsyslog::server":
|
|
||||||
enable_tcp => $enable_tcp,
|
|
||||||
enable_udp => $enable_udp,
|
|
||||||
server_dir => '/var/log/',
|
|
||||||
port => $port,
|
|
||||||
high_precision_timestamps => $show_timezone,
|
|
||||||
virtual => $virtual,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
class {"::openstack::logrotate":
|
class {"::openstack::logrotate":
|
||||||
role => $role,
|
role => $role,
|
||||||
rotation => $rotation,
|
rotation => $rotation,
|
||||||
keep => $keep,
|
keep => $keep,
|
||||||
limitsize => $limitsize,
|
limitsize => $limitsize,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Deprecated stuff handling section
|
||||||
|
# Use this section to ensure the absence of the deprecated config
|
||||||
|
# options for an Openstack services, or any other custom for Fuel
|
||||||
|
# changes what should be removed forcibly.
|
||||||
|
# (only if it couldn't be done in the synced upstream modules as well)
|
||||||
|
|
||||||
|
# Ensure all OS services logging reconfiguration for deleted log_configs
|
||||||
|
# (log_config was deprecated and should be removed from existing configs)
|
||||||
|
Ceilometer_config <| title == 'DEFAULT/log_config' |> { ensure => absent }
|
||||||
|
Cinder_config <| title == 'DEFAULT/log_config' |> { ensure => absent }
|
||||||
|
Glance_api_config <| title == 'DEFAULT/log_config' |> { ensure => absent }
|
||||||
|
Glance_registry_config <| title == 'DEFAULT/log_config' |> { ensure => absent }
|
||||||
|
Heat_config <| title == 'DEFAULT/log_config' |> { ensure => absent }
|
||||||
|
Keystone_config <| title == 'DEFAULT/log_config' |> { ensure => absent }
|
||||||
|
Neutron_dhcp_agent_config <| title == 'DEFAULT/log_config' |> { ensure => absent }
|
||||||
|
Neutron_l3_agent_config <| title == 'DEFAULT/log_config' |> { ensure => absent }
|
||||||
|
Neutron_metadata_agent_config <| title == 'DEFAULT/log_config' |> { ensure => absent }
|
||||||
|
Neutron_config <| title == 'DEFAULT/log_config' |> { ensure => absent }
|
||||||
|
Nova_config <| title == 'DEFAULT/log_config' |> { ensure => absent }
|
||||||
|
Sahara_config <| title == 'DEFAULT/log_config' |> { ensure => absent }
|
||||||
|
Murano_config <| title == 'DEFAULT/log_config' |> { ensure => absent }
|
||||||
|
|
||||||
|
#TODO(bogdando) if 4.1.1 -> 5.0 upgrade will be supported later
|
||||||
|
# remove all existing rsyslog::imfile templates for Openstack
|
||||||
|
# and notify rsyslog service
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,6 @@
|
||||||
# [use_syslog] Rather or not service should log to syslog. Optional.
|
# [use_syslog] Rather or not service should log to syslog. Optional.
|
||||||
# [syslog_log_facility] Facility for syslog, if used. Optional. Note: duplicating conf option
|
# [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
|
# 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.
|
|
||||||
|
|
||||||
class openstack::neutron_router (
|
class openstack::neutron_router (
|
||||||
$verbose = false,
|
$verbose = false,
|
||||||
|
@ -14,7 +13,6 @@ class openstack::neutron_router (
|
||||||
$neutron_server = true,
|
$neutron_server = true,
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
$syslog_log_facility = 'LOG_LOCAL4',
|
$syslog_log_facility = 'LOG_LOCAL4',
|
||||||
$syslog_log_level = 'WARNING',
|
|
||||||
$ha_mode = false,
|
$ha_mode = false,
|
||||||
$service_provider = 'generic',
|
$service_provider = 'generic',
|
||||||
#$internal_address = $::ipaddress_br_mgmt,
|
#$internal_address = $::ipaddress_br_mgmt,
|
||||||
|
@ -28,7 +26,6 @@ class openstack::neutron_router (
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_facility => $syslog_log_facility,
|
syslog_log_facility => $syslog_log_facility,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
server_ha_mode => $ha_mode,
|
server_ha_mode => $ha_mode,
|
||||||
}
|
}
|
||||||
#todo: add neutron::server here (into IF)
|
#todo: add neutron::server here (into IF)
|
||||||
|
|
|
@ -31,71 +31,70 @@ class openstack::nova::controller (
|
||||||
# Nova Required
|
# Nova Required
|
||||||
$nova_user_password,
|
$nova_user_password,
|
||||||
$nova_db_password,
|
$nova_db_password,
|
||||||
$primary_controller = false,
|
$primary_controller = false,
|
||||||
# Network
|
# Network
|
||||||
$fixed_range = '10.0.0.0/24',
|
$fixed_range = '10.0.0.0/24',
|
||||||
$floating_range = false,
|
$floating_range = false,
|
||||||
$internal_address,
|
$internal_address,
|
||||||
$admin_address,
|
$admin_address,
|
||||||
$service_endpoint = '127.0.0.1',
|
$service_endpoint = '127.0.0.1',
|
||||||
$auto_assign_floating_ip = false,
|
$auto_assign_floating_ip = false,
|
||||||
$create_networks = true,
|
$create_networks = true,
|
||||||
$num_networks = 1,
|
$num_networks = 1,
|
||||||
$network_size = 255,
|
$network_size = 255,
|
||||||
$multi_host = false,
|
$multi_host = false,
|
||||||
$network_config = {},
|
$network_config = {},
|
||||||
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||||
$nova_quota_driver = 'nova.quota.NoopQuotaDriver',
|
$nova_quota_driver = 'nova.quota.NoopQuotaDriver',
|
||||||
# Quantum
|
# Quantum
|
||||||
$quantum = false,
|
$quantum = false,
|
||||||
$quantum_config = {},
|
$quantum_config = {},
|
||||||
$quantum_network_node = false,
|
$quantum_network_node = false,
|
||||||
$quantum_netnode_on_cnt = false,
|
$quantum_netnode_on_cnt = false,
|
||||||
$segment_range = '1:4094',
|
$segment_range = '1:4094',
|
||||||
$tenant_network_type = 'gre',
|
$tenant_network_type = 'gre',
|
||||||
# Nova
|
# Nova
|
||||||
$nova_db_user = 'nova',
|
$nova_db_user = 'nova',
|
||||||
$nova_db_dbname = 'nova',
|
$nova_db_dbname = 'nova',
|
||||||
# RPC
|
# RPC
|
||||||
$queue_provider = 'rabbitmq',
|
$queue_provider = 'rabbitmq',
|
||||||
$amqp_hosts = ['127.0.0.1'],
|
$amqp_hosts = ['127.0.0.1'],
|
||||||
$amqp_user = 'nova',
|
$amqp_user = 'nova',
|
||||||
$amqp_password = 'rabbit_pw',
|
$amqp_password = 'rabbit_pw',
|
||||||
$rabbit_ha_queues = false,
|
$rabbit_ha_queues = false,
|
||||||
$rabbitmq_bind_ip_address = 'UNSET',
|
$rabbitmq_bind_ip_address = 'UNSET',
|
||||||
$rabbitmq_bind_port = '5672',
|
$rabbitmq_bind_port = '5672',
|
||||||
$rabbitmq_cluster_nodes = [],
|
$rabbitmq_cluster_nodes = [],
|
||||||
$rabbit_cluster = false,
|
$rabbit_cluster = false,
|
||||||
# Database
|
# Database
|
||||||
$db_type = 'mysql',
|
$db_type = 'mysql',
|
||||||
# Glance
|
# Glance
|
||||||
$glance_api_servers = undef,
|
$glance_api_servers = undef,
|
||||||
# VNC
|
# VNC
|
||||||
$vnc_enabled = true,
|
$vnc_enabled = true,
|
||||||
# General
|
# General
|
||||||
$keystone_host = '127.0.0.1',
|
$keystone_host = '127.0.0.1',
|
||||||
$verbose = false,
|
$verbose = false,
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$enabled = true,
|
$enabled = true,
|
||||||
$exported_resources = true,
|
$exported_resources = true,
|
||||||
$nameservers = undef,
|
$nameservers = undef,
|
||||||
$ensure_package = present,
|
$ensure_package = present,
|
||||||
$enabled_apis = 'ec2,osapi_compute',
|
$enabled_apis = 'ec2,osapi_compute',
|
||||||
$api_bind_address = '0.0.0.0',
|
$api_bind_address = '0.0.0.0',
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
$syslog_log_facility = 'LOG_LOCAL6',
|
$syslog_log_facility = 'LOG_LOCAL6',
|
||||||
$syslog_log_facility_neutron = 'LOG_LOCAL4',
|
$syslog_log_facility_neutron = 'LOG_LOCAL4',
|
||||||
$syslog_log_level = 'WARNING',
|
$nova_rate_limits = undef,
|
||||||
$nova_rate_limits = undef,
|
$nova_report_interval = '10',
|
||||||
$nova_report_interval = '10',
|
$nova_service_down_time = '60',
|
||||||
$nova_service_down_time = '60',
|
$cinder = true,
|
||||||
$cinder = true,
|
|
||||||
# SQLAlchemy backend
|
# SQLAlchemy backend
|
||||||
$idle_timeout = '3600',
|
$idle_timeout = '3600',
|
||||||
$max_pool_size = '10',
|
$max_pool_size = '10',
|
||||||
$max_overflow = '30',
|
$max_overflow = '30',
|
||||||
$max_retries = '-1',
|
$max_retries = '-1',
|
||||||
$novnc_address = '127.0.0.1'
|
$novnc_address = '127.0.0.1'
|
||||||
) {
|
) {
|
||||||
|
|
||||||
# Configure the db string
|
# Configure the db string
|
||||||
|
@ -152,7 +151,6 @@ class openstack::nova::controller (
|
||||||
ensure_package => $ensure_package,
|
ensure_package => $ensure_package,
|
||||||
api_bind_address => $api_bind_address,
|
api_bind_address => $api_bind_address,
|
||||||
syslog_log_facility => $syslog_log_facility,
|
syslog_log_facility => $syslog_log_facility,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
max_retries => $max_retries,
|
max_retries => $max_retries,
|
||||||
max_pool_size => $max_pool_size,
|
max_pool_size => $max_pool_size,
|
||||||
|
@ -227,7 +225,6 @@ class openstack::nova::controller (
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_facility => $syslog_log_facility_neutron,
|
syslog_log_facility => $syslog_log_facility_neutron,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
server_ha_mode => $ha_mode,
|
server_ha_mode => $ha_mode,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
#
|
#
|
||||||
class openstack::swift::proxy (
|
class openstack::swift::proxy (
|
||||||
$swift_user_password = 'swift_pass',
|
$swift_user_password = 'swift_pass',
|
||||||
$swift_hash_suffix = 'swift_secret',
|
$swift_hash_suffix = 'swift_secret',
|
||||||
$swift_local_net_ip = $::ipaddress_eth0,
|
$swift_local_net_ip = $::ipaddress_eth0,
|
||||||
$ring_part_power = 18,
|
$ring_part_power = 18,
|
||||||
$ring_replicas = 3,
|
$ring_replicas = 3,
|
||||||
$ring_min_part_hours = 1,
|
$ring_min_part_hours = 1,
|
||||||
$proxy_pipeline = [
|
$proxy_pipeline = [
|
||||||
'catch_errors',
|
'catch_errors',
|
||||||
'healthcheck',
|
'healthcheck',
|
||||||
'cache',
|
'cache',
|
||||||
|
@ -16,30 +16,29 @@ class openstack::swift::proxy (
|
||||||
'authtoken',
|
'authtoken',
|
||||||
'keystone',
|
'keystone',
|
||||||
'proxy-server'],
|
'proxy-server'],
|
||||||
$proxy_workers = $::processorcount,
|
$proxy_workers = $::processorcount,
|
||||||
$proxy_port = '8080',
|
$proxy_port = '8080',
|
||||||
$proxy_allow_account_management = true,
|
$proxy_allow_account_management = true,
|
||||||
$proxy_account_autocreate = true,
|
$proxy_account_autocreate = true,
|
||||||
$ratelimit_clock_accuracy = 1000,
|
$ratelimit_clock_accuracy = 1000,
|
||||||
$ratelimit_max_sleep_time_seconds = 60,
|
$ratelimit_max_sleep_time_seconds = 60,
|
||||||
$ratelimit_log_sleep_time_seconds = 0,
|
$ratelimit_log_sleep_time_seconds = 0,
|
||||||
$ratelimit_rate_buffer_seconds = 5,
|
$ratelimit_rate_buffer_seconds = 5,
|
||||||
$ratelimit_account_ratelimit = 0,
|
$ratelimit_account_ratelimit = 0,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$controller_node_address = '10.0.0.1',
|
$controller_node_address = '10.0.0.1',
|
||||||
$memcached = true,
|
$memcached = true,
|
||||||
$swift_proxies = {
|
$swift_proxies = {
|
||||||
'127.0.0.1' => '127.0.0.1'
|
'127.0.0.1' => '127.0.0.1'
|
||||||
}
|
}
|
||||||
,
|
,
|
||||||
$primary_proxy = false,
|
$primary_proxy = false,
|
||||||
$swift_devices = undef,
|
$swift_devices = undef,
|
||||||
$master_swift_proxy_ip = undef,
|
$master_swift_proxy_ip = undef,
|
||||||
$collect_exported = false,
|
$collect_exported = false,
|
||||||
$rings = ['account', 'object', 'container'],
|
$rings = ['account', 'object', 'container'],
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$verbose = true,
|
$verbose = true,
|
||||||
$syslog_log_level = 'WARNING',
|
|
||||||
) {
|
) {
|
||||||
if !defined(Class['swift']) {
|
if !defined(Class['swift']) {
|
||||||
class { 'swift':
|
class { 'swift':
|
||||||
|
@ -62,7 +61,6 @@ class openstack::swift::proxy (
|
||||||
package_ensure => $package_ensure,
|
package_ensure => $package_ensure,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# configure all of the middlewares
|
# configure all of the middlewares
|
||||||
|
|
|
@ -1,51 +1,50 @@
|
||||||
#
|
#
|
||||||
class openstack::swift::storage_node (
|
class openstack::swift::storage_node (
|
||||||
$swift_zone,
|
$swift_zone,
|
||||||
$swift_hash_suffix = 'swift_secret',
|
$swift_hash_suffix = 'swift_secret',
|
||||||
$swift_local_net_ip = $::ipaddress_eth0,
|
$swift_local_net_ip = $::ipaddress_eth0,
|
||||||
$storage_type = 'loopback',
|
$storage_type = 'loopback',
|
||||||
$storage_base_dir = '/srv/loopback-device',
|
$storage_base_dir = '/srv/loopback-device',
|
||||||
$storage_mnt_base_dir = '/srv/node',
|
$storage_mnt_base_dir = '/srv/node',
|
||||||
$storage_devices = [
|
$storage_devices = [
|
||||||
'1',
|
'1',
|
||||||
'2'],
|
'2'],
|
||||||
$storage_weight = 1,
|
$storage_weight = 1,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$loopback_size = '1048756',
|
$loopback_size = '1048756',
|
||||||
$master_swift_proxy_ip,
|
$master_swift_proxy_ip,
|
||||||
$rings = [
|
$rings = [
|
||||||
'account',
|
'account',
|
||||||
'object',
|
'object',
|
||||||
'container'],
|
'container'],
|
||||||
$sync_rings = true,
|
$sync_rings = true,
|
||||||
# if the cinder management components should be installed
|
# if the cinder management components should be installed
|
||||||
$cinder = true,
|
$cinder = true,
|
||||||
$manage_volumes = false,
|
$manage_volumes = false,
|
||||||
$nv_physical_volume = undef,
|
$nv_physical_volume = undef,
|
||||||
$cinder_volume_group = 'cinder-volumes',
|
$cinder_volume_group = 'cinder-volumes',
|
||||||
$cinder_user_password = 'cinder_user_pass',
|
$cinder_user_password = 'cinder_user_pass',
|
||||||
$cinder_db_password = 'cinder_db_pass',
|
$cinder_db_password = 'cinder_db_pass',
|
||||||
$cinder_db_user = 'cinder',
|
$cinder_db_user = 'cinder',
|
||||||
$cinder_db_dbname = 'cinder',
|
$cinder_db_dbname = 'cinder',
|
||||||
$cinder_iscsi_bind_addr = false,
|
$cinder_iscsi_bind_addr = false,
|
||||||
$cinder_rate_limits = false,
|
$cinder_rate_limits = false,
|
||||||
$db_host = '127.0.0.1',
|
$db_host = '127.0.0.1',
|
||||||
$service_endpoint = '127.0.0.1',
|
$service_endpoint = '127.0.0.1',
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
$syslog_log_facility_cinder = 'LOG_LOCAL3',
|
$syslog_log_facility_cinder = 'LOG_LOCAL3',
|
||||||
$syslog_log_level = 'WARNING',
|
$debug = false,
|
||||||
$debug = false,
|
$verbose = true,
|
||||||
$verbose = true,
|
|
||||||
# Rabbit details necessary for cinder
|
# Rabbit details necessary for cinder
|
||||||
$rabbit_nodes = false,
|
$rabbit_nodes = false,
|
||||||
$rabbit_password = 'rabbit_pw',
|
$rabbit_password = 'rabbit_pw',
|
||||||
$rabbit_host = false,
|
$rabbit_host = false,
|
||||||
$rabbit_user = 'nova',
|
$rabbit_user = 'nova',
|
||||||
$rabbit_ha_virtual_ip = false,
|
$rabbit_ha_virtual_ip = false,
|
||||||
$queue_provider = 'rabbitmq',
|
$queue_provider = 'rabbitmq',
|
||||||
$qpid_password = 'qpid_pw',
|
$qpid_password = 'qpid_pw',
|
||||||
$qpid_user = 'nova',
|
$qpid_user = 'nova',
|
||||||
$qpid_nodes = ['127.0.0.1'],
|
$qpid_nodes = ['127.0.0.1'],
|
||||||
) {
|
) {
|
||||||
if !defined(Class['swift']) {
|
if !defined(Class['swift']) {
|
||||||
class { 'swift':
|
class { 'swift':
|
||||||
|
@ -72,7 +71,6 @@ class openstack::swift::storage_node (
|
||||||
swift_zone => $swift_zone,
|
swift_zone => $swift_zone,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
validate_string($master_swift_proxy_ip)
|
validate_string($master_swift_proxy_ip)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# file is managed by puppet
|
# file is managed by puppet
|
||||||
#
|
#
|
||||||
<% if scope.lookupvar('rsyslog::client::log_remote') -%>
|
<% if @log_remote -%>
|
||||||
# Log to remote syslog server using <%= scope.lookupvar('rsyslog::client::remote_type') %>
|
# Log to remote syslog server
|
||||||
# Templates
|
# Templates
|
||||||
# RFC3164 emulation with long tags (32+)
|
# RFC3164 emulation with long tags (32+)
|
||||||
$Template RemoteLog, "<%%pri%>%timestamp% %hostname% %syslogtag%%msg:::sp-if-no-1st-sp%%msg%\n"
|
$Template RemoteLog, "<%%pri%>%timestamp% %hostname% %syslogtag%%msg:::sp-if-no-1st-sp%%msg%\n"
|
||||||
|
@ -9,14 +9,16 @@ $Template RemoteLog, "<%%pri%>%timestamp% %hostname% %syslogtag%%msg:::sp-if-no-
|
||||||
# Note: don't use %app-name% cuz it would be empty for some cases
|
# Note: don't use %app-name% cuz it would be empty for some cases
|
||||||
$ActionFileDefaultTemplate RemoteLog
|
$ActionFileDefaultTemplate RemoteLog
|
||||||
|
|
||||||
<% scope.lookupvar('rsyslog::client::rservers_real').each do |rserver| -%>
|
<% @rservers_real.each do |rserver| -%>
|
||||||
<% if ! ['localhost','127.0.0.1','::1'].include?(rserver['server']) -%>
|
<% if ! ['localhost','127.0.0.1','::1'].include?(rserver['server']) -%>
|
||||||
<% if rserver['remote_type'] == 'tcp' -%>
|
<% if rserver['remote_type'] == 'tcp' -%>
|
||||||
# Send messages we receive to master node via tcp
|
# Send messages we receive to master node via tcp
|
||||||
*.* @@<%= rserver['server']-%>:<%= rserver['port'] -%>;RemoteLog
|
# Use an octet-counted framing (understood for rsyslog only) to ensure correct multiline messages delivery
|
||||||
|
*.* @@(o)<%= rserver['server']-%>:<%= rserver['port'] -%>;RemoteLog
|
||||||
<% else -%>
|
<% else -%>
|
||||||
# Send messages we receive to master node via udp
|
# Send messages we receive to master node via udp
|
||||||
*.* @<%= rserver['server'] -%>:<%= rserver['port'] -%>;RemoteLog
|
# Use an octet-counted framing (understood for rsyslog only) to ensure correct multiline messages delivery
|
||||||
|
*.* @(o)<%= rserver['server'] -%>:<%= rserver['port'] -%>;RemoteLog
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
||||||
<% end -%>
|
<% end -%>
|
|
@ -1,6 +1,4 @@
|
||||||
# managed by puppet
|
# managed by puppet
|
||||||
|
|
||||||
<%= @syslog_log_facility_nova_matched %>.* -/var/log/nova-all.log
|
|
||||||
& ~
|
|
||||||
:syslogtag, contains, "nova" -/var/log/nova-all.log
|
:syslogtag, contains, "nova" -/var/log/nova-all.log
|
||||||
& ~
|
& ~
|
|
@ -1,6 +1,4 @@
|
||||||
# managed by puppet
|
# managed by puppet
|
||||||
|
|
||||||
<%= @syslog_log_facility_keystone_matched %>.* -/var/log/keystone-all.log
|
|
||||||
& ~
|
|
||||||
:syslogtag, contains, "keystone" -/var/log/keystone-all.log
|
:syslogtag, contains, "keystone" -/var/log/keystone-all.log
|
||||||
& ~
|
& ~
|
|
@ -1,6 +1,4 @@
|
||||||
# managed by puppet
|
# managed by puppet
|
||||||
|
|
||||||
<%= @syslog_log_facility_cinder_matched %>.* -/var/log/cinder-all.log
|
|
||||||
& ~
|
|
||||||
:syslogtag, contains, "cinder" -/var/log/cinder-all.log
|
:syslogtag, contains, "cinder" -/var/log/cinder-all.log
|
||||||
& ~
|
& ~
|
|
@ -1,7 +1,7 @@
|
||||||
# file is managed by puppet
|
# file is managed by puppet
|
||||||
#
|
#
|
||||||
# remote logs parsing based on syslogtag, uses predefined Fuel templates
|
# remote logs parsing based on syslogtag, uses predefined Fuel templates
|
||||||
<% if scope.lookupvar('rsyslog::server::high_precision_timestamps') -%>
|
<% if @show_timezone -%>
|
||||||
# Use high precision timestamps (date-rfc3339, 2010-12-05T02:21:41.889482+01:00)
|
# Use high precision timestamps (date-rfc3339, 2010-12-05T02:21:41.889482+01:00)
|
||||||
$Template RemoteLog, "%timegenerated:1:32:date-rfc3339% %syslogseverity-text%: %msg%\n"
|
$Template RemoteLog, "%timegenerated:1:32:date-rfc3339% %syslogseverity-text%: %msg%\n"
|
||||||
<% else -%>
|
<% else -%>
|
||||||
|
@ -12,14 +12,14 @@ $ActionFileDefaultTemplate RemoteLog
|
||||||
|
|
||||||
# Would match 'kernel:' -> 'kernel' ; 'rsyslogd[12345]:' -> 'rsyslogd' ; '<180>(nova.api.wsgi):' -> 'nova.api.wsgi' ; 'install/anaconda' -> 'install/anaconda'
|
# Would match 'kernel:' -> 'kernel' ; 'rsyslogd[12345]:' -> 'rsyslogd' ; '<180>(nova.api.wsgi):' -> 'nova.api.wsgi' ; 'install/anaconda' -> 'install/anaconda'
|
||||||
$template RemoteLogFile, "/var/log/remote/%FROMHOST%/%syslogtag:R,ERE,1,DFLT:([A-Za-z][A-Za-z0-9_./-]*)--end%.log"
|
$template RemoteLogFile, "/var/log/remote/%FROMHOST%/%syslogtag:R,ERE,1,DFLT:([A-Za-z][A-Za-z0-9_./-]*)--end%.log"
|
||||||
|
# Hardcode destination for puppet logs
|
||||||
$template PuppetApplyLogFile, "/var/log/remote/%FROMHOST%/puppet-apply.log"
|
$template PuppetApplyLogFile, "/var/log/remote/%FROMHOST%/puppet-apply.log"
|
||||||
|
|
||||||
|
# Parse puppet logs
|
||||||
:syslogtag, regex, "puppet-user" ?PuppetApplyLogFile;RemoteLog
|
:syslogtag, regex, "puppet-user" ?PuppetApplyLogFile;RemoteLog
|
||||||
:syslogtag, regex, "puppet-user" ~
|
&~
|
||||||
|
|
||||||
:syslogtag, regex, "puppet-error" ?PuppetApplyLogFile;RemoteLog
|
:syslogtag, regex, "puppet-error" ?PuppetApplyLogFile;RemoteLog
|
||||||
:syslogtag, regex, "puppet-error" ~
|
&~
|
||||||
|
|
||||||
:FROMHOST, regex, "^[1-9]" ?RemoteLogFile;RemoteLog
|
:FROMHOST, regex, "^[1-9]" ?RemoteLogFile;RemoteLog
|
||||||
# Drop message here and do not forward
|
&~
|
||||||
:FROMHOST, regex, "^[1-9]" ~
|
|
|
@ -1,6 +1,4 @@
|
||||||
# managed by puppet
|
# managed by puppet
|
||||||
|
|
||||||
<%= @syslog_log_facility_glance_matched %>.* -/var/log/glance-all.log
|
|
||||||
& ~
|
|
||||||
:syslogtag, contains, "glance" -/var/log/glance-all.log
|
:syslogtag, contains, "glance" -/var/log/glance-all.log
|
||||||
& ~
|
& ~
|
|
@ -1,6 +1,4 @@
|
||||||
# managed by puppet
|
# managed by puppet
|
||||||
|
|
||||||
<%= @syslog_log_facility_neutron_matched %>.* -/var/log/neutron-all.log
|
|
||||||
& ~
|
|
||||||
:syslogtag, contains, "neutron" -/var/log/neutron-all.log
|
:syslogtag, contains, "neutron" -/var/log/neutron-all.log
|
||||||
& ~
|
& ~
|
|
@ -1,4 +1,4 @@
|
||||||
# managed by puppet
|
# managed by puppet
|
||||||
|
|
||||||
:syslogtag, contains, "ceilometer" -/var/log/ceilometer-all.log
|
:syslogtag, contains, "ceilometer" -/var/log/ceilometer-all.log
|
||||||
:syslogtag, contains, "ceilometer" ~
|
&~
|
|
@ -1,15 +1,15 @@
|
||||||
# file is managed by puppet
|
# file is managed by puppet
|
||||||
#
|
#
|
||||||
|
|
||||||
<% if scope.lookupvar('rsyslog::client::log_auth_local') or scope.lookupvar('rsyslog::client::log_local') -%>
|
<% if @log_auth_local or @log_local -%>
|
||||||
# Log auth messages locally
|
# Log auth messages locally
|
||||||
auth,authpriv.* /var/log/auth.log
|
auth,authpriv.* /var/log/auth.log
|
||||||
<% end -%>
|
<% end -%>
|
||||||
|
|
||||||
<% if scope.lookupvar('rsyslog::client::log_local') -%>
|
<% if @log_local -%>
|
||||||
# First some standard log files. Log by facility.
|
# First some standard log files. Log by facility.
|
||||||
#
|
#
|
||||||
# Skip duplicates - all common debug, info, notice, warn go to
|
# Skip duplicates - all common debug, info, notice, warn go to
|
||||||
# debug & messages files respectively; others should go to syslog
|
# debug & messages files respectively; others should go to syslog
|
||||||
#
|
#
|
||||||
*.error;auth,authpriv.none -/var/log/syslog
|
*.error;auth,authpriv.none -/var/log/syslog
|
|
@ -86,7 +86,6 @@ if $::fuel_settings['nodes'] {
|
||||||
# Debug would have set DEBUG level and ignore verbose settings, if any.
|
# Debug would have set DEBUG level and ignore verbose settings, if any.
|
||||||
# Verbose would have set INFO level messages
|
# Verbose would have set INFO level messages
|
||||||
# In case of non debug and non verbose - WARNING, default level would have set.
|
# In case of non debug and non verbose - WARNING, default level would have set.
|
||||||
# Note: if syslog on, this default level may be configured (for syslog) with syslog_log_level option.
|
|
||||||
$verbose = true
|
$verbose = true
|
||||||
$debug = $::fuel_settings['debug']
|
$debug = $::fuel_settings['debug']
|
||||||
|
|
||||||
|
@ -97,21 +96,23 @@ $debug = $::fuel_settings['debug']
|
||||||
|
|
||||||
|
|
||||||
### Syslog ###
|
### Syslog ###
|
||||||
|
#TODO(bogdando) move logging options to astute.yaml
|
||||||
# Enable error messages reporting to rsyslog. Rsyslog must be installed in this case.
|
# Enable error messages reporting to rsyslog. Rsyslog must be installed in this case.
|
||||||
$use_syslog = $::fuel_settings['use_syslog'] ? { default=>true }
|
$use_syslog = $::fuel_settings['use_syslog'] ? { default=>true }
|
||||||
# Default log level would have been used, if non verbose and non debug
|
# Syslog facilities for main openstack services
|
||||||
$syslog_log_level = 'ERROR'
|
# should vary (reserved usage)
|
||||||
# Syslog facilities for main openstack services, choose any, may overlap if needed
|
|
||||||
# local0 is reserved for HA provisioning and orchestration services,
|
|
||||||
# local1 is reserved for openstack-dashboard
|
# local1 is reserved for openstack-dashboard
|
||||||
$syslog_log_facility_murano = 'LOG_LOCAL0'
|
$syslog_log_facility_glance = 'LOG_LOCAL2'
|
||||||
$syslog_log_facility_glance = 'LOG_LOCAL2'
|
$syslog_log_facility_cinder = 'LOG_LOCAL3'
|
||||||
$syslog_log_facility_cinder = 'LOG_LOCAL3'
|
$syslog_log_facility_neutron = 'LOG_LOCAL4'
|
||||||
$syslog_log_facility_neutron = 'LOG_LOCAL4'
|
$syslog_log_facility_nova = 'LOG_LOCAL6'
|
||||||
$syslog_log_facility_nova = 'LOG_LOCAL6'
|
$syslog_log_facility_keystone = 'LOG_LOCAL7'
|
||||||
$syslog_log_facility_keystone = 'LOG_LOCAL7'
|
# could be the same
|
||||||
$syslog_log_facility_heat = 'LOG_LOCAL0'
|
# local0 is free for use
|
||||||
$syslog_log_facility_sahara = 'LOG_LOCAL0'
|
$syslog_log_facility_murano = 'LOG_LOCAL0'
|
||||||
|
$syslog_log_facility_heat = 'LOG_LOCAL0'
|
||||||
|
$syslog_log_facility_sahara = 'LOG_LOCAL0'
|
||||||
|
$syslog_log_facility_ceilometer = 'LOG_LOCAL0'
|
||||||
|
|
||||||
$nova_rate_limits = {
|
$nova_rate_limits = {
|
||||||
'POST' => 1000,
|
'POST' => 1000,
|
||||||
|
@ -200,7 +201,7 @@ class os_common {
|
||||||
class { "::openstack::logging":
|
class { "::openstack::logging":
|
||||||
stage => 'first',
|
stage => 'first',
|
||||||
role => 'client',
|
role => 'client',
|
||||||
show_timezone => true,
|
show_timezone => true,
|
||||||
# log both locally include auth, and remote
|
# log both locally include auth, and remote
|
||||||
log_remote => true,
|
log_remote => true,
|
||||||
log_local => true,
|
log_local => true,
|
||||||
|
@ -214,20 +215,8 @@ class os_common {
|
||||||
rservers => $rservers,
|
rservers => $rservers,
|
||||||
# should be true, if client is running at virtual node
|
# should be true, if client is running at virtual node
|
||||||
virtual => str2bool($::is_virtual),
|
virtual => str2bool($::is_virtual),
|
||||||
# facilities
|
# Rabbit doesn't support syslog directly
|
||||||
syslog_log_facility_murano => $syslog_log_facility_murano,
|
rabbit_log_level => 'NOTICE',
|
||||||
syslog_log_facility_sahara => $syslog_log_facility_sahara,
|
|
||||||
syslog_log_facility_glance => $syslog_log_facility_glance,
|
|
||||||
syslog_log_facility_cinder => $syslog_log_facility_cinder,
|
|
||||||
syslog_log_facility_neutron => $syslog_log_facility_neutron,
|
|
||||||
syslog_log_facility_nova => $syslog_log_facility_nova,
|
|
||||||
syslog_log_facility_keystone => $syslog_log_facility_keystone,
|
|
||||||
syslog_log_facility_heat => $syslog_log_facility_heat,
|
|
||||||
# Rabbit doesn't support syslog directly, should be >= syslog_log_level,
|
|
||||||
# otherwise none rabbit's messages would have gone to syslog
|
|
||||||
rabbit_log_level => $syslog_log_level,
|
|
||||||
# debug mode
|
|
||||||
debug => $debug,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -256,90 +256,90 @@ class osnailyfacter::cluster_ha {
|
||||||
class {'osnailyfacter::apache_api_proxy':}
|
class {'osnailyfacter::apache_api_proxy':}
|
||||||
|
|
||||||
class { 'openstack::controller_ha':
|
class { 'openstack::controller_ha':
|
||||||
controllers => $::osnailyfacter::cluster_ha::controllers,
|
controllers => $::osnailyfacter::cluster_ha::controllers,
|
||||||
controller_public_addresses => $::osnailyfacter::cluster_ha::controller_public_addresses,
|
controller_public_addresses => $::osnailyfacter::cluster_ha::controller_public_addresses,
|
||||||
controller_internal_addresses => $::osnailyfacter::cluster_ha::controller_internal_addresses,
|
controller_internal_addresses => $::osnailyfacter::cluster_ha::controller_internal_addresses,
|
||||||
internal_address => $::internal_address,
|
internal_address => $::internal_address,
|
||||||
public_interface => $::public_int,
|
public_interface => $::public_int,
|
||||||
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface']},
|
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface']},
|
||||||
internal_virtual_ip => $::fuel_settings['management_vip'],
|
internal_virtual_ip => $::fuel_settings['management_vip'],
|
||||||
public_virtual_ip => $::fuel_settings['public_vip'],
|
public_virtual_ip => $::fuel_settings['public_vip'],
|
||||||
primary_controller => $::osnailyfacter::cluster_ha::primary_controller,
|
primary_controller => $::osnailyfacter::cluster_ha::primary_controller,
|
||||||
floating_range => $::use_quantum ? { true=>$floating_hash, default=>false},
|
floating_range => $::use_quantum ? { true=>$floating_hash, default=>false},
|
||||||
fixed_range => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_network_range']},
|
fixed_range => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_network_range']},
|
||||||
multi_host => $::osnailyfacter::cluster_ha::multi_host,
|
multi_host => $::osnailyfacter::cluster_ha::multi_host,
|
||||||
network_manager => $::osnailyfacter::cluster_ha::network_manager,
|
network_manager => $::osnailyfacter::cluster_ha::network_manager,
|
||||||
num_networks => $::osnailyfacter::cluster_ha::num_networks,
|
num_networks => $::osnailyfacter::cluster_ha::num_networks,
|
||||||
network_size => $::osnailyfacter::cluster_ha::network_size,
|
network_size => $::osnailyfacter::cluster_ha::network_size,
|
||||||
network_config => $::osnailyfacter::cluster_ha::network_config,
|
network_config => $::osnailyfacter::cluster_ha::network_config,
|
||||||
debug => $::osnailyfacter::cluster_ha::debug,
|
debug => $::osnailyfacter::cluster_ha::debug,
|
||||||
verbose => $::osnailyfacter::cluster_ha::verbose,
|
verbose => $::osnailyfacter::cluster_ha::verbose,
|
||||||
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
||||||
mysql_root_password => $::osnailyfacter::cluster_ha::mysql_hash[root_password],
|
mysql_root_password => $::osnailyfacter::cluster_ha::mysql_hash[root_password],
|
||||||
admin_email => $::osnailyfacter::cluster_ha::access_hash[email],
|
admin_email => $::osnailyfacter::cluster_ha::access_hash[email],
|
||||||
admin_user => $::osnailyfacter::cluster_ha::access_hash[user],
|
admin_user => $::osnailyfacter::cluster_ha::access_hash[user],
|
||||||
admin_password => $::osnailyfacter::cluster_ha::access_hash[password],
|
admin_password => $::osnailyfacter::cluster_ha::access_hash[password],
|
||||||
keystone_db_password => $::osnailyfacter::cluster_ha::keystone_hash[db_password],
|
keystone_db_password => $::osnailyfacter::cluster_ha::keystone_hash[db_password],
|
||||||
keystone_admin_token => $::osnailyfacter::cluster_ha::keystone_hash[admin_token],
|
keystone_admin_token => $::osnailyfacter::cluster_ha::keystone_hash[admin_token],
|
||||||
keystone_admin_tenant => $::osnailyfacter::cluster_ha::access_hash[tenant],
|
keystone_admin_tenant => $::osnailyfacter::cluster_ha::access_hash[tenant],
|
||||||
glance_db_password => $::osnailyfacter::cluster_ha::glance_hash[db_password],
|
glance_db_password => $::osnailyfacter::cluster_ha::glance_hash[db_password],
|
||||||
glance_user_password => $::osnailyfacter::cluster_ha::glance_hash[user_password],
|
glance_user_password => $::osnailyfacter::cluster_ha::glance_hash[user_password],
|
||||||
glance_image_cache_max_size => $::osnailyfacter::cluster_ha::glance_hash[image_cache_max_size],
|
glance_image_cache_max_size => $::osnailyfacter::cluster_ha::glance_hash[image_cache_max_size],
|
||||||
nova_db_password => $::osnailyfacter::cluster_ha::nova_hash[db_password],
|
nova_db_password => $::osnailyfacter::cluster_ha::nova_hash[db_password],
|
||||||
nova_user_password => $::osnailyfacter::cluster_ha::nova_hash[user_password],
|
nova_user_password => $::osnailyfacter::cluster_ha::nova_hash[user_password],
|
||||||
queue_provider => $::queue_provider,
|
queue_provider => $::queue_provider,
|
||||||
amqp_hosts => $::osnailyfacter::cluster_ha::amqp_hosts,
|
amqp_hosts => $::osnailyfacter::cluster_ha::amqp_hosts,
|
||||||
amqp_user => $::osnailyfacter::cluster_ha::rabbit_hash['user'],
|
amqp_user => $::osnailyfacter::cluster_ha::rabbit_hash['user'],
|
||||||
amqp_password => $::osnailyfacter::cluster_ha::rabbit_hash['password'],
|
amqp_password => $::osnailyfacter::cluster_ha::rabbit_hash['password'],
|
||||||
rabbit_ha_queues => $::osnailyfacter::cluster_ha::rabbit_ha_queues,
|
rabbit_ha_queues => $::osnailyfacter::cluster_ha::rabbit_ha_queues,
|
||||||
rabbitmq_bind_ip_address => $::osnailyfacter::cluster_ha::rabbitmq_bind_ip_address,
|
rabbitmq_bind_ip_address => $::osnailyfacter::cluster_ha::rabbitmq_bind_ip_address,
|
||||||
rabbitmq_bind_port => $::osnailyfacter::cluster_ha::rabbitmq_bind_port,
|
rabbitmq_bind_port => $::osnailyfacter::cluster_ha::rabbitmq_bind_port,
|
||||||
rabbitmq_cluster_nodes => $::osnailyfacter::cluster_ha::rabbitmq_cluster_nodes,
|
rabbitmq_cluster_nodes => $::osnailyfacter::cluster_ha::rabbitmq_cluster_nodes,
|
||||||
memcached_servers => $::osnailyfacter::cluster_ha::controller_nodes,
|
memcached_servers => $::osnailyfacter::cluster_ha::controller_nodes,
|
||||||
export_resources => false,
|
export_resources => false,
|
||||||
glance_backend => $::osnailyfacter::cluster_ha::glance_backend,
|
glance_backend => $::osnailyfacter::cluster_ha::glance_backend,
|
||||||
swift_proxies => $::osnailyfacter::cluster_ha::swift_proxies,
|
swift_proxies => $::osnailyfacter::cluster_ha::swift_proxies,
|
||||||
rgw_servers => $::osnailyfacter::cluster_ha::rgw_servers,
|
rgw_servers => $::osnailyfacter::cluster_ha::rgw_servers,
|
||||||
quantum => $::use_quantum,
|
quantum => $::use_quantum,
|
||||||
quantum_config => $::osnailyfacter::cluster_ha::quantum_config,
|
quantum_config => $::osnailyfacter::cluster_ha::quantum_config,
|
||||||
quantum_network_node => $::use_quantum,
|
quantum_network_node => $::use_quantum,
|
||||||
quantum_netnode_on_cnt => $::use_quantum,
|
quantum_netnode_on_cnt => $::use_quantum,
|
||||||
cinder => true,
|
cinder => true,
|
||||||
cinder_user_password => $::osnailyfacter::cluster_ha::cinder_hash[user_password],
|
cinder_user_password => $::osnailyfacter::cluster_ha::cinder_hash[user_password],
|
||||||
cinder_iscsi_bind_addr => $::osnailyfacter::cluster_ha::cinder_iscsi_bind_addr,
|
cinder_iscsi_bind_addr => $::osnailyfacter::cluster_ha::cinder_iscsi_bind_addr,
|
||||||
cinder_db_password => $::osnailyfacter::cluster_ha::cinder_hash[db_password],
|
cinder_db_password => $::osnailyfacter::cluster_ha::cinder_hash[db_password],
|
||||||
cinder_volume_group => "cinder",
|
cinder_volume_group => "cinder",
|
||||||
manage_volumes => $::osnailyfacter::cluster_ha::manage_volumes,
|
manage_volumes => $::osnailyfacter::cluster_ha::manage_volumes,
|
||||||
ceilometer => $::osnailyfacter::cluster_ha::ceilometer_hash[enabled],
|
ceilometer => $::osnailyfacter::cluster_ha::ceilometer_hash[enabled],
|
||||||
ceilometer_db_password => $::osnailyfacter::cluster_ha::ceilometer_hash[db_password],
|
ceilometer_db_password => $::osnailyfacter::cluster_ha::ceilometer_hash[db_password],
|
||||||
ceilometer_user_password => $::osnailyfacter::cluster_ha::ceilometer_hash[user_password],
|
ceilometer_user_password => $::osnailyfacter::cluster_ha::ceilometer_hash[user_password],
|
||||||
ceilometer_metering_secret => $::osnailyfacter::cluster_ha::ceilometer_hash[metering_secret],
|
ceilometer_metering_secret => $::osnailyfacter::cluster_ha::ceilometer_hash[metering_secret],
|
||||||
ceilometer_db_type => 'mongodb',
|
ceilometer_db_type => 'mongodb',
|
||||||
ceilometer_db_host => mongo_hosts($nodes_hash),
|
ceilometer_db_host => mongo_hosts($nodes_hash),
|
||||||
galera_nodes => $::osnailyfacter::cluster_ha::controller_nodes,
|
galera_nodes => $::osnailyfacter::cluster_ha::controller_nodes,
|
||||||
novnc_address => $::internal_address,
|
novnc_address => $::internal_address,
|
||||||
sahara => $::osnailyfacter::cluster_ha::sahara_hash[enabled],
|
sahara => $::osnailyfacter::cluster_ha::sahara_hash[enabled],
|
||||||
murano => $::osnailyfacter::cluster_ha::murano_hash['enabled'],
|
murano => $::osnailyfacter::cluster_ha::murano_hash['enabled'],
|
||||||
custom_mysql_setup_class => $::custom_mysql_setup_class,
|
custom_mysql_setup_class => $::custom_mysql_setup_class,
|
||||||
mysql_skip_name_resolve => true,
|
mysql_skip_name_resolve => true,
|
||||||
use_syslog => $::osnailyfacter::cluster_ha::use_syslog,
|
use_syslog => $::osnailyfacter::cluster_ha::use_syslog,
|
||||||
syslog_log_level => $::syslog_log_level,
|
syslog_log_facility_glance => $::syslog_log_facility_glance,
|
||||||
syslog_log_facility_glance => $::syslog_log_facility_glance,
|
syslog_log_facility_cinder => $::syslog_log_facility_cinder,
|
||||||
syslog_log_facility_cinder => $::syslog_log_facility_cinder,
|
syslog_log_facility_neutron => $::syslog_log_facility_neutron,
|
||||||
syslog_log_facility_neutron => $::syslog_log_facility_neutron,
|
syslog_log_facility_nova => $::syslog_log_facility_nova,
|
||||||
syslog_log_facility_nova => $::syslog_log_facility_nova,
|
syslog_log_facility_keystone => $::syslog_log_facility_keystone,
|
||||||
syslog_log_facility_keystone => $::syslog_log_facility_keystone,
|
syslog_log_facility_ceilometer => $::syslog_log_facility_ceilometer,
|
||||||
nova_rate_limits => $::nova_rate_limits,
|
nova_rate_limits => $::nova_rate_limits,
|
||||||
cinder_rate_limits => $::cinder_rate_limits,
|
cinder_rate_limits => $::cinder_rate_limits,
|
||||||
horizon_use_ssl => $::fuel_settings['horizon_use_ssl'],
|
horizon_use_ssl => $::fuel_settings['horizon_use_ssl'],
|
||||||
use_unicast_corosync => $::fuel_settings['use_unicast_corosync'],
|
use_unicast_corosync => $::fuel_settings['use_unicast_corosync'],
|
||||||
nameservers => $::dns_nameservers,
|
nameservers => $::dns_nameservers,
|
||||||
max_retries => $max_retries,
|
max_retries => $max_retries,
|
||||||
max_pool_size => $max_pool_size,
|
max_pool_size => $max_pool_size,
|
||||||
max_overflow => $max_overflow,
|
max_overflow => $max_overflow,
|
||||||
idle_timeout => $idle_timeout,
|
idle_timeout => $idle_timeout,
|
||||||
nova_report_interval => $::nova_report_interval,
|
nova_report_interval => $::nova_report_interval,
|
||||||
nova_service_down_time => $::nova_service_down_time,
|
nova_service_down_time => $::nova_service_down_time,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,7 +381,6 @@ class osnailyfacter::cluster_ha {
|
||||||
swift_local_net_ip => $::storage_address,
|
swift_local_net_ip => $::storage_address,
|
||||||
master_swift_proxy_ip => $master_swift_proxy_ip,
|
master_swift_proxy_ip => $master_swift_proxy_ip,
|
||||||
sync_rings => ! $primary_proxy,
|
sync_rings => ! $primary_proxy,
|
||||||
syslog_log_level => $::syslog_log_level,
|
|
||||||
debug => $::debug,
|
debug => $::debug,
|
||||||
verbose => $::verbose,
|
verbose => $::verbose,
|
||||||
}
|
}
|
||||||
|
@ -404,7 +403,6 @@ class osnailyfacter::cluster_ha {
|
||||||
controller_node_address => $::fuel_settings['management_vip'],
|
controller_node_address => $::fuel_settings['management_vip'],
|
||||||
swift_local_net_ip => $swift_local_net_ip,
|
swift_local_net_ip => $swift_local_net_ip,
|
||||||
master_swift_proxy_ip => $master_swift_proxy_ip,
|
master_swift_proxy_ip => $master_swift_proxy_ip,
|
||||||
syslog_log_level => $::syslog_log_level,
|
|
||||||
debug => $::debug,
|
debug => $::debug,
|
||||||
verbose => $::verbose,
|
verbose => $::verbose,
|
||||||
}
|
}
|
||||||
|
@ -461,7 +459,6 @@ class osnailyfacter::cluster_ha {
|
||||||
use_floating_ips => $::fuel_settings['auto_assign_floating_ip'],
|
use_floating_ips => $::fuel_settings['auto_assign_floating_ip'],
|
||||||
|
|
||||||
syslog_log_facility_sahara => $syslog_log_facility_sahara,
|
syslog_log_facility_sahara => $syslog_log_facility_sahara,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
debug => $::debug,
|
debug => $::debug,
|
||||||
verbose => $::verbose,
|
verbose => $::verbose,
|
||||||
use_syslog => $::use_syslog,
|
use_syslog => $::use_syslog,
|
||||||
|
@ -567,63 +564,55 @@ class osnailyfacter::cluster_ha {
|
||||||
include osnailyfacter::test_compute
|
include osnailyfacter::test_compute
|
||||||
|
|
||||||
class { 'openstack::compute':
|
class { 'openstack::compute':
|
||||||
public_interface => $::public_int,
|
public_interface => $::public_int,
|
||||||
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface'] },
|
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface'] },
|
||||||
internal_address => $::internal_address,
|
internal_address => $::internal_address,
|
||||||
libvirt_type => $::fuel_settings['libvirt_type'],
|
libvirt_type => $::fuel_settings['libvirt_type'],
|
||||||
fixed_range => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_network_range']},
|
fixed_range => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_network_range']},
|
||||||
network_manager => $network_manager,
|
network_manager => $network_manager,
|
||||||
network_config => $network_config,
|
network_config => $network_config,
|
||||||
multi_host => $multi_host,
|
multi_host => $multi_host,
|
||||||
sql_connection => "mysql://nova:${nova_hash[db_password]}@${::fuel_settings['management_vip']}/nova?read_timeout=60",
|
sql_connection => "mysql://nova:${nova_hash[db_password]}@${::fuel_settings['management_vip']}/nova?read_timeout=60",
|
||||||
queue_provider => $::queue_provider,
|
queue_provider => $::queue_provider,
|
||||||
amqp_hosts => $amqp_hosts,
|
amqp_hosts => $amqp_hosts,
|
||||||
amqp_user => $rabbit_hash['user'],
|
amqp_user => $rabbit_hash['user'],
|
||||||
amqp_password => $rabbit_hash['password'],
|
amqp_password => $rabbit_hash['password'],
|
||||||
rabbit_ha_queues => $rabbit_ha_queues,
|
rabbit_ha_queues => $rabbit_ha_queues,
|
||||||
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
||||||
glance_api_servers => "${::fuel_settings['management_vip']}:9292",
|
glance_api_servers => "${::fuel_settings['management_vip']}:9292",
|
||||||
vncproxy_host => $::fuel_settings['public_vip'],
|
vncproxy_host => $::fuel_settings['public_vip'],
|
||||||
vncserver_listen => '0.0.0.0',
|
vncserver_listen => '0.0.0.0',
|
||||||
debug => $::debug,
|
debug => $::debug,
|
||||||
verbose => $::verbose,
|
verbose => $::verbose,
|
||||||
cinder_volume_group => "cinder",
|
cinder_volume_group => "cinder",
|
||||||
vnc_enabled => true,
|
vnc_enabled => true,
|
||||||
manage_volumes => $manage_volumes,
|
manage_volumes => $manage_volumes,
|
||||||
nova_user_password => $nova_hash[user_password],
|
nova_user_password => $nova_hash[user_password],
|
||||||
cache_server_ip => $controller_nodes,
|
cache_server_ip => $controller_nodes,
|
||||||
service_endpoint => $::fuel_settings['management_vip'],
|
service_endpoint => $::fuel_settings['management_vip'],
|
||||||
cinder => true,
|
cinder => true,
|
||||||
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
||||||
cinder_user_password => $cinder_hash[user_password],
|
cinder_user_password => $cinder_hash[user_password],
|
||||||
cinder_db_password => $cinder_hash[db_password],
|
cinder_db_password => $cinder_hash[db_password],
|
||||||
ceilometer => $ceilometer_hash[enabled],
|
ceilometer => $ceilometer_hash[enabled],
|
||||||
ceilometer_metering_secret => $ceilometer_hash[metering_secret],
|
ceilometer_metering_secret => $ceilometer_hash[metering_secret],
|
||||||
ceilometer_user_password => $ceilometer_hash[user_password],
|
ceilometer_user_password => $ceilometer_hash[user_password],
|
||||||
db_host => $::fuel_settings['management_vip'],
|
db_host => $::fuel_settings['management_vip'],
|
||||||
quantum => $::use_quantum,
|
quantum => $::use_quantum,
|
||||||
quantum_config => $quantum_config,
|
quantum_config => $quantum_config,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_level => $::syslog_log_level,
|
syslog_log_facility => $::syslog_log_facility_nova,
|
||||||
syslog_log_facility => $::syslog_log_facility_nova,
|
|
||||||
syslog_log_facility_neutron => $::syslog_log_facility_neutron,
|
syslog_log_facility_neutron => $::syslog_log_facility_neutron,
|
||||||
syslog_log_facility_cinder => $::syslog_log_facility_cinder,
|
nova_rate_limits => $::nova_rate_limits,
|
||||||
nova_rate_limits => $::nova_rate_limits,
|
nova_report_interval => $::nova_report_interval,
|
||||||
nova_report_interval => $::nova_report_interval,
|
nova_service_down_time => $::nova_service_down_time,
|
||||||
nova_service_down_time => $::nova_service_down_time,
|
state_path => $nova_hash[state_path],
|
||||||
state_path => $nova_hash[state_path],
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($::use_ceph){
|
if ($::use_ceph){
|
||||||
Class['openstack::compute'] -> Class['ceph']
|
Class['openstack::compute'] -> Class['ceph']
|
||||||
}
|
}
|
||||||
|
|
||||||
# class { "::rsyslog::client":
|
|
||||||
# log_local => true,
|
|
||||||
# log_auth_local => true,
|
|
||||||
# rservers => $rservers,
|
|
||||||
# }
|
|
||||||
|
|
||||||
#TODO: PUT this configuration stanza into nova class
|
#TODO: PUT this configuration stanza into nova class
|
||||||
nova_config { 'DEFAULT/start_guests_on_host_boot': value => $::fuel_settings['start_guests_on_host_boot'] }
|
nova_config { 'DEFAULT/start_guests_on_host_boot': value => $::fuel_settings['start_guests_on_host_boot'] }
|
||||||
nova_config { 'DEFAULT/use_cow_images': value => $::fuel_settings['use_cow_images'] }
|
nova_config { 'DEFAULT/use_cow_images': value => $::fuel_settings['use_cow_images'] }
|
||||||
|
@ -677,7 +666,6 @@ class osnailyfacter::cluster_ha {
|
||||||
iscsi_bind_host => $::storage_address,
|
iscsi_bind_host => $::storage_address,
|
||||||
cinder_user_password => $cinder_hash[user_password],
|
cinder_user_password => $cinder_hash[user_password],
|
||||||
syslog_log_facility => $::syslog_log_facility_cinder,
|
syslog_log_facility => $::syslog_log_facility_cinder,
|
||||||
syslog_log_level => $::syslog_log_level,
|
|
||||||
debug => $::debug,
|
debug => $::debug,
|
||||||
verbose => $::verbose,
|
verbose => $::verbose,
|
||||||
use_syslog => $::use_syslog,
|
use_syslog => $::use_syslog,
|
||||||
|
@ -687,11 +675,6 @@ class osnailyfacter::cluster_ha {
|
||||||
idle_timeout => $idle_timeout,
|
idle_timeout => $idle_timeout,
|
||||||
|
|
||||||
}
|
}
|
||||||
# class { "::rsyslog::client":
|
|
||||||
# log_local => true,
|
|
||||||
# log_auth_local => true,
|
|
||||||
# rservers => $rservers,
|
|
||||||
# }
|
|
||||||
} # CINDER ENDS
|
} # CINDER ENDS
|
||||||
|
|
||||||
"ceph-osd" : {
|
"ceph-osd" : {
|
||||||
|
|
|
@ -156,78 +156,78 @@ class osnailyfacter::cluster_simple {
|
||||||
|
|
||||||
class {'osnailyfacter::apache_api_proxy':}
|
class {'osnailyfacter::apache_api_proxy':}
|
||||||
class { 'openstack::controller':
|
class { 'openstack::controller':
|
||||||
admin_address => $controller_node_address,
|
admin_address => $controller_node_address,
|
||||||
public_address => $controller_node_public,
|
public_address => $controller_node_public,
|
||||||
public_interface => $::public_int,
|
public_interface => $::public_int,
|
||||||
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface']},
|
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface']},
|
||||||
internal_address => $controller_node_address,
|
internal_address => $controller_node_address,
|
||||||
service_endpoint => $controller_node_address,
|
service_endpoint => $controller_node_address,
|
||||||
floating_range => false, #todo: remove as not needed ???
|
floating_range => false, #todo: remove as not needed ???
|
||||||
fixed_range => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_network_range'] },
|
fixed_range => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_network_range'] },
|
||||||
multi_host => $multi_host,
|
multi_host => $multi_host,
|
||||||
network_manager => $network_manager,
|
network_manager => $network_manager,
|
||||||
num_networks => $::use_quantum ? { true=>false, default=>$novanetwork_params['num_networks'] },
|
num_networks => $::use_quantum ? { true=>false, default=>$novanetwork_params['num_networks'] },
|
||||||
network_size => $::use_quantum ? { true=>false, default=>$novanetwork_params['network_size'] },
|
network_size => $::use_quantum ? { true=>false, default=>$novanetwork_params['network_size'] },
|
||||||
network_config => $::use_quantum ? { true=>false, default=>$network_config },
|
network_config => $::use_quantum ? { true=>false, default=>$network_config },
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
||||||
mysql_root_password => $mysql_hash[root_password],
|
mysql_root_password => $mysql_hash[root_password],
|
||||||
admin_email => $access_hash[email],
|
admin_email => $access_hash[email],
|
||||||
admin_user => $access_hash[user],
|
admin_user => $access_hash[user],
|
||||||
admin_password => $access_hash[password],
|
admin_password => $access_hash[password],
|
||||||
keystone_db_password => $keystone_hash[db_password],
|
keystone_db_password => $keystone_hash[db_password],
|
||||||
keystone_admin_token => $keystone_hash[admin_token],
|
keystone_admin_token => $keystone_hash[admin_token],
|
||||||
keystone_admin_tenant => $access_hash[tenant],
|
keystone_admin_tenant => $access_hash[tenant],
|
||||||
glance_db_password => $glance_hash[db_password],
|
glance_db_password => $glance_hash[db_password],
|
||||||
glance_user_password => $glance_hash[user_password],
|
glance_user_password => $glance_hash[user_password],
|
||||||
glance_backend => $glance_backend,
|
glance_backend => $glance_backend,
|
||||||
glance_image_cache_max_size => $glance_hash[image_cache_max_size],
|
glance_image_cache_max_size => $glance_hash[image_cache_max_size],
|
||||||
nova_db_password => $nova_hash[db_password],
|
nova_db_password => $nova_hash[db_password],
|
||||||
nova_user_password => $nova_hash[user_password],
|
nova_user_password => $nova_hash[user_password],
|
||||||
nova_rate_limits => $::nova_rate_limits,
|
nova_rate_limits => $::nova_rate_limits,
|
||||||
ceilometer => $ceilometer_hash[enabled],
|
ceilometer => $ceilometer_hash[enabled],
|
||||||
ceilometer_db_password => $ceilometer_hash[db_password],
|
ceilometer_db_password => $ceilometer_hash[db_password],
|
||||||
ceilometer_user_password => $ceilometer_hash[user_password],
|
ceilometer_user_password => $ceilometer_hash[user_password],
|
||||||
ceilometer_metering_secret => $ceilometer_hash[metering_secret],
|
ceilometer_metering_secret => $ceilometer_hash[metering_secret],
|
||||||
ceilometer_db_type => 'mongodb',
|
ceilometer_db_type => 'mongodb',
|
||||||
ceilometer_db_host => mongo_hosts($nodes_hash),
|
ceilometer_db_host => mongo_hosts($nodes_hash),
|
||||||
queue_provider => $::queue_provider,
|
queue_provider => $::queue_provider,
|
||||||
amqp_hosts => $amqp_hosts,
|
amqp_hosts => $amqp_hosts,
|
||||||
amqp_user => $rabbit_hash['user'],
|
amqp_user => $rabbit_hash['user'],
|
||||||
amqp_password => $rabbit_hash['password'],
|
amqp_password => $rabbit_hash['password'],
|
||||||
rabbitmq_bind_ip_address => $rabbitmq_bind_ip_address,
|
rabbitmq_bind_ip_address => $rabbitmq_bind_ip_address,
|
||||||
rabbitmq_bind_port => $rabbitmq_bind_port,
|
rabbitmq_bind_port => $rabbitmq_bind_port,
|
||||||
rabbitmq_cluster_nodes => $rabbitmq_cluster_nodes,
|
rabbitmq_cluster_nodes => $rabbitmq_cluster_nodes,
|
||||||
export_resources => false,
|
export_resources => false,
|
||||||
quantum => $::use_quantum,
|
quantum => $::use_quantum,
|
||||||
quantum_config => $quantum_config,
|
quantum_config => $quantum_config,
|
||||||
quantum_network_node => $::use_quantum,
|
quantum_network_node => $::use_quantum,
|
||||||
quantum_netnode_on_cnt => $::use_quantum,
|
quantum_netnode_on_cnt => $::use_quantum,
|
||||||
cinder => true,
|
cinder => true,
|
||||||
cinder_user_password => $cinder_hash[user_password],
|
cinder_user_password => $cinder_hash[user_password],
|
||||||
cinder_db_password => $cinder_hash[db_password],
|
cinder_db_password => $cinder_hash[db_password],
|
||||||
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
||||||
cinder_volume_group => "cinder",
|
cinder_volume_group => "cinder",
|
||||||
manage_volumes => $manage_volumes,
|
manage_volumes => $manage_volumes,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
novnc_address => $controller_node_public,
|
novnc_address => $controller_node_public,
|
||||||
syslog_log_level => $::syslog_log_level,
|
syslog_log_facility_glance => $::syslog_log_facility_glance,
|
||||||
syslog_log_facility_glance => $::syslog_log_facility_glance,
|
syslog_log_facility_cinder => $::syslog_log_facility_cinder,
|
||||||
syslog_log_facility_cinder => $::syslog_log_facility_cinder,
|
syslog_log_facility_neutron => $::syslog_log_facility_neutron,
|
||||||
syslog_log_facility_neutron => $::syslog_log_facility_neutron,
|
syslog_log_facility_nova => $::syslog_log_facility_nova,
|
||||||
syslog_log_facility_nova => $::syslog_log_facility_nova,
|
syslog_log_facility_keystone => $::syslog_log_facility_keystone,
|
||||||
syslog_log_facility_keystone=> $::syslog_log_facility_keystone,
|
syslog_log_facility_ceilometer => $::syslog_log_facility_ceilometer,
|
||||||
cinder_rate_limits => $::cinder_rate_limits,
|
cinder_rate_limits => $::cinder_rate_limits,
|
||||||
horizon_use_ssl => $::horizon_use_ssl,
|
horizon_use_ssl => $::horizon_use_ssl,
|
||||||
nameservers => $::dns_nameservers,
|
nameservers => $::dns_nameservers,
|
||||||
primary_controller => true,
|
primary_controller => true,
|
||||||
max_retries => $max_retries,
|
max_retries => $max_retries,
|
||||||
max_pool_size => $max_pool_size,
|
max_pool_size => $max_pool_size,
|
||||||
max_overflow => $max_overflow,
|
max_overflow => $max_overflow,
|
||||||
idle_timeout => $idle_timeout,
|
idle_timeout => $idle_timeout,
|
||||||
nova_report_interval => $::nova_report_interval,
|
nova_report_interval => $::nova_report_interval,
|
||||||
nova_service_down_time => $::nova_service_down_time,
|
nova_service_down_time => $::nova_service_down_time,
|
||||||
}
|
}
|
||||||
|
|
||||||
nova_config { 'DEFAULT/start_guests_on_host_boot': value => $::fuel_settings['start_guests_on_host_boot'] }
|
nova_config { 'DEFAULT/start_guests_on_host_boot': value => $::fuel_settings['start_guests_on_host_boot'] }
|
||||||
|
@ -240,10 +240,9 @@ class osnailyfacter::cluster_simple {
|
||||||
# qpid_password => $rabbit_hash[password],
|
# qpid_password => $rabbit_hash[password],
|
||||||
# qpid_user => $rabbit_hash[user],
|
# qpid_user => $rabbit_hash[user],
|
||||||
# qpid_nodes => [$controller_node_address],
|
# qpid_nodes => [$controller_node_address],
|
||||||
neutron_config => $quantum_config,
|
neutron_config => $quantum_config,
|
||||||
neutron_network_node => true,
|
neutron_network_node => true,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_level => $::syslog_log_level,
|
|
||||||
syslog_log_facility => $::syslog_log_facility_neutron,
|
syslog_log_facility => $::syslog_log_facility_neutron,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -287,7 +286,6 @@ class osnailyfacter::cluster_simple {
|
||||||
use_floating_ips => $::fuel_settings['auto_assign_floating_ip'],
|
use_floating_ips => $::fuel_settings['auto_assign_floating_ip'],
|
||||||
|
|
||||||
syslog_log_facility_sahara => $syslog_log_facility_sahara,
|
syslog_log_facility_sahara => $syslog_log_facility_sahara,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
|
@ -308,20 +306,20 @@ class osnailyfacter::cluster_simple {
|
||||||
|
|
||||||
if ($::operatingsystem != 'RedHat') {
|
if ($::operatingsystem != 'RedHat') {
|
||||||
class { 'heat' :
|
class { 'heat' :
|
||||||
pacemaker => false,
|
pacemaker => false,
|
||||||
external_ip => $controller_node_public,
|
external_ip => $controller_node_public,
|
||||||
|
|
||||||
keystone_host => $controller_node_address,
|
keystone_host => $controller_node_address,
|
||||||
keystone_user => 'heat',
|
keystone_user => 'heat',
|
||||||
keystone_password => 'heat',
|
keystone_password => 'heat',
|
||||||
keystone_tenant => 'services',
|
keystone_tenant => 'services',
|
||||||
|
|
||||||
amqp_hosts => $amqp_hosts,
|
amqp_hosts => $amqp_hosts,
|
||||||
amqp_user => $rabbit_hash['user'],
|
amqp_user => $rabbit_hash['user'],
|
||||||
amqp_password => $rabbit_hash['password'],
|
amqp_password => $rabbit_hash['password'],
|
||||||
|
|
||||||
db_host => $controller_node_address,
|
db_host => $controller_node_address,
|
||||||
db_password => $heat_hash['db_password'],
|
db_password => $heat_hash['db_password'],
|
||||||
|
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
|
@ -387,52 +385,51 @@ class osnailyfacter::cluster_simple {
|
||||||
include osnailyfacter::test_compute
|
include osnailyfacter::test_compute
|
||||||
|
|
||||||
class { 'openstack::compute':
|
class { 'openstack::compute':
|
||||||
public_interface => $::public_int,
|
public_interface => $::public_int,
|
||||||
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface'] },
|
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface'] },
|
||||||
internal_address => $::internal_address,
|
internal_address => $::internal_address,
|
||||||
libvirt_type => $::fuel_settings['libvirt_type'],
|
libvirt_type => $::fuel_settings['libvirt_type'],
|
||||||
fixed_range => $::fuel_settings['fixed_network_range'],
|
fixed_range => $::fuel_settings['fixed_network_range'],
|
||||||
network_manager => $network_manager,
|
network_manager => $network_manager,
|
||||||
network_config => $::use_quantum ? { true=>false, default=>$network_config },
|
network_config => $::use_quantum ? { true=>false, default=>$network_config },
|
||||||
multi_host => $multi_host,
|
multi_host => $multi_host,
|
||||||
sql_connection => $sql_connection,
|
sql_connection => $sql_connection,
|
||||||
nova_user_password => $nova_hash[user_password],
|
nova_user_password => $nova_hash[user_password],
|
||||||
ceilometer => $ceilometer_hash[enabled],
|
ceilometer => $ceilometer_hash[enabled],
|
||||||
ceilometer_metering_secret => $ceilometer_hash[metering_secret],
|
ceilometer_metering_secret => $ceilometer_hash[metering_secret],
|
||||||
ceilometer_user_password => $ceilometer_hash[user_password],
|
ceilometer_user_password => $ceilometer_hash[user_password],
|
||||||
queue_provider => $::queue_provider,
|
queue_provider => $::queue_provider,
|
||||||
amqp_hosts => $amqp_hosts,
|
amqp_hosts => $amqp_hosts,
|
||||||
amqp_user => $rabbit_hash['user'],
|
amqp_user => $rabbit_hash['user'],
|
||||||
amqp_password => $rabbit_hash['password'],
|
amqp_password => $rabbit_hash['password'],
|
||||||
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
||||||
glance_api_servers => "${controller_node_address}:9292",
|
glance_api_servers => "${controller_node_address}:9292",
|
||||||
vncproxy_host => $controller_node_public,
|
vncproxy_host => $controller_node_public,
|
||||||
vncserver_listen => '0.0.0.0',
|
vncserver_listen => '0.0.0.0',
|
||||||
vnc_enabled => true,
|
vnc_enabled => true,
|
||||||
quantum => $::use_quantum,
|
quantum => $::use_quantum,
|
||||||
quantum_config => $quantum_config,
|
quantum_config => $quantum_config,
|
||||||
# quantum_network_node => $::use_quantum,
|
# quantum_network_node => $::use_quantum,
|
||||||
# quantum_netnode_on_cnt => $::use_quantum,
|
# quantum_netnode_on_cnt => $::use_quantum,
|
||||||
service_endpoint => $controller_node_address,
|
service_endpoint => $controller_node_address,
|
||||||
cinder => true,
|
cinder => true,
|
||||||
cinder_user_password => $cinder_hash[user_password],
|
cinder_user_password => $cinder_hash[user_password],
|
||||||
cinder_db_password => $cinder_hash[db_password],
|
cinder_db_password => $cinder_hash[db_password],
|
||||||
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
||||||
cinder_volume_group => "cinder",
|
cinder_volume_group => "cinder",
|
||||||
manage_volumes => $manage_volumes,
|
manage_volumes => $manage_volumes,
|
||||||
db_host => $controller_node_address,
|
db_host => $controller_node_address,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
syslog_log_level => $::syslog_log_level,
|
syslog_log_facility => $::syslog_log_facility_nova,
|
||||||
syslog_log_facility => $::syslog_log_facility_nova,
|
syslog_log_facility_neutron => $::syslog_log_facility_neutron,
|
||||||
syslog_log_facility_neutron => $::syslog_log_facility_neutron,
|
syslog_log_facility_ceilometer => $::syslog_log_facility_ceilometer,
|
||||||
syslog_log_facility_cinder => $::syslog_log_facility_cinder,
|
state_path => $nova_hash[state_path],
|
||||||
state_path => $nova_hash[state_path],
|
nova_rate_limits => $::nova_rate_limits,
|
||||||
nova_rate_limits => $::nova_rate_limits,
|
nova_report_interval => $::nova_report_interval,
|
||||||
nova_report_interval => $::nova_report_interval,
|
nova_service_down_time => $::nova_service_down_time,
|
||||||
nova_service_down_time => $::nova_service_down_time,
|
cinder_rate_limits => $::cinder_rate_limits
|
||||||
cinder_rate_limits => $::cinder_rate_limits
|
|
||||||
}
|
}
|
||||||
nova_config { 'DEFAULT/start_guests_on_host_boot': value => $::fuel_settings['start_guests_on_host_boot'] }
|
nova_config { 'DEFAULT/start_guests_on_host_boot': value => $::fuel_settings['start_guests_on_host_boot'] }
|
||||||
nova_config { 'DEFAULT/use_cow_images': value => $::fuel_settings['use_cow_images'] }
|
nova_config { 'DEFAULT/use_cow_images': value => $::fuel_settings['use_cow_images'] }
|
||||||
|
@ -496,7 +493,6 @@ class osnailyfacter::cluster_simple {
|
||||||
iscsi_bind_host => $cinder_iscsi_bind_addr,
|
iscsi_bind_host => $cinder_iscsi_bind_addr,
|
||||||
cinder_user_password => $cinder_hash[user_password],
|
cinder_user_password => $cinder_hash[user_password],
|
||||||
syslog_log_facility => $::syslog_log_facility_cinder,
|
syslog_log_facility => $::syslog_log_facility_cinder,
|
||||||
syslog_log_level => $::syslog_log_level,
|
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
|
|
|
@ -3,39 +3,15 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
class rsyslog::client (
|
class rsyslog::client (
|
||||||
$high_precision_timestamps = false,
|
|
||||||
$log_remote = true,
|
$log_remote = true,
|
||||||
$remote_type = 'udp',
|
$remote_type = 'tcp',
|
||||||
$log_local = true,
|
$log_local = false,
|
||||||
$log_auth_local = true,
|
$log_auth_local = false,
|
||||||
$custom_config = undef,
|
$custom_config = undef,
|
||||||
$server = 'master',
|
$server = 'log',
|
||||||
$port = '514',
|
|
||||||
$escapenewline = false,
|
$escapenewline = false,
|
||||||
$rservers = undef,
|
|
||||||
$virtual = false,
|
|
||||||
$syslog_log_facility_murano = 'LOG_LOCAL0',
|
|
||||||
$syslog_log_facility_glance = 'LOG_LOCAL2',
|
|
||||||
$syslog_log_facility_cinder = 'LOG_LOCAL3',
|
|
||||||
$syslog_log_facility_neutron = 'LOG_LOCAL4',
|
|
||||||
$syslog_log_facility_nova = 'LOG_LOCAL6',
|
|
||||||
$syslog_log_facility_keystone = 'LOG_LOCAL7',
|
|
||||||
$syslog_log_facility_heat = 'LOG_LOCAL0',
|
|
||||||
$syslog_log_facility_sahara = 'LOG_LOCAL0',
|
|
||||||
$log_level = 'NOTICE',
|
|
||||||
$debug = false,
|
|
||||||
) inherits rsyslog {
|
) inherits rsyslog {
|
||||||
|
|
||||||
# Fix for udp checksums should be applied if running on virtual node
|
|
||||||
if $virtual { include rsyslog::checksum_udp514 }
|
|
||||||
|
|
||||||
if $rservers == undef {
|
|
||||||
$rservers_real = [{'remote_type'=>$remote_type, 'server'=>$server, 'port'=>$port}]
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
$rservers_real = $rservers
|
|
||||||
}
|
|
||||||
|
|
||||||
$content_real = $custom_config ? {
|
$content_real = $custom_config ? {
|
||||||
'' => template("${module_name}/01-client.conf.erb"),
|
'' => template("${module_name}/01-client.conf.erb"),
|
||||||
default => template($custom_config),
|
default => template($custom_config),
|
||||||
|
@ -48,438 +24,6 @@ if $virtual { include rsyslog::checksum_udp514 }
|
||||||
notify => Class["rsyslog::service"],
|
notify => Class["rsyslog::service"],
|
||||||
}
|
}
|
||||||
|
|
||||||
#TODO(bogdando) move all logging/imfile templates to openstack::logging in 'I'
|
|
||||||
# cut off 'LOG_' from facility names, if any
|
|
||||||
$re = '^LOG_(\w+)$'
|
|
||||||
$syslog_log_facility_glance_matched = regsubst($syslog_log_facility_glance, $re, '\1')
|
|
||||||
$syslog_log_facility_cinder_matched = regsubst($syslog_log_facility_cinder, $re, '\1')
|
|
||||||
$syslog_log_facility_neutron_matched = regsubst($syslog_log_facility_neutron, $re, '\1')
|
|
||||||
$syslog_log_facility_nova_matched = regsubst($syslog_log_facility_nova, $re, '\1')
|
|
||||||
$syslog_log_facility_keystone_matched = regsubst($syslog_log_facility_keystone, $re, '\1')
|
|
||||||
$syslog_log_facility_murano_matched = regsubst($syslog_log_facility_murano, $re, '\1')
|
|
||||||
$syslog_log_facility_heat_matched = regsubst($syslog_log_facility_heat, $re, '\1')
|
|
||||||
$syslog_log_facility_sahara_matched = regsubst($syslog_log_facility_sahara, $re, '\1')
|
|
||||||
|
|
||||||
# Rabbitmq does not support syslogging, use imfile
|
|
||||||
# log_level should be >= global syslog_log_level option,
|
|
||||||
# otherwise none messages would have gone to syslog
|
|
||||||
::rsyslog::imfile { "04-rabbitmq" :
|
|
||||||
file_name => "/var/log/rabbitmq/rabbit@${hostname}.log",
|
|
||||||
file_tag => "rabbitmq",
|
|
||||||
file_facility => "syslog",
|
|
||||||
file_severity => $log_level,
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
|
|
||||||
::rsyslog::imfile { "04-rabbitmq-sasl" :
|
|
||||||
file_name => "/var/log/rabbitmq/rabbit@${hostname}-sasl.log",
|
|
||||||
file_tag => "rabbitmq-sasl",
|
|
||||||
file_facility => "syslog",
|
|
||||||
file_severity => $log_level,
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
|
|
||||||
::rsyslog::imfile { "04-rabbitmq-startup_err" :
|
|
||||||
file_name => "/var/log/rabbitmq/startup_err",
|
|
||||||
file_tag => "rabbitmq-startup_err",
|
|
||||||
file_facility => "syslog",
|
|
||||||
file_severity => "ERROR",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
|
|
||||||
::rsyslog::imfile { "04-rabbitmq-shutdown_err" :
|
|
||||||
file_name => "/var/log/rabbitmq/shutdown_err",
|
|
||||||
file_tag => "rabbitmq-shutdown_err",
|
|
||||||
file_facility => "syslog",
|
|
||||||
file_severity => "ERROR",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
|
|
||||||
::rsyslog::imfile { "61-mco_agent_debug" :
|
|
||||||
file_name => "/var/log/mcollective.log",
|
|
||||||
file_tag => "mcollective",
|
|
||||||
file_facility => "daemon",
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
|
|
||||||
::rsyslog::imfile { "50-neutron-server_debug" :
|
|
||||||
file_name => "/var/log/neutron/server.log",
|
|
||||||
file_tag => "neutron-server",
|
|
||||||
file_facility => $syslog_log_facility_neutron_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "50-neutron-ovs-cleanup_debug" :
|
|
||||||
file_name => "/var/log/neutron/neutron-ovs-cleanup.log",
|
|
||||||
file_tag => "neutron-ovs-cleanup",
|
|
||||||
file_facility => $syslog_log_facility_neutron_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "50-neutron-rescheduling_debug" :
|
|
||||||
file_name => "/var/log/neutron/rescheduling.log",
|
|
||||||
file_tag => "neutron-rescheduling",
|
|
||||||
file_facility => $syslog_log_facility_neutron_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "50-neutron-ovs-agent_debug" :
|
|
||||||
file_name => "/var/log/neutron/openvswitch-agent.log",
|
|
||||||
file_tag => "neutron-agent-ovs",
|
|
||||||
file_facility => $syslog_log_facility_neutron_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "50-neutron-l3-agent_debug" :
|
|
||||||
file_name => "/var/log/neutron/l3-agent.log",
|
|
||||||
file_tag => "neutron-agent-l3",
|
|
||||||
file_facility => $syslog_log_facility_neutron_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "50-neutron-dhcp-agent_debug" :
|
|
||||||
file_name => "/var/log/neutron/dhcp-agent.log",
|
|
||||||
file_tag => "neutron-agent-dhcp",
|
|
||||||
file_facility => $syslog_log_facility_neutron_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "50-neutron-metadata-agent_debug" :
|
|
||||||
file_name => "/var/log/neutron/metadata-agent.log",
|
|
||||||
file_tag => "neutron-agent-metadata",
|
|
||||||
file_facility => $syslog_log_facility_neutron_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
|
|
||||||
# OS specific log file names
|
|
||||||
case $::osfamily {
|
|
||||||
'Debian': {
|
|
||||||
$sapi = '/var/log/sahara/sahara-api.log'
|
|
||||||
$napi = '/var/log/nova/nova-api.log'
|
|
||||||
$ncert = '/var/log/nova/nova-cert.log'
|
|
||||||
$nauth = '/var/log/nova/nova-consoleauth.log'
|
|
||||||
$nschd = '/var/log/nova/nova-scheduler.log'
|
|
||||||
$nnetw = '/var/log/nova/nova-network.log'
|
|
||||||
$ncomp = '/var/log/nova/nova-compute.log'
|
|
||||||
$ncond = '/var/log/nova/nova-conductor.log'
|
|
||||||
$nobjs = '/var/log/nova/nova-objectstore.log'
|
|
||||||
$capi = '/var/log/cinder/cinder-api.log'
|
|
||||||
$cvol = '/var/log/cinder/cinder-volume.log'
|
|
||||||
$csch = '/var/log/cinder/cinder-scheduler.log'
|
|
||||||
}
|
|
||||||
'RedHat': {
|
|
||||||
$sapi = '/var/log/sahara/api.log'
|
|
||||||
$napi = '/var/log/nova/api.log'
|
|
||||||
$ncert = '/var/log/nova/cert.log'
|
|
||||||
$nauth = '/var/log/nova/consoleauth.log'
|
|
||||||
$nschd = '/var/log/nova/scheduler.log'
|
|
||||||
$nnetw = '/var/log/nova/network.log'
|
|
||||||
$ncomp = '/var/log/nova/compute.log'
|
|
||||||
$ncond = '/var/log/nova/conductor.log'
|
|
||||||
$nobjs = '/var/log/nova/objectstore.log'
|
|
||||||
$capi = '/var/log/cinder/api.log'
|
|
||||||
$cvol = '/var/log/cinder/volume.log'
|
|
||||||
$csch = '/var/log/cinder/scheduler.log'
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, module ${module_name} only support osfamily RedHat and Debian")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# openstack syslog compatible mode, would work only for debug case.
|
|
||||||
# because of its poor syslog debug messages quality, use local logs convertion
|
|
||||||
if $debug {
|
|
||||||
::rsyslog::imfile { "10-nova-api_debug" :
|
|
||||||
file_name => $napi,
|
|
||||||
file_tag => "nova-api",
|
|
||||||
file_facility => $syslog_log_facility_nova_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "10-nova-cert_debug" :
|
|
||||||
file_name => $ncert,
|
|
||||||
file_tag => "nova-cert",
|
|
||||||
file_facility => $syslog_log_facility_nova_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "10-nova-consoleauth_debug" :
|
|
||||||
file_name => $nauth,
|
|
||||||
file_tag => "nova-consoleauth",
|
|
||||||
file_facility => $syslog_log_facility_nova_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "10-nova-scheduler_debug" :
|
|
||||||
file_name => $nschd,
|
|
||||||
file_tag => "nova-scheduler",
|
|
||||||
file_facility => $syslog_log_facility_nova_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "10-nova-network_debug" :
|
|
||||||
file_name => $nnetw,
|
|
||||||
file_tag => "nova-network",
|
|
||||||
file_facility => $syslog_log_facility_nova_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "10-nova-compute_debug" :
|
|
||||||
file_name => $ncomp,
|
|
||||||
file_tag => "nova-compute",
|
|
||||||
file_facility => $syslog_log_facility_nova_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "10-nova-conductor_debug" :
|
|
||||||
file_name => $ncond,
|
|
||||||
file_tag => "nova-conductor",
|
|
||||||
file_facility => $syslog_log_facility_nova_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "10-nova-objectstore_debug" :
|
|
||||||
file_name => $nobjs,
|
|
||||||
file_tag => "nova-objectstore",
|
|
||||||
file_facility => $syslog_log_facility_nova_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "20-keystone_debug" :
|
|
||||||
file_name => "/var/log/keystone/keystone.log",
|
|
||||||
file_tag => "keystone",
|
|
||||||
file_facility => $syslog_log_facility_keystone_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "30-cinder-api_debug" :
|
|
||||||
file_name => $capi,
|
|
||||||
file_tag => "cinder-api",
|
|
||||||
file_facility => $syslog_log_facility_cinder_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "30-cinder-volume_debug" :
|
|
||||||
file_name => $cvol,
|
|
||||||
file_tag => "cinder-volume",
|
|
||||||
file_facility => $syslog_log_facility_cinder_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "30-cinder-scheduler_debug" :
|
|
||||||
file_name => $csch,
|
|
||||||
file_tag => "cinder-scheduler",
|
|
||||||
file_facility => $syslog_log_facility_cinder_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "40-glance-api_debug" :
|
|
||||||
file_name => "/var/log/glance/api.log",
|
|
||||||
file_tag => "glance-api",
|
|
||||||
file_facility => $syslog_log_facility_glance_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "40-glance-registry_debug" :
|
|
||||||
file_name => "/var/log/glance/registry.log",
|
|
||||||
file_tag => "glance-registry",
|
|
||||||
file_facility => $syslog_log_facility_glance_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
# murano
|
|
||||||
::rsyslog::imfile { "53-murano-api_debug" :
|
|
||||||
file_name => "/var/log/murano/murano-api.log",
|
|
||||||
file_tag => "murano-api",
|
|
||||||
file_facility => $syslog_log_facility_murano_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
# heat
|
|
||||||
::rsyslog::imfile { "54-heat_engine_debug" :
|
|
||||||
file_name => "/var/log/heat/heat-engine.log",
|
|
||||||
file_tag => "heat-engine",
|
|
||||||
file_facility => $syslog_log_facility_heat_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "54-heat_api_debug" :
|
|
||||||
file_name => "/var/log/heat/heat-api.log",
|
|
||||||
file_tag => "heat-api",
|
|
||||||
file_facility => $syslog_log_facility_heat_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "54-heat_api_cfn_debug" :
|
|
||||||
file_name => "/var/log/heat/heat-api-cfn.log",
|
|
||||||
file_tag => "heat-api-cfn",
|
|
||||||
file_facility => $syslog_log_facility_heat_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "54-heat_api_cloudwatch_debug" :
|
|
||||||
file_name => "/var/log/heat/heat-api-cloudwatch.log",
|
|
||||||
file_tag => "heat-api-cloudwatch",
|
|
||||||
file_facility => $syslog_log_facility_heat_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "54-heat_manage_debug" :
|
|
||||||
file_name => "/var/log/heat/heat-manage.log",
|
|
||||||
file_tag => "heat-manage",
|
|
||||||
file_facility => $syslog_log_facility_heat_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
# sahara
|
|
||||||
::rsyslog::imfile { "52-sahara-api_debug" :
|
|
||||||
file_name => $sapi,
|
|
||||||
file_tag => "sahara-api",
|
|
||||||
file_facility => $syslog_log_facility_sahara_matched,
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
# ceilometer
|
|
||||||
# FIXME(bogdando) in 5.1 all imfile templates for OS will be removed
|
|
||||||
# and ceilometer facility hardcode will be fixed as well
|
|
||||||
::rsyslog::imfile { "55-ceilometer-agent-central_debug" :
|
|
||||||
file_name => "/var/log/ceilometer/ceilometer-agent-central.log",
|
|
||||||
file_tag => "ceilometer-agent-central",
|
|
||||||
file_facility => "LOCAL0",
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "55-ceilometer-alarm-evaluator_debug" :
|
|
||||||
file_name => "/var/log/ceilometer/ceilometer-alarm-evaluator.log",
|
|
||||||
file_tag => "ceilometer-alarm-evaluator",
|
|
||||||
file_facility => "LOCAL0",
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "55-ceilometer-api_debug" :
|
|
||||||
file_name => "/var/log/ceilometer/ceilometer-api.log",
|
|
||||||
file_tag => "ceilometer-api",
|
|
||||||
file_facility => "LOCAL0",
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "55-ceilometer-dbsync_debug" :
|
|
||||||
file_name => "/var/log/ceilometer/ceilometer-dbsync.log",
|
|
||||||
file_tag => "ceilometer-dbsync",
|
|
||||||
file_facility => "LOCAL0",
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "55-ceilometer-agent-notification_debug" :
|
|
||||||
file_name => "/var/log/ceilometer/ceilometer-agent-notification.log",
|
|
||||||
file_tag => "ceilometer-agent-notification",
|
|
||||||
file_facility => "LOCAL0",
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "55-ceilometer-alarm-notifier_debug" :
|
|
||||||
file_name => "/var/log/ceilometer/ceilometer-alarm-notifier.log",
|
|
||||||
file_tag => "ceilometer-alarm-notifier",
|
|
||||||
file_facility => "LOCAL0",
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "55-ceilometer-collector_debug" :
|
|
||||||
file_name => "/var/log/ceilometer/ceilometer-collector.log",
|
|
||||||
file_tag => "ceilometer-collector",
|
|
||||||
file_facility => "LOCAL0",
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
::rsyslog::imfile { "55-ceilometer-agent-compute_debug" :
|
|
||||||
file_name => "/var/log/ceilometer/ceilometer-agent-compute.log",
|
|
||||||
file_tag => "ceilometer-agent-compute",
|
|
||||||
file_facility => "LOCAL0",
|
|
||||||
file_severity => "DEBUG",
|
|
||||||
notify => Class["rsyslog::service"],
|
|
||||||
}
|
|
||||||
} else { #non debug case
|
|
||||||
# standard logging configs for syslog client
|
|
||||||
file { "${rsyslog::params::rsyslog_d}10-nova.conf":
|
|
||||||
ensure => present,
|
|
||||||
content => template("${module_name}/10-nova.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}20-keystone.conf":
|
|
||||||
ensure => present,
|
|
||||||
content => template("${module_name}/20-keystone.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}/30-cinder.conf":
|
|
||||||
ensure => present,
|
|
||||||
content => template("${module_name}/30-cinder.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}40-glance.conf":
|
|
||||||
ensure => present,
|
|
||||||
content => template("${module_name}/40-glance.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}50-neutron.conf":
|
|
||||||
ensure => present,
|
|
||||||
content => template("${module_name}/50-neutron.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}51-ceilometer.conf":
|
|
||||||
ensure => present,
|
|
||||||
content => template("${module_name}/51-ceilometer.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}53-murano.conf":
|
|
||||||
ensure => present,
|
|
||||||
content => template("${module_name}/53-murano.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}54-heat.conf":
|
|
||||||
ensure => present,
|
|
||||||
content => template("${module_name}/54-heat.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}52-sahara.conf":
|
|
||||||
ensure => present,
|
|
||||||
content => template("${module_name}/52-sahara.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
} #end if
|
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}02-ha.conf":
|
|
||||||
ensure => present,
|
|
||||||
content => template("${module_name}/02-ha.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}03-dashboard.conf":
|
|
||||||
ensure => present,
|
|
||||||
content => template("${module_name}/03-dashboard.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}04-mysql.conf":
|
|
||||||
ensure => present,
|
|
||||||
content => template("${module_name}/04-mysql.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}60-puppet-apply.conf":
|
|
||||||
content => template("${module_name}/60-puppet-apply.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}/61-mco-nailgun-agent.conf":
|
|
||||||
content => template("${module_name}/61-mco-nailgun-agent.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}90-local.conf":
|
|
||||||
content => template("${module_name}/90-local.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}00-remote.conf":
|
|
||||||
content => template("${module_name}/00-remote.conf.erb"),
|
|
||||||
}
|
|
||||||
|
|
||||||
file { $rsyslog::params::rsyslog_d:
|
file { $rsyslog::params::rsyslog_d:
|
||||||
purge => true,
|
purge => true,
|
||||||
recurse => true,
|
recurse => true,
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
class rsyslog {
|
class rsyslog {
|
||||||
# assumes rsyslog packages installed at BM stage or included in distro
|
include rsyslog::params, rsyslog::install, rsyslog::config, rsyslog::service
|
||||||
include rsyslog::params, rsyslog::config, rsyslog::service
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,9 +1,13 @@
|
||||||
class rsyslog::install {
|
class rsyslog::install {
|
||||||
|
if $rsyslog::params::rsyslog_package_name {
|
||||||
package { $rsyslog::params::rsyslog_package_name:
|
package { $rsyslog::params::rsyslog_package_name:
|
||||||
ensure => $rsyslog::params::package_status,
|
ensure => $rsyslog::params::package_status,
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if $rsyslog::params::relp_package_name {
|
||||||
package { $rsyslog::params::relp_package_name:
|
package { $rsyslog::params::relp_package_name:
|
||||||
ensure => $rsyslog::params::package_status
|
ensure => $rsyslog::params::package_status
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,10 @@ class rsyslog::params {
|
||||||
case $::operatingsystem {
|
case $::operatingsystem {
|
||||||
/(?i)(ubuntu|debian|redhat|centos)/: {
|
/(?i)(ubuntu|debian|redhat|centos)/: {
|
||||||
$rsyslog_package_name = 'rsyslog'
|
$rsyslog_package_name = 'rsyslog'
|
||||||
$relp_package_name = 'rsyslog-relp'
|
#FIXME(bogdando) enable relp package back once we include it into
|
||||||
|
# the ISO, and if Fuel would start to use any of RELP features
|
||||||
|
#$relp_package_name = 'rsyslog-relp'
|
||||||
|
$relp_package_name = false
|
||||||
$package_status = 'installed'
|
$package_status = 'installed'
|
||||||
$rsyslog_d = '/etc/rsyslog.d/'
|
$rsyslog_d = '/etc/rsyslog.d/'
|
||||||
$rsyslog_conf = '/etc/rsyslog.conf'
|
$rsyslog_conf = '/etc/rsyslog.conf'
|
||||||
|
|
|
@ -5,17 +5,13 @@
|
||||||
class rsyslog::server (
|
class rsyslog::server (
|
||||||
$enable_tcp = true,
|
$enable_tcp = true,
|
||||||
$enable_udp = true,
|
$enable_udp = true,
|
||||||
$port = '514',
|
|
||||||
$server_dir = '/srv/log/',
|
$server_dir = '/srv/log/',
|
||||||
$custom_config = undef,
|
$custom_config = undef,
|
||||||
$high_precision_timestamps = false,
|
$high_precision_timestamps = false,
|
||||||
$escapenewline = false,
|
$escapenewline = false,
|
||||||
$virtual = true,
|
$port = '514',
|
||||||
) inherits rsyslog {
|
) inherits rsyslog {
|
||||||
|
|
||||||
# Fix for udp checksums should be applied if running on virtual node
|
|
||||||
if $virtual { include rsyslog::checksum_udp514 }
|
|
||||||
|
|
||||||
File {
|
File {
|
||||||
owner => root,
|
owner => root,
|
||||||
group => $rsyslog::params::run_group,
|
group => $rsyslog::params::run_group,
|
||||||
|
@ -31,11 +27,6 @@ if $virtual { include rsyslog::checksum_udp514 }
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
}
|
}
|
||||||
|
|
||||||
file { "${rsyslog::params::rsyslog_d}30-remote-log.conf":
|
|
||||||
content => template("${module_name}/30-server-remote-log.conf.erb"),
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
file { $rsyslog::params::server_conf:
|
file { $rsyslog::params::server_conf:
|
||||||
ensure => present,
|
ensure => present,
|
||||||
content => $custom_config ? {
|
content => $custom_config ? {
|
||||||
|
|
|
@ -17,9 +17,9 @@ class sahara::api (
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$verbose = false,
|
$verbose = false,
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
$syslog_log_level = 'WARNING',
|
|
||||||
$syslog_log_facility_sahara = "LOG_LOCAL0",
|
$syslog_log_facility_sahara = "LOG_LOCAL0",
|
||||||
$logdir = '/var/log/sahara',
|
$log_dir = '/var/log/sahara',
|
||||||
|
$log_file = '/var/log/sahara/api.log',
|
||||||
) inherits sahara::params {
|
) inherits sahara::params {
|
||||||
|
|
||||||
validate_string($keystone_password)
|
validate_string($keystone_password)
|
||||||
|
@ -75,58 +75,41 @@ class sahara::api (
|
||||||
'DEFAULT/debug' : value => $debug;
|
'DEFAULT/debug' : value => $debug;
|
||||||
}
|
}
|
||||||
|
|
||||||
$logging_file = '/etc/sahara/logging.conf'
|
# Log configuration
|
||||||
case $::osfamily {
|
if $log_dir {
|
||||||
'Debian': {
|
|
||||||
$log_file = 'sahara-api.log'
|
|
||||||
}
|
|
||||||
'RedHat': {
|
|
||||||
$log_file = 'api.log'
|
|
||||||
}
|
|
||||||
default: {
|
|
||||||
fail("Unsupported osfamily: ${::osfamily} operatingsystem: ${::operatingsystem}, \
|
|
||||||
module ${module_name} only support osfamily RedHat and Debian")
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if $use_syslog and !$debug {
|
|
||||||
sahara_config {
|
sahara_config {
|
||||||
'DEFAULT/log_config' : value => $logging_file;
|
'DEFAULT/log_dir' : value => $log_dir;
|
||||||
'DEFAULT/log_file' : ensure => absent;
|
|
||||||
'DEFAULT/use_syslog' : value => true;
|
|
||||||
'DEFAULT/use_stderr' : value => false;
|
|
||||||
'DEFAULT/syslog_log_facility' : value => $syslog_log_facility_sahara;
|
|
||||||
}
|
|
||||||
file { 'sahara-logging.conf' :
|
|
||||||
ensure => present,
|
|
||||||
content => template('sahara/logging.conf.erb'),
|
|
||||||
path => $logging_file,
|
|
||||||
owner => 'root',
|
|
||||||
group => 'root',
|
|
||||||
mode => '0644',
|
|
||||||
require => Package['sahara'],
|
|
||||||
notify => Service['sahara-api'],
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
sahara_config {
|
sahara_config {
|
||||||
'DEFAULT/log_config' : ensure => absent;
|
'DEFAULT/log_dir' : ensure => absent;
|
||||||
'DEFAULT/use_syslog' : ensure => absent;
|
|
||||||
'DEFAULT/use_stderr' : ensure => absent;
|
|
||||||
'DEFAULT/syslog_log_facility' : ensure => absent;
|
|
||||||
'DEFAULT/log_dir' : value => $logdir;
|
|
||||||
'DEFAULT/log_file' : value => $log_file;
|
|
||||||
}
|
|
||||||
file { 'sahara-logging.conf' :
|
|
||||||
ensure => absent,
|
|
||||||
path => $logging_file,
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
File[$logdir] -> File['sahara-logging.conf']
|
if $log_file {
|
||||||
File['sahara-logging.conf'] ~> Service <| title == 'sahara-api' |>
|
sahara_config {
|
||||||
File['sahara-logging.conf'] -> Sahara_config['DEFAULT/log_config']
|
'DEFAULT/log_file' : value => $log_file;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
sahara_config {
|
||||||
|
'DEFAULT/log_file' : ensure => absent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
file { $logdir:
|
# Syslog configuration
|
||||||
|
if $use_syslog {
|
||||||
|
sahara_config {
|
||||||
|
'DEFAULT/use_syslog': value => true;
|
||||||
|
'DEFAULT/use_syslog_rfc_format': value => true;
|
||||||
|
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
sahara_config {
|
||||||
|
'DEFAULT/use_syslog': value => false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
file { $log_dir:
|
||||||
ensure => directory,
|
ensure => directory,
|
||||||
mode => '0751',
|
mode => '0751',
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,14 +21,13 @@ class sahara (
|
||||||
$sahara_db_allowed_hosts = ['localhost','%'],
|
$sahara_db_allowed_hosts = ['localhost','%'],
|
||||||
|
|
||||||
$sahara_firewall_rule = '201 sahara-api',
|
$sahara_firewall_rule = '201 sahara-api',
|
||||||
$use_neutron = false,
|
$use_neutron = false,
|
||||||
$use_floating_ips = false,
|
$use_floating_ips = false,
|
||||||
|
|
||||||
$use_syslog = false,
|
$use_syslog = false,
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$verbose = false,
|
$verbose = false,
|
||||||
$syslog_log_level = 'WARNING',
|
$syslog_log_facility_sahara = 'LOG_LOCAL0',
|
||||||
$syslog_log_facility_sahara = 'LOG_LOCAL0',
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
$sahara_sql_connection = "mysql://${sahara_db_user}:${sahara_db_password}@${sahara_db_host}/${sahara_db_name}?read_timeout=60"
|
$sahara_sql_connection = "mysql://${sahara_db_user}:${sahara_db_password}@${sahara_db_host}/${sahara_db_name}?read_timeout=60"
|
||||||
|
@ -57,7 +56,6 @@ class sahara (
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
use_syslog => $use_syslog,
|
use_syslog => $use_syslog,
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
syslog_log_facility_sahara => $syslog_log_facility_sahara,
|
syslog_log_facility_sahara => $syslog_log_facility_sahara,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,63 +0,0 @@
|
||||||
[loggers]
|
|
||||||
keys = root
|
|
||||||
|
|
||||||
[handlers]
|
|
||||||
keys = production,devel,stderr
|
|
||||||
|
|
||||||
[formatters]
|
|
||||||
keys = normal,debug
|
|
||||||
|
|
||||||
[logger_root]
|
|
||||||
level = NOTSET
|
|
||||||
handlers = production,devel,stderr
|
|
||||||
propagate = 1
|
|
||||||
|
|
||||||
[formatter_debug]
|
|
||||||
format = sahara-%(name)s %(levelname)s: %(module)s %(funcName)s %(message)s
|
|
||||||
|
|
||||||
[formatter_normal]
|
|
||||||
format = sahara-%(name)s %(levelname)s: %(message)s
|
|
||||||
|
|
||||||
# logging info to <%= @syslog_log_facility_sahara %> with debug:<%= @debug %> and verbose:<%= @verbose %>
|
|
||||||
[handler_production]
|
|
||||||
class = handlers.SysLogHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = ('/dev/log', handlers.SysLogHandler.<%= @syslog_log_facility_sahara %>)
|
|
||||||
|
|
||||||
# TODO find out how it could be usefull and how it should be used
|
|
||||||
[handler_stderr]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stderr,)
|
|
||||||
|
|
||||||
[handler_devel]
|
|
||||||
class = StreamHandler
|
|
||||||
<% if @debug then -%>
|
|
||||||
level = DEBUG
|
|
||||||
formatter = debug
|
|
||||||
<% elsif @verbose then -%>
|
|
||||||
level = INFO
|
|
||||||
formatter = normal
|
|
||||||
<% else -%>
|
|
||||||
level = <%= @syslog_log_level %>
|
|
||||||
formatter = normal
|
|
||||||
<% end -%>
|
|
||||||
args = (sys.stdout,)
|
|
|
@ -40,15 +40,14 @@
|
||||||
#
|
#
|
||||||
class swift::proxy(
|
class swift::proxy(
|
||||||
$proxy_local_net_ip,
|
$proxy_local_net_ip,
|
||||||
$port = '8080',
|
$port = '8080',
|
||||||
$pipeline = ['healthcheck', 'cache', 'tempauth', 'proxy-server'],
|
$pipeline = ['healthcheck', 'cache', 'tempauth', 'proxy-server'],
|
||||||
$workers = $::processorcount,
|
$workers = $::processorcount,
|
||||||
$allow_account_management = true,
|
$allow_account_management = true,
|
||||||
$account_autocreate = true,
|
$account_autocreate = true,
|
||||||
$package_ensure = 'present',
|
$package_ensure = 'present',
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$verbose = true,
|
$verbose = true,
|
||||||
$syslog_log_level = 'WARNING',
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
include 'swift::params'
|
include 'swift::params'
|
||||||
|
|
|
@ -19,7 +19,7 @@ class swift::storage::all(
|
||||||
$swift_zone,
|
$swift_zone,
|
||||||
$storage_local_net_ip,
|
$storage_local_net_ip,
|
||||||
$devices = '/srv/node',
|
$devices = '/srv/node',
|
||||||
$devices_dirs = undef,
|
$devices_dirs = undef,
|
||||||
$object_port = '6000',
|
$object_port = '6000',
|
||||||
$container_port = '6001',
|
$container_port = '6001',
|
||||||
$account_port = '6002',
|
$account_port = '6002',
|
||||||
|
@ -29,7 +29,6 @@ class swift::storage::all(
|
||||||
$export_devices = false,
|
$export_devices = false,
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$verbose = true,
|
$verbose = true,
|
||||||
$syslog_log_level = 'WARNING',
|
|
||||||
) {
|
) {
|
||||||
|
|
||||||
class { 'swift::storage':
|
class { 'swift::storage':
|
||||||
|
@ -74,7 +73,6 @@ class swift::storage::all(
|
||||||
storage_local_net_ip => $storage_local_net_ip,
|
storage_local_net_ip => $storage_local_net_ip,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
syslog_log_level => $syslog_log_level,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
swift::storage::server { $account_port:
|
swift::storage::server { $account_port:
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
define swift::storage::server(
|
define swift::storage::server(
|
||||||
$type,
|
$type,
|
||||||
$swift_zone,
|
$swift_zone,
|
||||||
$port = $name,
|
$port = $name,
|
||||||
$storage_local_net_ip,
|
$storage_local_net_ip,
|
||||||
$devices = '/srv/node',
|
$devices = '/srv/node',
|
||||||
$owner = 'swift',
|
$owner = 'swift',
|
||||||
|
@ -23,7 +23,6 @@ define swift::storage::server(
|
||||||
$config_file_path = "${type}-server/${name}.conf",
|
$config_file_path = "${type}-server/${name}.conf",
|
||||||
$debug = false,
|
$debug = false,
|
||||||
$verbose = true,
|
$verbose = true,
|
||||||
$syslog_log_level = 'WARNING',
|
|
||||||
) {
|
) {
|
||||||
if (is_array($pipeline)) {
|
if (is_array($pipeline)) {
|
||||||
$pipeline_real = $pipeline
|
$pipeline_real = $pipeline
|
||||||
|
|
|
@ -10,7 +10,7 @@ log_level = DEBUG
|
||||||
<% elsif @verbose then -%>
|
<% elsif @verbose then -%>
|
||||||
log_level = INFO
|
log_level = INFO
|
||||||
<% else -%>
|
<% else -%>
|
||||||
log_level = <%= @syslog_log_level %>
|
log_level = WARNING
|
||||||
<% end -%>
|
<% end -%>
|
||||||
log_name = swift-account-server
|
log_name = swift-account-server
|
||||||
workers = <%= @workers %>
|
workers = <%= @workers %>
|
||||||
|
|
|
@ -10,7 +10,7 @@ log_level = DEBUG
|
||||||
<% elsif @verbose then -%>
|
<% elsif @verbose then -%>
|
||||||
log_level = INFO
|
log_level = INFO
|
||||||
<% else -%>
|
<% else -%>
|
||||||
log_level = <%= @syslog_log_level %>
|
log_level = WARNING
|
||||||
<% end -%>
|
<% end -%>
|
||||||
log_name = swift-container-server
|
log_name = swift-container-server
|
||||||
workers = <%= @workers %>
|
workers = <%= @workers %>
|
||||||
|
|
|
@ -10,7 +10,7 @@ log_level = DEBUG
|
||||||
<% elsif @verbose then -%>
|
<% elsif @verbose then -%>
|
||||||
log_level = INFO
|
log_level = INFO
|
||||||
<% else -%>
|
<% else -%>
|
||||||
log_level = <%= @syslog_log_level %>
|
log_level = WARNING
|
||||||
<% end -%>
|
<% end -%>
|
||||||
log_name = swift-object-server
|
log_name = swift-object-server
|
||||||
workers = <%= @workers %>
|
workers = <%= @workers %>
|
||||||
|
|
|
@ -10,7 +10,7 @@ log_level = DEBUG
|
||||||
<% elsif @verbose then -%>
|
<% elsif @verbose then -%>
|
||||||
log_level = INFO
|
log_level = INFO
|
||||||
<% else -%>
|
<% else -%>
|
||||||
log_level = <%= @syslog_log_level %>
|
log_level = WARNING
|
||||||
<% end -%>
|
<% end -%>
|
||||||
log_name = swift-proxy-server
|
log_name = swift-proxy-server
|
||||||
user = swift
|
user = swift
|
||||||
|
|
Loading…
Reference in New Issue