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
|
||||
# [*debug*]
|
||||
# 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 servers connection string. Optional. Defaults to '127.0.0.1'
|
||||
# [*amqp_user*]
|
||||
|
@ -27,9 +37,9 @@ class ceilometer(
|
|||
$package_ensure = 'present',
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$log_dir = '/var/log/ceilometer',
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_SYSLOG',
|
||||
$syslog_log_level = 'WARNING',
|
||||
$syslog_log_facility = 'LOG_LOCAL0',
|
||||
$queue_provider = 'rabbitmq',
|
||||
$amqp_hosts = '127.0.0.1',
|
||||
$amqp_user = 'guest',
|
||||
|
@ -111,29 +121,27 @@ class ceilometer(
|
|||
'DEFAULT/verbose' : value => $verbose;
|
||||
}
|
||||
|
||||
# Configure logging
|
||||
if $use_syslog and !$debug { #syslog and nondebug case
|
||||
File['ceilometer-logging.conf'] -> Ceilometer_config['DEFAULT/log_config']
|
||||
# Log configuration
|
||||
if $log_dir {
|
||||
ceilometer_config {
|
||||
'DEFAULT/log_config' : value => '/etc/ceilometer/logging.conf';
|
||||
'DEFAULT/use_syslog' : value => true;
|
||||
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
||||
'DEFAULT/log_dir' : value => $log_dir;
|
||||
}
|
||||
file { 'ceilometer-logging.conf':
|
||||
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
|
||||
} else {
|
||||
ceilometer_config {
|
||||
'DEFAULT/log_config': ensure => absent;
|
||||
'DEFAULT/log_dir': value => $::ceilometer::params::log_dir;
|
||||
'DEFAULT/use_syslog': value => false;
|
||||
'DEFAULT/log_dir' : ensure => absent;
|
||||
}
|
||||
}
|
||||
|
||||
# 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 =
|
||||
'ceilometer-dbsync --config-file=/etc/ceilometer/ceilometer.conf'
|
||||
$log_dir = '/var/log/ceilometer'
|
||||
|
||||
# ssl keys/certs
|
||||
$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,
|
||||
require => Class['ceph::conf']
|
||||
}
|
||||
#FIXME(bogdando) using collection for clumsy params-ensured packages
|
||||
Package<| title == 'ceph' |> ~> Service<| title == 'ceph' |>
|
||||
if !defined(Service['ceph']) {
|
||||
notify{ "Module ${module_name} cannot notify service ceph on packages update": }
|
||||
|
|
|
@ -3,9 +3,19 @@
|
|||
# $state_path = /opt/stack/data/cinder
|
||||
# $osapi_volume_extension = cinder.api.openstack.volume.contrib.standard_extensions
|
||||
# $root_helper = sudo /usr/local/bin/cinder-rootwrap /etc/cinder/rootwrap.conf
|
||||
# $use_syslog = Rather or not service should log to syslog. Optional.
|
||||
# $syslog_log_facility = Facility for syslog, if used. Optional.
|
||||
# $syslog_log_level = logging level for non verbose and non debug mode. Optional.
|
||||
# [*use_syslog*]
|
||||
# Use syslog for logging.
|
||||
# (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 (
|
||||
$sql_connection,
|
||||
|
@ -19,7 +29,6 @@ class cinder::base (
|
|||
$debug = false,
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL3',
|
||||
$syslog_log_level = 'WARNING',
|
||||
$log_dir = '/var/log/cinder',
|
||||
$idle_timeout = '3600',
|
||||
$max_pool_size = '10',
|
||||
|
@ -53,29 +62,6 @@ class cinder::base (
|
|||
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_paste_api_ini: }
|
||||
|
||||
|
@ -131,10 +117,33 @@ class cinder::base (
|
|||
tries => 10,
|
||||
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']
|
||||
Nova_config<||> -> 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::volume_service |>
|
||||
Exec['cinder-manage db_sync'] -> Service<| title == $::cinder::params::scheduler_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::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.
|
||||
# Optional. Default: 9191
|
||||
#
|
||||
# $log_file - The path of file used for logging
|
||||
# Optional. Default: /var/log/glance/api.log
|
||||
# [*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) 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.
|
||||
# Optional. Default: 0
|
||||
|
@ -39,44 +54,42 @@
|
|||
# $clean_minute - cron minute to launch glance-cache-cleaner.
|
||||
# Optional. Default: 0
|
||||
#
|
||||
# $use_syslog - Rather or not service should log to syslog. Optional.
|
||||
# Default: false
|
||||
#
|
||||
class glance::api(
|
||||
$keystone_password,
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$bind_host = '0.0.0.0',
|
||||
$bind_port = '9292',
|
||||
$backlog = '4096',
|
||||
$workers = $::processorcount,
|
||||
$log_file = '/var/log/glance/api.log',
|
||||
$registry_host = '0.0.0.0',
|
||||
$registry_port = '9191',
|
||||
$auth_type = 'keystone',
|
||||
$auth_host = '127.0.0.1',
|
||||
$auth_port = '35357',
|
||||
$auth_protocol = 'http',
|
||||
$auth_url = "http://127.0.0.1:5000/",
|
||||
$keystone_tenant = 'admin',
|
||||
$keystone_user = 'admin',
|
||||
$enabled = true,
|
||||
$idle_timeout = '3600',
|
||||
$max_pool_size = '10',
|
||||
$max_overflow = '30',
|
||||
$max_retries = '-1',
|
||||
$sql_connection = 'sqlite:///var/lib/glance/glance.sqlite',
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL2',
|
||||
$syslog_log_level = 'WARNING',
|
||||
$prune_hour = 0,
|
||||
$prune_minute = 0,
|
||||
$prune_ensure = 'present',
|
||||
$clean_hour = 1,
|
||||
$clean_minute = 0,
|
||||
$clean_ensure = 'present',
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$bind_host = '0.0.0.0',
|
||||
$bind_port = '9292',
|
||||
$backlog = '4096',
|
||||
$workers = $::processorcount,
|
||||
$log_file = '/var/log/glance/api.log',
|
||||
$log_dir = '/var/log/glance',
|
||||
$registry_host = '0.0.0.0',
|
||||
$registry_port = '9191',
|
||||
$auth_type = 'keystone',
|
||||
$auth_host = '127.0.0.1',
|
||||
$auth_port = '35357',
|
||||
$auth_protocol = 'http',
|
||||
$auth_url = "http://127.0.0.1:5000/",
|
||||
$keystone_tenant = 'admin',
|
||||
$keystone_user = 'admin',
|
||||
$enabled = true,
|
||||
$idle_timeout = '3600',
|
||||
$max_pool_size = '10',
|
||||
$max_overflow = '30',
|
||||
$max_retries = '-1',
|
||||
$sql_connection = 'sqlite:///var/lib/glance/glance.sqlite',
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL2',
|
||||
$prune_hour = 0,
|
||||
$prune_minute = 0,
|
||||
$prune_ensure = 'present',
|
||||
$clean_hour = 1,
|
||||
$clean_minute = 0,
|
||||
$clean_ensure = 'present',
|
||||
$image_cache_max_size = '10737418240',
|
||||
$notify_mech = 'noop',
|
||||
$notify_mech = 'noop',
|
||||
) inherits glance {
|
||||
|
||||
# used to configure concat
|
||||
|
@ -122,51 +135,83 @@ class glance::api(
|
|||
include "glance::notify::${notify_mech}"
|
||||
}
|
||||
|
||||
if $use_syslog and !$debug { #syslog and nondebug case
|
||||
# Logging
|
||||
if $log_file {
|
||||
glance_api_config {
|
||||
'DEFAULT/log_config': value => "/etc/glance/logging.conf";
|
||||
'DEFAULT/use_syslog': value => true;
|
||||
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
||||
'DEFAULT/log_file': value => $log_file;
|
||||
}
|
||||
if !defined(File["glance-logging.conf"]) {
|
||||
file {"glance-logging.conf":
|
||||
content => template('glance/logging.conf.erb'),
|
||||
path => "/etc/glance/logging.conf",
|
||||
notify => Service['glance-api'],
|
||||
}
|
||||
glance_cache_config {
|
||||
'DEFAULT/log_file': value => $log_file;
|
||||
}
|
||||
} else { #other syslog debug or nonsyslog debug/nondebug cases
|
||||
} else {
|
||||
glance_api_config {
|
||||
'DEFAULT/log_config': ensure=> absent;
|
||||
'DEFAULT/log_file':value=> $log_file;
|
||||
'DEFAULT/use_syslog': value => false;
|
||||
'DEFAULT/log_file': ensure => absent;
|
||||
}
|
||||
} #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
|
||||
glance_api_config {
|
||||
'DEFAULT/debug': value => $debug;
|
||||
'DEFAULT/verbose': value => $verbose;
|
||||
'DEFAULT/bind_host': value => $bind_host;
|
||||
'DEFAULT/bind_port': value => $bind_port;
|
||||
'DEFAULT/backlog': value => $backlog;
|
||||
'DEFAULT/workers': value => $workers;
|
||||
'DEFAULT/debug': value => $debug;
|
||||
'DEFAULT/verbose': value => $verbose;
|
||||
'DEFAULT/bind_host': value => $bind_host;
|
||||
'DEFAULT/bind_port': value => $bind_port;
|
||||
'DEFAULT/backlog': value => $backlog;
|
||||
'DEFAULT/workers': value => $workers;
|
||||
'DEFAULT/registry_client_protocol': value => "http";
|
||||
'DEFAULT/delayed_delete': value => "False";
|
||||
'DEFAULT/scrub_time': value => "43200";
|
||||
'DEFAULT/scrubber_datadir': value => "/var/lib/glance/scrubber";
|
||||
'DEFAULT/image_cache_dir': value => "/var/lib/glance/image-cache/";
|
||||
'DEFAULT/delayed_delete': value => "False";
|
||||
'DEFAULT/scrub_time': value => "43200";
|
||||
'DEFAULT/scrubber_datadir': value => "/var/lib/glance/scrubber";
|
||||
'DEFAULT/image_cache_dir': value => "/var/lib/glance/image-cache/";
|
||||
}
|
||||
|
||||
glance_cache_config {
|
||||
'DEFAULT/debug': value => $debug;
|
||||
'DEFAULT/verbose': value => $verbose;
|
||||
'DEFAULT/use_syslog': value => $use_syslog;
|
||||
'DEFAULT/image_cache_dir': value => "/var/lib/glance/image-cache/";
|
||||
'DEFAULT/log_file': value => "/var/log/glance/image-cache.log";
|
||||
'DEFAULT/image_cache_stall_time': value => "86400";
|
||||
'DEFAULT/image_cache_invalid_entry_grace_period': value => "3600";
|
||||
'DEFAULT/image_cache_max_size': value => $image_cache_max_size;
|
||||
'DEFAULT/debug': value => $debug;
|
||||
'DEFAULT/verbose': value => $verbose;
|
||||
'DEFAULT/image_cache_dir': value => "/var/lib/glance/image-cache/";
|
||||
'DEFAULT/image_cache_stall_time': value => "86400";
|
||||
'DEFAULT/image_cache_invalid_entry_grace_period':
|
||||
value => "3600";
|
||||
'DEFAULT/image_cache_max_size': value => $image_cache_max_size;
|
||||
'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(
|
||||
$keystone_password,
|
||||
|
@ -8,6 +24,7 @@ class glance::registry(
|
|||
$bind_host = '0.0.0.0',
|
||||
$bind_port = '9191',
|
||||
$log_file = '/var/log/glance/registry.log',
|
||||
$log_dir = '/var/log/glance',
|
||||
$sql_connection = 'sqlite:///var/lib/glance/glance.sqlite',
|
||||
$sql_idle_timeout = '3600',
|
||||
$auth_type = 'keystone',
|
||||
|
@ -20,7 +37,6 @@ class glance::registry(
|
|||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL2',
|
||||
$idle_timeout = '3600',
|
||||
$syslog_log_level = 'WARNING',
|
||||
$max_pool_size = '10',
|
||||
$max_overflow = '30',
|
||||
$max_retries = '-1',
|
||||
|
@ -35,26 +51,39 @@ File {
|
|||
require => Class['glance']
|
||||
}
|
||||
|
||||
if $use_syslog and !$debug { #syslog and nondebug case
|
||||
glance_registry_config {
|
||||
'DEFAULT/log_config': value => "/etc/glance/logging.conf";
|
||||
'DEFAULT/use_syslog': value => true;
|
||||
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
||||
}
|
||||
if !defined(File["glance-logging.conf"]) {
|
||||
file {"glance-logging.conf":
|
||||
content => template('glance/logging.conf.erb'),
|
||||
path => "/etc/glance/logging.conf",
|
||||
notify => Service['glance-registry'],
|
||||
# Logging
|
||||
if $log_file {
|
||||
glance_registry_config {
|
||||
'DEFAULT/log_file': value => $log_file;
|
||||
}
|
||||
} else {
|
||||
glance_registry_config {
|
||||
'DEFAULT/log_file': ensure => absent;
|
||||
}
|
||||
}
|
||||
} else { #other syslog debug or nonsyslog debug/nondebug cases
|
||||
glance_registry_config {
|
||||
'DEFAULT/log_config' : ensure => absent;
|
||||
'DEFAULT/log_file': value=>$log_file;
|
||||
'DEFAULT/use_syslog': value => false;
|
||||
|
||||
if $log_dir {
|
||||
glance_registry_config {
|
||||
'DEFAULT/log_dir': value => $log_dir;
|
||||
}
|
||||
} 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'
|
||||
|
||||
|
|
|
@ -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,
|
||||
}
|
||||
|
||||
$logging_file = '/etc/heat/logging.conf'
|
||||
if $use_syslog and !$debug { #syslog and nondebug case
|
||||
# Log configuration
|
||||
if $log_dir {
|
||||
heat_config {
|
||||
'DEFAULT/log_config' : value => $logging_file;
|
||||
'DEFAULT/use_syslog' : value => true;
|
||||
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
||||
'DEFAULT/log_dir' : value => $log_dir;
|
||||
}
|
||||
file {"heat-logging.conf":
|
||||
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
|
||||
} else {
|
||||
heat_config {
|
||||
'DEFAULT/log_config' : ensure => absent;
|
||||
'DEFAULT/log_dir' : value => $log_dir;
|
||||
'DEFAULT/use_syslog' : value => false;
|
||||
'DEFAULT/log_dir' : ensure => absent;
|
||||
}
|
||||
}
|
||||
|
||||
# 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/rpc_backend' : value => $rpc_backend;
|
||||
'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_userid' : value => $amqp_user;
|
||||
'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.
|
||||
# Defaults to false.
|
||||
# [syslog_log_facility] Facility for syslog, if used. Optional.
|
||||
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
|
||||
# [*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.
|
||||
# Defaults to sql. (Also accepts template)
|
||||
# [token_format] Format keystone uses for tokens. Optional. Defaults to UUID (PKI is grizzly native mode though).
|
||||
|
@ -51,30 +54,27 @@
|
|||
#
|
||||
class keystone(
|
||||
$admin_token,
|
||||
$package_ensure = 'present',
|
||||
$bind_host = '0.0.0.0',
|
||||
$public_port = '5000',
|
||||
$admin_port = '35357',
|
||||
$compute_port = '3000',
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL7',
|
||||
$syslog_log_level = 'WARNING',
|
||||
$log_dir = '/var/log/keystone',
|
||||
$log_file = 'keystone.log',
|
||||
$catalog_type = 'sql',
|
||||
$token_format = 'UUID',
|
||||
# $token_format = 'PKI',
|
||||
$cache_dir = '/var/cache/keystone',
|
||||
$memcache_servers = false,
|
||||
$package_ensure = 'present',
|
||||
$bind_host = '0.0.0.0',
|
||||
$public_port = '5000',
|
||||
$admin_port = '35357',
|
||||
$compute_port = '3000',
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL7',
|
||||
$log_dir = '/var/log/keystone',
|
||||
$catalog_type = 'sql',
|
||||
$token_format = 'UUID',
|
||||
$cache_dir = '/var/cache/keystone',
|
||||
$memcache_servers = false,
|
||||
$memcache_server_port = false,
|
||||
$enabled = true,
|
||||
$sql_connection = 'sqlite:////var/lib/keystone/keystone.db',
|
||||
$idle_timeout = '200',
|
||||
$max_pool_size = '10',
|
||||
$max_overflow = '30',
|
||||
$max_retries = '-1',
|
||||
$enabled = true,
|
||||
$sql_connection = 'sqlite:////var/lib/keystone/keystone.db',
|
||||
$idle_timeout = '200',
|
||||
$max_pool_size = '10',
|
||||
$max_overflow = '30',
|
||||
$max_retries = '-1',
|
||||
) {
|
||||
|
||||
validate_re($catalog_type, 'template|sql')
|
||||
|
@ -92,25 +92,14 @@ class keystone(
|
|||
require => Package['keystone'],
|
||||
}
|
||||
|
||||
if $use_syslog and !$debug { #syslog and nondebug case
|
||||
# logging config
|
||||
if $log_dir {
|
||||
keystone_config {
|
||||
'DEFAULT/log_config': value => "/etc/keystone/logging.conf";
|
||||
'DEFAULT/use_syslog': value => true;
|
||||
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
||||
'DEFAULT/log_dir': value => $log_dir;
|
||||
}
|
||||
file {"keystone-logging.conf":
|
||||
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
|
||||
} else {
|
||||
keystone_config {
|
||||
'DEFAULT/log_config': ensure=> absent;
|
||||
'DEFAULT/log_dir':value=> $log_dir;
|
||||
'DEFAULT/log_file': value => $log_file;
|
||||
'DEFAULT/use_syslog': value => false;
|
||||
'DEFAULT/log_dir': ensure => absent;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -306,4 +295,17 @@ class 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/',
|
||||
port => 514,
|
||||
high_precision_timestamps => true,
|
||||
virtual => str2bool($::is_virtual),
|
||||
}
|
||||
|
||||
class {"::openstack::logrotate":
|
||||
|
|
|
@ -64,12 +64,6 @@ class neutron::agents::dhcp (
|
|||
neutron_dhcp_agent_config {
|
||||
'DEFAULT/debug': value => $debug;
|
||||
'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/interface_driver': value => $interface_driver;
|
||||
'DEFAULT/dhcp_driver': value => $dhcp_driver;
|
||||
|
@ -107,7 +101,6 @@ class neutron::agents::dhcp (
|
|||
Package['pacemaker'] -> File['neutron-dhcp-agent-ocf']
|
||||
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<| title == 'neutron-logging.conf' |> -> Cs_resource["p_${::neutron::params::dhcp_agent_service}"]
|
||||
File<| title == 'ocf-mirantis-path' |> -> File['neutron-dhcp-agent-ocf']
|
||||
Anchor['neutron-dhcp-agent'] -> File['neutron-dhcp-agent-ocf']
|
||||
Neutron_config <| |> -> File['neutron-dhcp-agent-ocf']
|
||||
|
@ -221,7 +214,6 @@ class neutron::agents::dhcp (
|
|||
} else {
|
||||
Neutron_config <| |> ~> Service['neutron-dhcp-service']
|
||||
Neutron_dhcp_agent_config <| |> ~> Service['neutron-dhcp-service']
|
||||
File<| title=='neutron-logging.conf' |> ->
|
||||
service { 'neutron-dhcp-service':
|
||||
name => $::neutron::params::dhcp_agent_service,
|
||||
enable => true,
|
||||
|
|
|
@ -49,12 +49,6 @@ class neutron::agents::l3 (
|
|||
neutron_l3_agent_config {
|
||||
'DEFAULT/debug': value => $debug;
|
||||
'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/handle_internal_only_routers': value => false;
|
||||
'DEFAULT/root_helper': value => $neutron_config['root_helper'];
|
||||
|
|
|
@ -23,11 +23,6 @@ class neutron::agents::metadata (
|
|||
neutron_metadata_agent_config {
|
||||
'DEFAULT/debug': value => $debug;
|
||||
'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_url': value => $neutron_config['keystone']['auth_url'];
|
||||
'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_commit { $cib_name: cib => $cib_name }
|
||||
|
||||
File<| title=='neutron-logging.conf' |> ->
|
||||
cs_resource { "$res_name":
|
||||
ensure => present,
|
||||
cib => $cib_name,
|
||||
|
|
|
@ -1,7 +1,21 @@
|
|||
#
|
||||
# [use_syslog] Rather or not service should log to syslog. Optional.
|
||||
# [syslog_log_facility] Facility for syslog, if used. Optional.
|
||||
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
|
||||
# TODO(bogdando) move logging options to the neutron_config hash as well
|
||||
# [*use_syslog*]
|
||||
# (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 (
|
||||
$neutron_config = {},
|
||||
|
@ -14,7 +28,6 @@ class neutron (
|
|||
$log_dir = '/var/log/neutron',
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL4',
|
||||
$syslog_log_level = 'WARNING',
|
||||
$ssh_private_key = '/var/lib/astute/neutron/neutron',
|
||||
$ssh_public_key = '/var/lib/astute/neutron/neutron.pub',
|
||||
$server_ha_mode = false,
|
||||
|
@ -64,6 +77,38 @@ class neutron (
|
|||
owner => 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'] {
|
||||
'rabbitmq': {
|
||||
neutron_config {
|
||||
|
@ -106,34 +151,28 @@ class neutron (
|
|||
}
|
||||
|
||||
neutron_config {
|
||||
'DEFAULT/debug': value => $debug;
|
||||
'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': value => false;
|
||||
'DEFAULT/use_stderr': value => true;
|
||||
'DEFAULT/publish_errors': value => false;
|
||||
'DEFAULT/auth_strategy': value => $auth_strategy;
|
||||
'DEFAULT/core_plugin': value => $core_plugin;
|
||||
'DEFAULT/bind_host': value => $server_bind_host;
|
||||
'DEFAULT/bind_port': value => $neutron_config['server']['bind_port'];
|
||||
'DEFAULT/base_mac': value => $neutron_config['L2']['base_mac'];
|
||||
'DEFAULT/mac_generation_retries': value => $neutron_config['L2']['mac_generation_retries'];
|
||||
'DEFAULT/dhcp_lease_duration': value => $neutron_config['L3']['dhcp_agent']['lease_duration'];
|
||||
'DEFAULT/allow_bulk': value => $neutron_config['server']['allow_bulk'];
|
||||
'DEFAULT/allow_overlapping_ips': value => $neutron_config['L3']['allow_overlapping_ips'];
|
||||
'DEFAULT/control_exchange': value => $neutron_config['server']['control_exchange'];
|
||||
'DEFAULT/network_auto_schedule': value => $neutron_config['L3']['network_auto_schedule'];
|
||||
'DEFAULT/router_auto_schedule': value => $neutron_config['L3']['router_auto_schedule'];
|
||||
'DEFAULT/agent_down_time': value => $neutron_config['server']['agent_down_time'];
|
||||
'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'];
|
||||
'DEFAULT/debug': value => $debug;
|
||||
'DEFAULT/verbose': value => $verbose;
|
||||
'DEFAULT/publish_errors': value => false;
|
||||
'DEFAULT/auth_strategy': value => $auth_strategy;
|
||||
'DEFAULT/core_plugin': value => $core_plugin;
|
||||
'DEFAULT/bind_host': value => $server_bind_host;
|
||||
'DEFAULT/bind_port': value => $neutron_config['server']['bind_port'];
|
||||
'DEFAULT/base_mac': value => $neutron_config['L2']['base_mac'];
|
||||
'DEFAULT/mac_generation_retries': value => $neutron_config['L2']['mac_generation_retries'];
|
||||
'DEFAULT/dhcp_lease_duration': value => $neutron_config['L3']['dhcp_agent']['lease_duration'];
|
||||
'DEFAULT/allow_bulk': value => $neutron_config['server']['allow_bulk'];
|
||||
'DEFAULT/allow_overlapping_ips': value => $neutron_config['L3']['allow_overlapping_ips'];
|
||||
'DEFAULT/control_exchange': value => $neutron_config['server']['control_exchange'];
|
||||
'DEFAULT/network_auto_schedule': value => $neutron_config['L3']['network_auto_schedule'];
|
||||
'DEFAULT/router_auto_schedule': value => $neutron_config['L3']['router_auto_schedule'];
|
||||
'DEFAULT/agent_down_time': value => $neutron_config['server']['agent_down_time'];
|
||||
'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_port': value => $neutron_config['keystone']['auth_port'];
|
||||
'keystone_authtoken/auth_protocol': value => $neutron_config['keystone']['auth_protocol'];
|
||||
|
|
|
@ -115,7 +115,6 @@ class neutron::server (
|
|||
|
||||
anchor {'neutron-server-config-done':}
|
||||
|
||||
File<| title=='neutron-logging.conf' |> ->
|
||||
service {'neutron-server':
|
||||
name => $::neutron::params::server_service,
|
||||
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'.
|
||||
# [state_path] Directory for storing state. Optional. Defaults to '/var/lib/nova'.
|
||||
# [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.
|
||||
# [periodic_interval] Seconds between running periodic tasks. Optional.
|
||||
# Defaults to '60'.
|
||||
|
@ -33,46 +33,44 @@
|
|||
# add rabbit nodes hostname
|
||||
# [use_syslog] Rather or not service should log to syslog. 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(
|
||||
$ensure_package = 'present',
|
||||
$ensure_package = 'present',
|
||||
# this is how to query all resources from our clutser
|
||||
$nova_cluster_id='localcluster',
|
||||
$sql_connection = false,
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL6',
|
||||
$syslog_log_level = 'WARNING',
|
||||
$image_service = 'nova.image.glance.GlanceImageService',
|
||||
$nova_cluster_id ='localcluster',
|
||||
$sql_connection = false,
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL6',
|
||||
$image_service = 'nova.image.glance.GlanceImageService',
|
||||
# these glance params should be optional
|
||||
# this should probably just be configured as a glance client
|
||||
$glance_api_servers = 'localhost:9292',
|
||||
$glance_api_servers = 'localhost:9292',
|
||||
# RPC
|
||||
$queue_provider = 'rabbitmq',
|
||||
$amqp_hosts = 'localhost',
|
||||
$amqp_user = 'guest',
|
||||
$amqp_password = 'guest',
|
||||
$rabbit_ha_queues = false,
|
||||
$rabbit_virtual_host='/',
|
||||
$auth_strategy = 'keystone',
|
||||
$service_down_time = 60,
|
||||
$logdir = '/var/log/nova',
|
||||
$state_path = '/var/lib/nova',
|
||||
$lock_path = $::nova::params::lock_path,
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$periodic_interval = '60',
|
||||
$report_interval = '10',
|
||||
$root_wrap_config = '/etc/nova/rootwrap.conf',
|
||||
$queue_provider = 'rabbitmq',
|
||||
$amqp_hosts = 'localhost',
|
||||
$amqp_user = 'guest',
|
||||
$amqp_password = 'guest',
|
||||
$rabbit_ha_queues = false,
|
||||
$rabbit_virtual_host = '/',
|
||||
$auth_strategy = 'keystone',
|
||||
$service_down_time = 60,
|
||||
$logdir = '/var/log/nova',
|
||||
$state_path = '/var/lib/nova',
|
||||
$lock_path = $::nova::params::lock_path,
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$periodic_interval = '60',
|
||||
$report_interval = '10',
|
||||
$root_wrap_config = '/etc/nova/rootwrap.conf',
|
||||
# deprecated in folsom
|
||||
#$root_helper = $::nova::params::root_helper,
|
||||
$monitoring_notifications = false,
|
||||
$api_bind_address = '0.0.0.0',
|
||||
$remote_syslog_server = '127.0.0.1',
|
||||
$idle_timeout = '3600',
|
||||
$max_pool_size = '10',
|
||||
$max_overflow = '30',
|
||||
$max_retries = '-1',
|
||||
$monitoring_notifications = false,
|
||||
$api_bind_address = '0.0.0.0',
|
||||
$remote_syslog_server = '127.0.0.1',
|
||||
$idle_timeout = '3600',
|
||||
$max_pool_size = '10',
|
||||
$max_overflow = '30',
|
||||
$max_retries = '-1',
|
||||
) inherits nova::params {
|
||||
|
||||
# all nova_config resources should be applied
|
||||
|
@ -141,39 +139,23 @@ class nova(
|
|||
require => Package['nova-common'],
|
||||
}
|
||||
|
||||
#Configure logging in nova.conf
|
||||
if $use_syslog and !$debug { #syslog and nondebug case
|
||||
nova_config {
|
||||
'DEFAULT/log_config': value => "/etc/nova/logging.conf";
|
||||
'DEFAULT/use_syslog': value => true;
|
||||
'DEFAULT/syslog_log_facility': value => $syslog_log_facility;
|
||||
# Syslog configuration
|
||||
if $use_syslog {
|
||||
nova_config {
|
||||
'DEFAULT/use_syslog': value => true;
|
||||
'DEFAULT/use_syslog_rfc_format': value => true;
|
||||
'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:
|
||||
ensure => directory,
|
||||
mode => '0751',
|
||||
}
|
||||
file { "${logdir}/nova.log":
|
||||
ensure => present,
|
||||
mode => '0640',
|
||||
require => [Package['nova-common'], File[$logdir]],
|
||||
}
|
||||
file { '/etc/nova/nova.conf':
|
||||
mode => '0640',
|
||||
}
|
||||
|
@ -243,6 +225,7 @@ if $use_syslog and !$debug { #syslog and nondebug case
|
|||
nova_config {
|
||||
'DEFAULT/debug': value => $debug;
|
||||
'DEFAULT/verbose': value => $verbose;
|
||||
'DEFAULT/logdir': value => $logdir;
|
||||
# Following may need to be broken out to different nova services
|
||||
'DEFAULT/state_path': value => $state_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',
|
||||
$verbose = false,
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL0',
|
||||
$debug = false,
|
||||
$db_type = 'mysql',
|
||||
$db_host = 'localhost',
|
||||
|
@ -35,16 +36,17 @@ class openstack::ceilometer (
|
|||
# This class is required by ceilometer agents & api classes
|
||||
# The metering_secret parameter is mandatory
|
||||
class { '::ceilometer':
|
||||
package_ensure => $::openstack_version['ceilometer'],
|
||||
queue_provider => $queue_provider,
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $amqp_user,
|
||||
amqp_password => $amqp_password,
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
metering_secret => $metering_secret,
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
use_syslog => $use_syslog,
|
||||
package_ensure => $::openstack_version['ceilometer'],
|
||||
queue_provider => $queue_provider,
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $amqp_user,
|
||||
amqp_password => $amqp_password,
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
metering_secret => $metering_secret,
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
}
|
||||
|
||||
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'}
|
||||
|
||||
case $operatingsystem {
|
||||
/(?i)(centos|redhat)/ : {
|
||||
exec { "checksum_fill_udp514":
|
||||
command => "iptables -t mangle -A POSTROUTING -p udp --dport 514 -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\""
|
||||
exec { "checksum_fill_udp":
|
||||
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 ${port} -j CHECKSUM --checksum-fill\""
|
||||
}
|
||||
}
|
||||
/(?i)(debian|ubuntu)/ : {
|
||||
exec { "checksum_fill_udp514":
|
||||
command => "iptables -t mangle -A POSTROUTING -p udp --dport 514 -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\""
|
||||
exec { "checksum_fill_udp":
|
||||
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 ${port} -j CHECKSUM --checksum-fill\""
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
# [use_syslog] Rather or not service should log to syslog. Optional. Defaults to false.
|
||||
# [syslog_log_facility] Facility for syslog, if used. Optional. Note: duplicating conf option
|
||||
# wouldn't have been used, but more powerfull rsyslog features managed via conf template instead
|
||||
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
|
||||
|
||||
class openstack::cinder(
|
||||
$sql_connection,
|
||||
|
@ -22,7 +21,6 @@ class openstack::cinder(
|
|||
$iscsi_bind_host = '0.0.0.0',
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL3',
|
||||
$syslog_log_level = 'WARNING',
|
||||
$cinder_rate_limits = undef,
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
|
@ -63,7 +61,6 @@ class openstack::cinder(
|
|||
verbose => $verbose,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
debug => $debug,
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
|
|
|
@ -36,7 +36,7 @@
|
|||
# Defaults to false. False indicates that a vnc proxy should not be configured.
|
||||
# [vnc_enabled] Rather vnc console should be enabled.
|
||||
# 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.
|
||||
# [manage_volumes] Rather nova-volume should be enabled on this compute node.
|
||||
# Optional. Defaults to false.
|
||||
|
@ -45,7 +45,6 @@
|
|||
# [use_syslog] Rather or not service should log to syslog. Optional.
|
||||
# [syslog_log_facility] Facility for syslog, if used. Optional. Note: duplicating conf option
|
||||
# wouldn't have been used, but more powerfull rsyslog features managed via conf template instead
|
||||
# [syslog_log_level] logging level for 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_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,
|
||||
# Network
|
||||
# DB
|
||||
$sql_connection = false,
|
||||
$sql_connection = false,
|
||||
# Nova
|
||||
$purge_nova_config = false,
|
||||
$purge_nova_config = false,
|
||||
# RPC
|
||||
$queue_provider = 'rabbitmq',
|
||||
$amqp_hosts = false,
|
||||
$amqp_user = 'nova',
|
||||
$amqp_password = 'rabbit_pw',
|
||||
$rabbit_ha_queues = false,
|
||||
$queue_provider = 'rabbitmq',
|
||||
$amqp_hosts = false,
|
||||
$amqp_user = 'nova',
|
||||
$amqp_password = 'rabbit_pw',
|
||||
$rabbit_ha_queues = false,
|
||||
# Glance
|
||||
$glance_api_servers = undef,
|
||||
$glance_api_servers = undef,
|
||||
# Virtualization
|
||||
$libvirt_type = 'kvm',
|
||||
$libvirt_type = 'kvm',
|
||||
# VNC
|
||||
$vnc_enabled = true,
|
||||
$vncproxy_host = undef,
|
||||
$vncserver_listen = $internal_address,
|
||||
$vnc_enabled = true,
|
||||
$vncproxy_host = undef,
|
||||
$vncserver_listen = $internal_address,
|
||||
# General
|
||||
$enabled = true,
|
||||
$multi_host = false,
|
||||
$auto_assign_floating_ip = false,
|
||||
$network_config = {},
|
||||
$enabled = true,
|
||||
$multi_host = false,
|
||||
$auto_assign_floating_ip = false,
|
||||
$network_config = {},
|
||||
$public_interface,
|
||||
$private_interface,
|
||||
$network_manager,
|
||||
$fixed_range = undef,
|
||||
$fixed_range = undef,
|
||||
# Quantum
|
||||
$quantum = false,
|
||||
$quantum_config = {},
|
||||
$quantum = false,
|
||||
$quantum_config = {},
|
||||
# Ceilometer
|
||||
$ceilometer_user_password = 'ceilometer_pass',
|
||||
$ceilometer_user_password = 'ceilometer_pass',
|
||||
# nova compute configuration parameters
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$service_endpoint = '127.0.0.1',
|
||||
$ssh_private_key = '/var/lib/astute/nova/nova',
|
||||
$ssh_public_key = '/var/lib/astute/nova/nova.pub',
|
||||
$cache_server_ip = ['127.0.0.1'],
|
||||
$cache_server_port = '11211',
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$service_endpoint = '127.0.0.1',
|
||||
$ssh_private_key = '/var/lib/astute/nova/nova',
|
||||
$ssh_public_key = '/var/lib/astute/nova/nova.pub',
|
||||
$cache_server_ip = ['127.0.0.1'],
|
||||
$cache_server_port = '11211',
|
||||
# if the cinder management components should be installed
|
||||
$manage_volumes = false,
|
||||
$nv_physical_volume = undef,
|
||||
$cinder_volume_group = 'cinder-volumes',
|
||||
$cinder = true,
|
||||
$cinder_user_password = 'cinder_user_pass',
|
||||
$cinder_db_password = 'cinder_db_pass',
|
||||
$cinder_db_user = 'cinder',
|
||||
$cinder_db_dbname = 'cinder',
|
||||
$cinder_iscsi_bind_addr = false,
|
||||
$db_host = '127.0.0.1',
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL6',
|
||||
$syslog_log_facility_cinder = 'LOG_LOCAL3',
|
||||
$syslog_log_facility_neutron = 'LOG_LOCAL4',
|
||||
$syslog_log_level = 'WARNING',
|
||||
$nova_rate_limits = undef,
|
||||
$nova_report_interval = '10',
|
||||
$nova_service_down_time = '60',
|
||||
$cinder_rate_limits = undef,
|
||||
$create_networks = false,
|
||||
$state_path = '/var/lib/nova',
|
||||
$ceilometer = false,
|
||||
$ceilometer_metering_secret = "ceilometer",
|
||||
$manage_volumes = false,
|
||||
$nv_physical_volume = undef,
|
||||
$cinder_volume_group = 'cinder-volumes',
|
||||
$cinder = true,
|
||||
$cinder_user_password = 'cinder_user_pass',
|
||||
$cinder_db_password = 'cinder_db_pass',
|
||||
$cinder_db_user = 'cinder',
|
||||
$cinder_db_dbname = 'cinder',
|
||||
$cinder_iscsi_bind_addr = false,
|
||||
$db_host = '127.0.0.1',
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL6',
|
||||
$syslog_log_facility_neutron = 'LOG_LOCAL4',
|
||||
$syslog_log_facility_ceilometer = 'LOG_LOCAL0',
|
||||
$nova_rate_limits = undef,
|
||||
$nova_report_interval = '10',
|
||||
$nova_service_down_time = '60',
|
||||
$cinder_rate_limits = undef,
|
||||
$create_networks = false,
|
||||
$state_path = '/var/lib/nova',
|
||||
$ceilometer = false,
|
||||
$ceilometer_metering_secret = "ceilometer",
|
||||
) {
|
||||
|
||||
#
|
||||
|
@ -188,7 +186,6 @@ class openstack::compute (
|
|||
debug => $debug,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
api_bind_address => $internal_address,
|
||||
state_path => $state_path,
|
||||
report_interval => $nova_report_interval,
|
||||
|
@ -248,17 +245,18 @@ class openstack::compute (
|
|||
# configure ceilometer compute agent
|
||||
if ($ceilometer) {
|
||||
class { 'openstack::ceilometer':
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
use_syslog => $use_syslog,
|
||||
queue_provider => $queue_provider,
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $amqp_user,
|
||||
amqp_password => $amqp_password,
|
||||
keystone_host => $service_endpoint,
|
||||
keystone_password => $ceilometer_user_password,
|
||||
on_compute => true,
|
||||
metering_secret => $ceilometer_metering_secret,
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility_ceilometer,
|
||||
queue_provider => $queue_provider,
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $amqp_user,
|
||||
amqp_password => $amqp_password,
|
||||
keystone_host => $service_endpoint,
|
||||
keystone_password => $ceilometer_user_password,
|
||||
on_compute => true,
|
||||
metering_secret => $ceilometer_metering_secret,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -332,7 +330,6 @@ class openstack::compute (
|
|||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
syslog_log_facility => $syslog_log_facility_neutron,
|
||||
}
|
||||
|
||||
|
|
|
@ -30,8 +30,7 @@
|
|||
# Defaults to false.
|
||||
# [network_config] Hash that can be used to pass implementation specifc
|
||||
# network settings. Optioal. Defaults to {}
|
||||
# [verbose] Rather to print more verbose (INFO+) output. If non verbose and non debug, would give
|
||||
# syslog_log_level (default is WARNING) output. Optional. Defaults to false.
|
||||
# [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.
|
||||
# [export_resources] Rather to export resources.
|
||||
|
@ -51,7 +50,6 @@
|
|||
# [use_syslog] Rather or not service should log to syslog. Optional. Defaults to false.
|
||||
# [syslog_log_facility] Facility for syslog, if used. Optional. Note: duplicating conf option
|
||||
# wouldn't have been used, but more powerfull rsyslog features managed via conf template instead
|
||||
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
|
||||
# [max_retries] number of reconnects to Sqlalchemy db backend. Defaults -1.
|
||||
# [max_pool_size] QueuePool setting for Sqlalchemy db backend. Defaults 10.
|
||||
# [max_overflow] QueuePool setting for Sqlalchemy db backend. Defaults 30.
|
||||
|
@ -80,129 +78,129 @@ class openstack::controller (
|
|||
$public_interface,
|
||||
$private_interface,
|
||||
# Required Database
|
||||
$mysql_root_password = 'sql_pass',
|
||||
$custom_mysql_setup_class= undef,
|
||||
$admin_email = 'some_user@some_fake_email_address.foo',
|
||||
$admin_user = 'admin',
|
||||
$admin_password = 'ChangeMe',
|
||||
$keystone_db_password = 'keystone_pass',
|
||||
$keystone_admin_token = 'keystone_admin_token',
|
||||
$mysql_root_password = 'sql_pass',
|
||||
$custom_mysql_setup_class = undef,
|
||||
$admin_email = 'some_user@some_fake_email_address.foo',
|
||||
$admin_user = 'admin',
|
||||
$admin_password = 'ChangeMe',
|
||||
$keystone_db_password = 'keystone_pass',
|
||||
$keystone_admin_token = 'keystone_admin_token',
|
||||
# Required Glance
|
||||
$glance_db_password = 'glance_pass',
|
||||
$glance_user_password = 'glance_pass',
|
||||
$glance_db_password = 'glance_pass',
|
||||
$glance_user_password = 'glance_pass',
|
||||
# Required Nova
|
||||
$nova_db_password = 'nova_pass',
|
||||
$nova_user_password = 'nova_pass',
|
||||
$nova_db_password = 'nova_pass',
|
||||
$nova_user_password = 'nova_pass',
|
||||
# Required Ceilometer
|
||||
$ceilometer = false,
|
||||
$ceilometer_db_password = 'ceilometer_pass',
|
||||
$ceilometer_user_password = 'ceilometer_pass',
|
||||
$ceilometer_db_user = 'ceilometer',
|
||||
$ceilometer_db_dbname = 'ceilometer',
|
||||
$ceilometer_metering_secret = 'ceilometer',
|
||||
$ceilometer_db_type = 'mongodb',
|
||||
$ceilometer_db_host = '127.0.0.1',
|
||||
$ceilometer = false,
|
||||
$ceilometer_db_password = 'ceilometer_pass',
|
||||
$ceilometer_user_password = 'ceilometer_pass',
|
||||
$ceilometer_db_user = 'ceilometer',
|
||||
$ceilometer_db_dbname = 'ceilometer',
|
||||
$ceilometer_metering_secret = 'ceilometer',
|
||||
$ceilometer_db_type = 'mongodb',
|
||||
$ceilometer_db_host = '127.0.0.1',
|
||||
# Required Horizon
|
||||
$secret_key = 'dummy_secret_key',
|
||||
$secret_key = 'dummy_secret_key',
|
||||
# not sure if this works correctly
|
||||
$internal_address,
|
||||
$admin_address,
|
||||
# RPC
|
||||
$queue_provider = 'rabbitmq',
|
||||
$amqp_hosts = '127.0.0.1',
|
||||
$amqp_user = 'nova',
|
||||
$amqp_password = 'rabbit_pw',
|
||||
$rabbit_ha_queues = false,
|
||||
$rabbitmq_bind_ip_address = 'UNSET',
|
||||
$rabbitmq_bind_port = '5672',
|
||||
$rabbitmq_cluster_nodes = [],
|
||||
$rabbit_cluster = false,
|
||||
$queue_provider = 'rabbitmq',
|
||||
$amqp_hosts = '127.0.0.1',
|
||||
$amqp_user = 'nova',
|
||||
$amqp_password = 'rabbit_pw',
|
||||
$rabbit_ha_queues = false,
|
||||
$rabbitmq_bind_ip_address = 'UNSET',
|
||||
$rabbitmq_bind_port = '5672',
|
||||
$rabbitmq_cluster_nodes = [],
|
||||
$rabbit_cluster = false,
|
||||
# network configuration
|
||||
# this assumes that it is a flat network manager
|
||||
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||
$fixed_range = '10.0.0.0/24',
|
||||
$floating_range = false,
|
||||
$create_networks = true,
|
||||
$num_networks = 1,
|
||||
$network_size = 255,
|
||||
$multi_host = false,
|
||||
$auto_assign_floating_ip = false,
|
||||
$network_config = {},
|
||||
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||
$fixed_range = '10.0.0.0/24',
|
||||
$floating_range = false,
|
||||
$create_networks = true,
|
||||
$num_networks = 1,
|
||||
$network_size = 255,
|
||||
$multi_host = false,
|
||||
$auto_assign_floating_ip = false,
|
||||
$network_config = {},
|
||||
# Database
|
||||
$db_host = '127.0.0.1',
|
||||
$db_type = 'mysql',
|
||||
$mysql_account_security = true,
|
||||
$mysql_bind_address = '0.0.0.0',
|
||||
$allowed_hosts = [ '%', $::hostname ],
|
||||
$db_host = '127.0.0.1',
|
||||
$db_type = 'mysql',
|
||||
$mysql_account_security = true,
|
||||
$mysql_bind_address = '0.0.0.0',
|
||||
$allowed_hosts = [ '%', $::hostname ],
|
||||
# Keystone
|
||||
$keystone_db_user = 'keystone',
|
||||
$keystone_db_dbname = 'keystone',
|
||||
$keystone_admin_tenant = 'admin',
|
||||
$keystone_db_user = 'keystone',
|
||||
$keystone_db_dbname = 'keystone',
|
||||
$keystone_admin_tenant = 'admin',
|
||||
# Glance
|
||||
$glance_db_user = 'glance',
|
||||
$glance_db_dbname = 'glance',
|
||||
$glance_api_servers = undef,
|
||||
$glance_image_cache_max_size = '10737418240',
|
||||
$glance_db_user = 'glance',
|
||||
$glance_db_dbname = 'glance',
|
||||
$glance_api_servers = undef,
|
||||
$glance_image_cache_max_size = '10737418240',
|
||||
# Nova
|
||||
$nova_db_user = 'nova',
|
||||
$nova_db_dbname = 'nova',
|
||||
$purge_nova_config = false,
|
||||
$nova_report_interval = '10',
|
||||
$nova_service_down_time = '60',
|
||||
$nova_db_user = 'nova',
|
||||
$nova_db_dbname = 'nova',
|
||||
$purge_nova_config = false,
|
||||
$nova_report_interval = '10',
|
||||
$nova_service_down_time = '60',
|
||||
|
||||
# Horizon
|
||||
$cache_server_ip = ['127.0.0.1'],
|
||||
$cache_server_port = '11211',
|
||||
$swift = false,
|
||||
$cinder = true,
|
||||
$horizon_app_links = undef,
|
||||
$cache_server_ip = ['127.0.0.1'],
|
||||
$cache_server_port = '11211',
|
||||
$swift = false,
|
||||
$cinder = true,
|
||||
$horizon_app_links = undef,
|
||||
# General
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$export_resources = true,
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$export_resources = true,
|
||||
# if the cinder management components should be installed
|
||||
$cinder_user_password = 'cinder_user_pass',
|
||||
$cinder_db_password = 'cinder_db_pass',
|
||||
$cinder_db_user = 'cinder',
|
||||
$cinder_db_dbname = 'cinder',
|
||||
$cinder_iscsi_bind_addr = false,
|
||||
$cinder_volume_group = 'cinder-volumes',
|
||||
$cinder_user_password = 'cinder_user_pass',
|
||||
$cinder_db_password = 'cinder_db_pass',
|
||||
$cinder_db_user = 'cinder',
|
||||
$cinder_db_dbname = 'cinder',
|
||||
$cinder_iscsi_bind_addr = false,
|
||||
$cinder_volume_group = 'cinder-volumes',
|
||||
#
|
||||
$quantum = false,
|
||||
$quantum_config = {},
|
||||
$quantum_network_node = false,
|
||||
$quantum_netnode_on_cnt = false,
|
||||
$segment_range = '1:4094',
|
||||
$tenant_network_type = 'gre',
|
||||
$enabled = true,
|
||||
$api_bind_address = '0.0.0.0',
|
||||
$service_endpoint = '127.0.0.1',
|
||||
$galera_cluster_name = 'openstack',
|
||||
$primary_controller = false,
|
||||
$galera_node_address = '127.0.0.1',
|
||||
$glance_backend = 'file',
|
||||
$galera_nodes = ['127.0.0.1'],
|
||||
$novnc_address = '127.0.0.1',
|
||||
$mysql_skip_name_resolve = false,
|
||||
$manage_volumes = false,
|
||||
$nv_physical_volume = undef,
|
||||
$use_syslog = false,
|
||||
$syslog_log_level = 'WARNING',
|
||||
$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',
|
||||
$horizon_use_ssl = false,
|
||||
$nova_rate_limits = undef,
|
||||
$cinder_rate_limits = undef,
|
||||
$ha_mode = false,
|
||||
$nameservers = undef,
|
||||
$quantum = false,
|
||||
$quantum_config = {},
|
||||
$quantum_network_node = false,
|
||||
$quantum_netnode_on_cnt = false,
|
||||
$segment_range = '1:4094',
|
||||
$tenant_network_type = 'gre',
|
||||
$enabled = true,
|
||||
$api_bind_address = '0.0.0.0',
|
||||
$service_endpoint = '127.0.0.1',
|
||||
$galera_cluster_name = 'openstack',
|
||||
$primary_controller = false,
|
||||
$galera_node_address = '127.0.0.1',
|
||||
$glance_backend = 'file',
|
||||
$galera_nodes = ['127.0.0.1'],
|
||||
$novnc_address = '127.0.0.1',
|
||||
$mysql_skip_name_resolve = false,
|
||||
$manage_volumes = false,
|
||||
$nv_physical_volume = undef,
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility_ceilometer = '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',
|
||||
$horizon_use_ssl = false,
|
||||
$nova_rate_limits = undef,
|
||||
$cinder_rate_limits = undef,
|
||||
$ha_mode = false,
|
||||
$nameservers = undef,
|
||||
#
|
||||
$max_retries = '-1',
|
||||
$max_pool_size = '10',
|
||||
$max_overflow = '30',
|
||||
$idle_timeout = '3600',
|
||||
$max_retries = '-1',
|
||||
$max_pool_size = '10',
|
||||
$max_overflow = '30',
|
||||
$idle_timeout = '3600',
|
||||
) {
|
||||
|
||||
|
||||
|
@ -226,79 +224,78 @@ class openstack::controller (
|
|||
Class['glance::db::mysql'] -> Class['glance::registry']
|
||||
}
|
||||
class { 'openstack::db::mysql':
|
||||
mysql_root_password => $mysql_root_password,
|
||||
mysql_bind_address => $mysql_bind_address,
|
||||
mysql_account_security => $mysql_account_security,
|
||||
keystone_db_user => $keystone_db_user,
|
||||
keystone_db_password => $keystone_db_password,
|
||||
keystone_db_dbname => $keystone_db_dbname,
|
||||
glance_db_user => $glance_db_user,
|
||||
glance_db_password => $glance_db_password,
|
||||
glance_db_dbname => $glance_db_dbname,
|
||||
nova_db_user => $nova_db_user,
|
||||
nova_db_password => $nova_db_password,
|
||||
nova_db_dbname => $nova_db_dbname,
|
||||
ceilometer => $ceilometer,
|
||||
ceilometer_db_user => $ceilometer_db_user,
|
||||
ceilometer_db_password => $ceilometer_db_password,
|
||||
ceilometer_db_dbname => $ceilometer_db_dbname,
|
||||
cinder => $cinder,
|
||||
cinder_db_user => $cinder_db_user,
|
||||
cinder_db_password => $cinder_db_password,
|
||||
cinder_db_dbname => $cinder_db_dbname,
|
||||
neutron => $quantum,
|
||||
neutron_db_user => $quantum ? { true => $quantum_config['database']['username'], default=>undef},
|
||||
neutron_db_password => $quantum ? { true => $quantum_config['database']['passwd'], default=>""},
|
||||
neutron_db_dbname => $quantum ? { true => $quantum_config['database']['dbname'], default=>undef},
|
||||
allowed_hosts => $allowed_hosts,
|
||||
enabled => $enabled,
|
||||
galera_cluster_name => $galera_cluster_name,
|
||||
primary_controller => $primary_controller,
|
||||
galera_node_address => $galera_node_address ,
|
||||
#db_host => $internal_address,
|
||||
galera_nodes => $galera_nodes,
|
||||
custom_setup_class => $custom_mysql_setup_class,
|
||||
mysql_root_password => $mysql_root_password,
|
||||
mysql_bind_address => $mysql_bind_address,
|
||||
mysql_account_security => $mysql_account_security,
|
||||
keystone_db_user => $keystone_db_user,
|
||||
keystone_db_password => $keystone_db_password,
|
||||
keystone_db_dbname => $keystone_db_dbname,
|
||||
glance_db_user => $glance_db_user,
|
||||
glance_db_password => $glance_db_password,
|
||||
glance_db_dbname => $glance_db_dbname,
|
||||
nova_db_user => $nova_db_user,
|
||||
nova_db_password => $nova_db_password,
|
||||
nova_db_dbname => $nova_db_dbname,
|
||||
ceilometer => $ceilometer,
|
||||
ceilometer_db_user => $ceilometer_db_user,
|
||||
ceilometer_db_password => $ceilometer_db_password,
|
||||
ceilometer_db_dbname => $ceilometer_db_dbname,
|
||||
cinder => $cinder,
|
||||
cinder_db_user => $cinder_db_user,
|
||||
cinder_db_password => $cinder_db_password,
|
||||
cinder_db_dbname => $cinder_db_dbname,
|
||||
neutron => $quantum,
|
||||
neutron_db_user => $quantum ? { true => $quantum_config['database']['username'], default=>undef},
|
||||
neutron_db_password => $quantum ? { true => $quantum_config['database']['passwd'], default=>""},
|
||||
neutron_db_dbname => $quantum ? { true => $quantum_config['database']['dbname'], default=>undef},
|
||||
allowed_hosts => $allowed_hosts,
|
||||
enabled => $enabled,
|
||||
galera_cluster_name => $galera_cluster_name,
|
||||
primary_controller => $primary_controller,
|
||||
galera_node_address => $galera_node_address ,
|
||||
#db_host => $internal_address,
|
||||
galera_nodes => $galera_nodes,
|
||||
custom_setup_class => $custom_mysql_setup_class,
|
||||
mysql_skip_name_resolve => $mysql_skip_name_resolve,
|
||||
use_syslog => $use_syslog,
|
||||
use_syslog => $use_syslog,
|
||||
}
|
||||
}
|
||||
####### KEYSTONE ###########
|
||||
class { 'openstack::keystone':
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
db_type => $db_type,
|
||||
db_host => $db_host,
|
||||
db_password => $keystone_db_password,
|
||||
db_name => $keystone_db_dbname,
|
||||
db_user => $keystone_db_user,
|
||||
admin_token => $keystone_admin_token,
|
||||
admin_tenant => $keystone_admin_tenant,
|
||||
admin_email => $admin_email,
|
||||
admin_user => $admin_user,
|
||||
admin_password => $admin_password,
|
||||
public_address => $public_address,
|
||||
internal_address => $internal_address,
|
||||
admin_address => $admin_address,
|
||||
glance_user_password => $glance_user_password,
|
||||
nova_user_password => $nova_user_password,
|
||||
cinder => $cinder,
|
||||
cinder_user_password => $cinder_user_password,
|
||||
quantum => $quantum,
|
||||
quantum_config => $quantum_config,
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
db_type => $db_type,
|
||||
db_host => $db_host,
|
||||
db_password => $keystone_db_password,
|
||||
db_name => $keystone_db_dbname,
|
||||
db_user => $keystone_db_user,
|
||||
admin_token => $keystone_admin_token,
|
||||
admin_tenant => $keystone_admin_tenant,
|
||||
admin_email => $admin_email,
|
||||
admin_user => $admin_user,
|
||||
admin_password => $admin_password,
|
||||
public_address => $public_address,
|
||||
internal_address => $internal_address,
|
||||
admin_address => $admin_address,
|
||||
glance_user_password => $glance_user_password,
|
||||
nova_user_password => $nova_user_password,
|
||||
cinder => $cinder,
|
||||
cinder_user_password => $cinder_user_password,
|
||||
quantum => $quantum,
|
||||
quantum_config => $quantum_config,
|
||||
ceilometer => $ceilometer,
|
||||
ceilometer_user_password => $ceilometer_user_password,
|
||||
bind_host => $api_bind_address,
|
||||
enabled => $enabled,
|
||||
package_ensure => $::openstack_keystone_version,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility_keystone,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
memcache_servers => $cache_server_ip,
|
||||
memcache_server_port => $cache_server_port,
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
max_overflow => $max_overflow,
|
||||
idle_timeout => $idle_timeout,
|
||||
bind_host => $api_bind_address,
|
||||
enabled => $enabled,
|
||||
package_ensure => $::openstack_keystone_version,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility_keystone,
|
||||
memcache_servers => $cache_server_ip,
|
||||
memcache_server_port => $cache_server_port,
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
max_overflow => $max_overflow,
|
||||
idle_timeout => $idle_timeout,
|
||||
}
|
||||
|
||||
|
||||
|
@ -320,7 +317,6 @@ class openstack::controller (
|
|||
registry_host => $service_endpoint,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility_glance,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
glance_image_cache_max_size => $glance_image_cache_max_size,
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
|
@ -360,73 +356,72 @@ class openstack::controller (
|
|||
|
||||
class { 'openstack::nova::controller':
|
||||
# Database
|
||||
db_host => $db_host,
|
||||
db_host => $db_host,
|
||||
# Network
|
||||
nameservers => $nameservers,
|
||||
network_manager => $network_manager,
|
||||
floating_range => $floating_range,
|
||||
fixed_range => $fixed_range,
|
||||
public_address => $public_address,
|
||||
public_interface => $public_interface,
|
||||
admin_address => $admin_address,
|
||||
internal_address => $internal_address,
|
||||
private_interface => $private_interface,
|
||||
auto_assign_floating_ip => $auto_assign_floating_ip,
|
||||
create_networks => $create_networks,
|
||||
num_networks => $num_networks,
|
||||
network_size => $network_size,
|
||||
multi_host => $multi_host,
|
||||
network_config => $network_config,
|
||||
keystone_host => $service_endpoint,
|
||||
service_endpoint => $service_endpoint,
|
||||
nameservers => $nameservers,
|
||||
network_manager => $network_manager,
|
||||
floating_range => $floating_range,
|
||||
fixed_range => $fixed_range,
|
||||
public_address => $public_address,
|
||||
public_interface => $public_interface,
|
||||
admin_address => $admin_address,
|
||||
internal_address => $internal_address,
|
||||
private_interface => $private_interface,
|
||||
auto_assign_floating_ip => $auto_assign_floating_ip,
|
||||
create_networks => $create_networks,
|
||||
num_networks => $num_networks,
|
||||
network_size => $network_size,
|
||||
multi_host => $multi_host,
|
||||
network_config => $network_config,
|
||||
keystone_host => $service_endpoint,
|
||||
service_endpoint => $service_endpoint,
|
||||
# Quantum
|
||||
quantum => $quantum,
|
||||
quantum_config => $quantum_config,
|
||||
quantum_network_node => $quantum_network_node,
|
||||
quantum_netnode_on_cnt => $quantum_netnode_on_cnt,
|
||||
segment_range => $segment_range,
|
||||
tenant_network_type => $tenant_network_type,
|
||||
quantum => $quantum,
|
||||
quantum_config => $quantum_config,
|
||||
quantum_network_node => $quantum_network_node,
|
||||
quantum_netnode_on_cnt => $quantum_netnode_on_cnt,
|
||||
segment_range => $segment_range,
|
||||
tenant_network_type => $tenant_network_type,
|
||||
# Nova
|
||||
nova_user_password => $nova_user_password,
|
||||
nova_db_password => $nova_db_password,
|
||||
nova_db_user => $nova_db_user,
|
||||
nova_db_dbname => $nova_db_dbname,
|
||||
nova_quota_driver => $nova_quota_driver,
|
||||
nova_user_password => $nova_user_password,
|
||||
nova_db_password => $nova_db_password,
|
||||
nova_db_user => $nova_db_user,
|
||||
nova_db_dbname => $nova_db_dbname,
|
||||
nova_quota_driver => $nova_quota_driver,
|
||||
# RPC
|
||||
queue_provider => $queue_provider,
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $amqp_user,
|
||||
amqp_password => $amqp_password,
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
rabbitmq_bind_ip_address => $rabbitmq_bind_ip_address,
|
||||
rabbitmq_bind_port => $rabbitmq_bind_port,
|
||||
rabbitmq_cluster_nodes => $rabbitmq_cluster_nodes,
|
||||
rabbit_cluster => $rabbit_cluster,
|
||||
queue_provider => $queue_provider,
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $amqp_user,
|
||||
amqp_password => $amqp_password,
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
rabbitmq_bind_ip_address => $rabbitmq_bind_ip_address,
|
||||
rabbitmq_bind_port => $rabbitmq_bind_port,
|
||||
rabbitmq_cluster_nodes => $rabbitmq_cluster_nodes,
|
||||
rabbit_cluster => $rabbit_cluster,
|
||||
# Glance
|
||||
glance_api_servers => $glance_api_servers,
|
||||
glance_api_servers => $glance_api_servers,
|
||||
# General
|
||||
verbose => $verbose,
|
||||
primary_controller => $primary_controller,
|
||||
debug => $debug,
|
||||
enabled => $enabled,
|
||||
exported_resources => $export_resources,
|
||||
enabled_apis => $enabled_apis,
|
||||
api_bind_address => $api_bind_address,
|
||||
ensure_package => $::openstack_version['nova'],
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility_nova,
|
||||
verbose => $verbose,
|
||||
primary_controller => $primary_controller,
|
||||
debug => $debug,
|
||||
enabled => $enabled,
|
||||
exported_resources => $export_resources,
|
||||
enabled_apis => $enabled_apis,
|
||||
api_bind_address => $api_bind_address,
|
||||
ensure_package => $::openstack_version['nova'],
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility_nova,
|
||||
syslog_log_facility_neutron => $syslog_log_facility_neutron,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
nova_rate_limits => $nova_rate_limits,
|
||||
nova_report_interval => $nova_report_interval,
|
||||
nova_service_down_time => $nova_service_down_time,
|
||||
cinder => $cinder,
|
||||
nova_rate_limits => $nova_rate_limits,
|
||||
nova_report_interval => $nova_report_interval,
|
||||
nova_service_down_time => $nova_service_down_time,
|
||||
cinder => $cinder,
|
||||
# SQLAlchemy backend
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
max_overflow => $max_overflow,
|
||||
idle_timeout => $idle_timeout,
|
||||
novnc_address => $novnc_address,
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
max_overflow => $max_overflow,
|
||||
idle_timeout => $idle_timeout,
|
||||
novnc_address => $novnc_address,
|
||||
}
|
||||
|
||||
######### Cinder Controller Services ########
|
||||
|
@ -452,7 +447,6 @@ class openstack::controller (
|
|||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
syslog_log_facility => $syslog_log_facility_cinder,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
cinder_rate_limits => $cinder_rate_limits,
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
|
@ -486,6 +480,7 @@ class openstack::controller (
|
|||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility_ceilometer,
|
||||
db_type => $ceilometer_db_type,
|
||||
db_host => $ceilometer_db_host,
|
||||
db_user => $ceilometer_db_user,
|
||||
|
@ -522,9 +517,7 @@ class openstack::controller (
|
|||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
use_syslog => $use_syslog,
|
||||
log_level => $syslog_log_level,
|
||||
}
|
||||
|
||||
class { 'openstack::auth_file':
|
||||
admin_user => $admin_user,
|
||||
admin_password => $admin_password,
|
||||
|
|
|
@ -2,55 +2,93 @@
|
|||
class openstack::controller_ha (
|
||||
$controllers,
|
||||
$primary_controller,
|
||||
$controller_public_addresses, $public_interface, $private_interface = 'eth2', $controller_internal_addresses,
|
||||
$internal_virtual_ip, $public_virtual_ip, $internal_address,
|
||||
$floating_range, $fixed_range, $multi_host, $network_manager, $verbose, $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, $syslog_log_level = 'WARNING',
|
||||
$controller_public_addresses,
|
||||
$public_interface,
|
||||
$private_interface = 'eth2',
|
||||
$controller_internal_addresses,
|
||||
$internal_virtual_ip,
|
||||
$public_virtual_ip,
|
||||
$internal_address,
|
||||
$floating_range,
|
||||
$fixed_range,
|
||||
$multi_host,
|
||||
$network_manager,
|
||||
$verbose = true,
|
||||
$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,
|
||||
$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',
|
||||
$cinder_rate_limits = undef, $nova_rate_limits = undef,
|
||||
$cinder_volume_group = 'cinder-volumes',
|
||||
$cinder_user_password = 'cinder_user_pass',
|
||||
$cinder_db_password = 'cinder_db_pass',
|
||||
$ceilometer = false,
|
||||
$ceilometer_db_password = 'ceilometer_pass',
|
||||
$ceilometer_user_password = 'ceilometer_pass',
|
||||
$ceilometer_db_user = 'ceilometer',
|
||||
$ceilometer_db_dbname = 'ceilometer',
|
||||
$ceilometer_metering_secret = 'ceilometer',
|
||||
$ceilometer_db_type = 'mongodb',
|
||||
$ceilometer_db_host = '127.0.0.1',
|
||||
$sahara = false,
|
||||
$murano = false,
|
||||
$rabbit_node_ip_address = $internal_address,
|
||||
$horizon_use_ssl = false,
|
||||
$quantum_network_node = false,
|
||||
$quantum_netnode_on_cnt = false,
|
||||
$mysql_skip_name_resolve = false,
|
||||
$ha_provider = "pacemaker",
|
||||
$create_networks = true,
|
||||
$use_unicast_corosync = false,
|
||||
$ha_mode = true,
|
||||
$nameservers = undef,
|
||||
$idle_timeout = '3600',
|
||||
$max_pool_size = '10',
|
||||
$max_overflow = '30',
|
||||
$max_retries = '-1',
|
||||
$nova_report_interval = '10',
|
||||
$nova_service_down_time = '60',
|
||||
$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_ceilometer = 'LOG_LOCAL0',
|
||||
$cinder_rate_limits = undef, $nova_rate_limits = undef,
|
||||
$cinder_volume_group = 'cinder-volumes',
|
||||
$cinder_user_password = 'cinder_user_pass',
|
||||
$cinder_db_password = 'cinder_db_pass',
|
||||
$ceilometer = false,
|
||||
$ceilometer_db_password = 'ceilometer_pass',
|
||||
$ceilometer_user_password = 'ceilometer_pass',
|
||||
$ceilometer_db_user = 'ceilometer',
|
||||
$ceilometer_db_dbname = 'ceilometer',
|
||||
$ceilometer_metering_secret = 'ceilometer',
|
||||
$ceilometer_db_type = 'mongodb',
|
||||
$ceilometer_db_host = '127.0.0.1',
|
||||
$sahara = false,
|
||||
$murano = false,
|
||||
$rabbit_node_ip_address = $internal_address,
|
||||
$horizon_use_ssl = false,
|
||||
$quantum_network_node = false,
|
||||
$quantum_netnode_on_cnt = false,
|
||||
$mysql_skip_name_resolve = false,
|
||||
$ha_provider = "pacemaker",
|
||||
$create_networks = true,
|
||||
$use_unicast_corosync = false,
|
||||
$ha_mode = true,
|
||||
$nameservers = undef,
|
||||
$idle_timeout = '3600',
|
||||
$max_pool_size = '10',
|
||||
$max_overflow = '30',
|
||||
$max_retries = '-1',
|
||||
$nova_report_interval = '10',
|
||||
$nova_service_down_time = '60',
|
||||
) {
|
||||
|
||||
$is_primary_controller = $::fuel_settings['role'] ? { 'primary-controller'=>true, default=>false }
|
||||
|
@ -72,99 +110,99 @@ class openstack::controller_ha (
|
|||
}
|
||||
|
||||
class { '::openstack::controller':
|
||||
private_interface => $private_interface,
|
||||
public_interface => $public_interface,
|
||||
public_address => $public_virtual_ip, # It is feature for HA mode.
|
||||
internal_address => $internal_virtual_ip, # All internal traffic goes
|
||||
admin_address => $internal_virtual_ip, # through load balancer.
|
||||
floating_range => $floating_range,
|
||||
fixed_range => $fixed_range,
|
||||
multi_host => $multi_host,
|
||||
network_config => $network_config,
|
||||
num_networks => $num_networks,
|
||||
network_size => $network_size,
|
||||
network_manager => $network_manager,
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
auto_assign_floating_ip => $auto_assign_floating_ip,
|
||||
mysql_root_password => $mysql_root_password,
|
||||
custom_mysql_setup_class=> $custom_mysql_setup_class,
|
||||
galera_cluster_name => 'openstack',
|
||||
primary_controller => $primary_controller,
|
||||
galera_node_address => $internal_address,
|
||||
galera_nodes => $galera_nodes,
|
||||
novnc_address => $novnc_address,
|
||||
mysql_skip_name_resolve => $mysql_skip_name_resolve,
|
||||
admin_email => $admin_email,
|
||||
admin_user => $admin_user,
|
||||
admin_password => $admin_password,
|
||||
keystone_db_password => $keystone_db_password,
|
||||
keystone_admin_token => $keystone_admin_token,
|
||||
keystone_admin_tenant => $keystone_admin_tenant,
|
||||
glance_db_password => $glance_db_password,
|
||||
glance_user_password => $glance_user_password,
|
||||
glance_api_servers => $glance_api_servers,
|
||||
glance_image_cache_max_size => $glance_image_cache_max_size,
|
||||
nova_db_password => $nova_db_password,
|
||||
nova_user_password => $nova_user_password,
|
||||
queue_provider => $queue_provider,
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $amqp_user,
|
||||
amqp_password => $amqp_password,
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
rabbitmq_bind_ip_address => $rabbitmq_bind_ip_address,
|
||||
rabbitmq_bind_port => $rabbitmq_bind_port,
|
||||
rabbitmq_cluster_nodes => $rabbitmq_cluster_nodes,
|
||||
rabbit_cluster => true,
|
||||
cache_server_ip => $memcached_servers,
|
||||
export_resources => false,
|
||||
api_bind_address => $internal_address,
|
||||
db_host => $internal_virtual_ip,
|
||||
service_endpoint => $internal_virtual_ip,
|
||||
glance_backend => $glance_backend,
|
||||
#require => Service['keepalived'],
|
||||
quantum => $quantum,
|
||||
quantum_config => $quantum_config,
|
||||
quantum_network_node => $quantum_network_node,
|
||||
quantum_netnode_on_cnt => $quantum_netnode_on_cnt,
|
||||
segment_range => $segment_range,
|
||||
tenant_network_type => $tenant_network_type,
|
||||
cinder => $cinder,
|
||||
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
||||
cinder_user_password => $cinder_user_password,
|
||||
cinder_db_password => $cinder_db_password,
|
||||
manage_volumes => $manage_volumes,
|
||||
nv_physical_volume => $nv_physical_volume,
|
||||
cinder_volume_group => $cinder_volume_group,
|
||||
private_interface => $private_interface,
|
||||
public_interface => $public_interface,
|
||||
public_address => $public_virtual_ip, # It is feature for HA mode.
|
||||
internal_address => $internal_virtual_ip, # All internal traffic goes
|
||||
admin_address => $internal_virtual_ip, # through load balancer.
|
||||
floating_range => $floating_range,
|
||||
fixed_range => $fixed_range,
|
||||
multi_host => $multi_host,
|
||||
network_config => $network_config,
|
||||
num_networks => $num_networks,
|
||||
network_size => $network_size,
|
||||
network_manager => $network_manager,
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
auto_assign_floating_ip => $auto_assign_floating_ip,
|
||||
mysql_root_password => $mysql_root_password,
|
||||
custom_mysql_setup_class => $custom_mysql_setup_class,
|
||||
galera_cluster_name => 'openstack',
|
||||
primary_controller => $primary_controller,
|
||||
galera_node_address => $internal_address,
|
||||
galera_nodes => $galera_nodes,
|
||||
novnc_address => $novnc_address,
|
||||
mysql_skip_name_resolve => $mysql_skip_name_resolve,
|
||||
admin_email => $admin_email,
|
||||
admin_user => $admin_user,
|
||||
admin_password => $admin_password,
|
||||
keystone_db_password => $keystone_db_password,
|
||||
keystone_admin_token => $keystone_admin_token,
|
||||
keystone_admin_tenant => $keystone_admin_tenant,
|
||||
glance_db_password => $glance_db_password,
|
||||
glance_user_password => $glance_user_password,
|
||||
glance_api_servers => $glance_api_servers,
|
||||
glance_image_cache_max_size => $glance_image_cache_max_size,
|
||||
nova_db_password => $nova_db_password,
|
||||
nova_user_password => $nova_user_password,
|
||||
queue_provider => $queue_provider,
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $amqp_user,
|
||||
amqp_password => $amqp_password,
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
rabbitmq_bind_ip_address => $rabbitmq_bind_ip_address,
|
||||
rabbitmq_bind_port => $rabbitmq_bind_port,
|
||||
rabbitmq_cluster_nodes => $rabbitmq_cluster_nodes,
|
||||
rabbit_cluster => true,
|
||||
cache_server_ip => $memcached_servers,
|
||||
export_resources => false,
|
||||
api_bind_address => $internal_address,
|
||||
db_host => $internal_virtual_ip,
|
||||
service_endpoint => $internal_virtual_ip,
|
||||
glance_backend => $glance_backend,
|
||||
#require => Service['keepalived'],
|
||||
quantum => $quantum,
|
||||
quantum_config => $quantum_config,
|
||||
quantum_network_node => $quantum_network_node,
|
||||
quantum_netnode_on_cnt => $quantum_netnode_on_cnt,
|
||||
segment_range => $segment_range,
|
||||
tenant_network_type => $tenant_network_type,
|
||||
cinder => $cinder,
|
||||
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
||||
cinder_user_password => $cinder_user_password,
|
||||
cinder_db_password => $cinder_db_password,
|
||||
manage_volumes => $manage_volumes,
|
||||
nv_physical_volume => $nv_physical_volume,
|
||||
cinder_volume_group => $cinder_volume_group,
|
||||
#
|
||||
ceilometer => $ceilometer,
|
||||
ceilometer_db_password => $ceilometer_db_password,
|
||||
ceilometer_user_password => $ceilometer_user_password,
|
||||
ceilometer_metering_secret => $ceilometer_metering_secret,
|
||||
ceilometer_db_dbname => $ceilometer_db_dbname,
|
||||
ceilometer_db_type => $ceilometer_db_type,
|
||||
ceilometer_db_host => $ceilometer_db_host,
|
||||
ceilometer => $ceilometer,
|
||||
ceilometer_db_password => $ceilometer_db_password,
|
||||
ceilometer_user_password => $ceilometer_user_password,
|
||||
ceilometer_metering_secret => $ceilometer_metering_secret,
|
||||
ceilometer_db_dbname => $ceilometer_db_dbname,
|
||||
ceilometer_db_type => $ceilometer_db_type,
|
||||
ceilometer_db_host => $ceilometer_db_host,
|
||||
#
|
||||
# turn on SWIFT_ENABLED option for Horizon dashboard
|
||||
swift => $glance_backend ? { 'swift' => true, default => false },
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
syslog_log_facility_glance => $syslog_log_facility_glance,
|
||||
syslog_log_facility_cinder => $syslog_log_facility_cinder,
|
||||
syslog_log_facility_nova => $syslog_log_facility_nova,
|
||||
syslog_log_facility_keystone => $syslog_log_facility_keystone,
|
||||
cinder_rate_limits => $cinder_rate_limits,
|
||||
nova_rate_limits => $nova_rate_limits,
|
||||
nova_report_interval => $nova_report_interval,
|
||||
nova_service_down_time => $nova_service_down_time,
|
||||
horizon_use_ssl => $horizon_use_ssl,
|
||||
ha_mode => $ha_mode,
|
||||
nameservers => $nameservers,
|
||||
swift => $glance_backend ? { 'swift' => true, default => false },
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility_glance => $syslog_log_facility_glance,
|
||||
syslog_log_facility_cinder => $syslog_log_facility_cinder,
|
||||
syslog_log_facility_nova => $syslog_log_facility_nova,
|
||||
syslog_log_facility_keystone => $syslog_log_facility_keystone,
|
||||
syslog_log_facility_ceilometer => $syslog_log_facility_ceilometer,
|
||||
cinder_rate_limits => $cinder_rate_limits,
|
||||
nova_rate_limits => $nova_rate_limits,
|
||||
nova_report_interval => $nova_report_interval,
|
||||
nova_service_down_time => $nova_service_down_time,
|
||||
horizon_use_ssl => $horizon_use_ssl,
|
||||
ha_mode => $ha_mode,
|
||||
nameservers => $nameservers,
|
||||
# SQLALchemy backend
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
max_overflow => $max_overflow,
|
||||
idle_timeout => $idle_timeout,
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
max_overflow => $max_overflow,
|
||||
idle_timeout => $idle_timeout,
|
||||
}
|
||||
|
||||
if $quantum and $quantum_network_node {
|
||||
|
@ -185,7 +223,6 @@ class openstack::controller_ha (
|
|||
#neutron_netnode_on_cnt=> $quantum_netnode_on_cnt,
|
||||
service_provider => $ha_provider,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
syslog_log_facility => $syslog_log_facility_neutron,
|
||||
ha_mode => $ha_mode,
|
||||
}
|
||||
|
|
|
@ -18,8 +18,7 @@
|
|||
# [db_type] Type of sql databse to use. Optional. Defaults to 'mysql'
|
||||
# [glance_db_user] Name of glance DB user. Optional. Defaults to 'glance'
|
||||
# [glance_db_dbname] Name of glance DB. Optional. Defaults to 'glance'
|
||||
# [verbose] Rather to print more verbose (INFO+) output. If non verbose and non debug, would give
|
||||
# syslog_log_level (default is WARNING) output. Optional. Defaults to false.
|
||||
# [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.
|
||||
# [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.
|
||||
# [syslog_log_facility] Facility for syslog, if used. Optional. Note: duplicating conf option
|
||||
# wouldn't have been used, but more powerfull rsyslog features managed via conf template instead
|
||||
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
|
||||
# [glance_image_cache_max_size] the maximum size of glance image cache. Optional. Default is 10G.
|
||||
#
|
||||
# === Example
|
||||
|
@ -56,7 +54,6 @@ class openstack::glance (
|
|||
$use_syslog = false,
|
||||
# Facility is common for all glance services
|
||||
$syslog_log_facility = 'LOG_LOCAL2',
|
||||
$syslog_log_level = 'WARNING',
|
||||
$glance_image_cache_max_size = '10737418240',
|
||||
$idle_timeout = '3600',
|
||||
$max_pool_size = '10',
|
||||
|
@ -101,7 +98,6 @@ class openstack::glance (
|
|||
registry_host => $registry_host,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
image_cache_max_size => $glance_image_cache_max_size,
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
|
@ -124,7 +120,6 @@ class openstack::glance (
|
|||
enabled => $enabled,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
max_overflow => $max_overflow,
|
||||
|
|
|
@ -17,8 +17,7 @@
|
|||
# [keystone_db_user] Name of keystone db user. Optional. Defaults to 'keystone'
|
||||
# [keystone_db_dbname] Name of keystone DB. Optional. Defaults to 'keystone'
|
||||
# [keystone_admin_tenant] Name of keystone admin tenant. Optional. Defaults to 'admin'
|
||||
# [verbose] Rather to print more verbose (INFO+) output. If non verbose and non debug, would
|
||||
# give syslog_log_level (default is WARNING) output. Optional. Defaults to false.
|
||||
# [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.
|
||||
# [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.
|
||||
# [syslog_log_facility] Facility for syslog, if used. Optional. Note: duplicating conf option
|
||||
# wouldn't have been used, but more powerfull rsyslog features managed via conf template instead
|
||||
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
|
||||
#
|
||||
# === Example
|
||||
#
|
||||
|
@ -92,7 +90,6 @@ class openstack::keystone (
|
|||
$package_ensure = present,
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL7',
|
||||
$syslog_log_level = 'WARNING',
|
||||
$idle_timeout = '200',
|
||||
$max_pool_size = '10',
|
||||
$max_overflow = '30',
|
||||
|
@ -205,7 +202,6 @@ class openstack::keystone (
|
|||
package_ensure => $package_ensure,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
max_overflow => $max_overflow,
|
||||
|
|
|
@ -1,10 +1,8 @@
|
|||
# Class for rsyslog server/client logging
|
||||
# (assumes package rsyslog were installed at BM)
|
||||
#
|
||||
# [role] log server or client
|
||||
# [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.
|
||||
# [syslog_log_facility_XXX] syslog (client role only) facility for service XXX.
|
||||
# [rotation] logrotate option for rotation period - daily, weekly, monthly, yearly.
|
||||
# [keep] logrotate option for number or rotated log files to keep.
|
||||
# [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-rfc3164: Dec 5 02:21:13,
|
||||
# [virtual] if node is virtual, fix for udp checksums should be applied
|
||||
# [rabbit_log_level] should be >= global syslog_log_level option,
|
||||
# otherwise none messages would have gone to syslog (client role only)
|
||||
# [debug] switch between debug and standard cases, client role only. imfile monitors for local logs would be used if debug.
|
||||
|
||||
# [rabbit_log_level] assign syslog log level for all rabbit messages which are not an ERROR
|
||||
# (rabbit does not support syslog, imfile is used for log capturing)
|
||||
#
|
||||
class openstack::logging (
|
||||
$role = 'client',
|
||||
$log_remote = true,
|
||||
$log_local = false,
|
||||
$log_auth_local = false,
|
||||
$rotation = 'daily',
|
||||
$keep = '7',
|
||||
$limitsize = '300M',
|
||||
$rservers = [{'remote_type'=>'udp', 'server'=>'master', 'port'=>'514'},],
|
||||
$port = '514',
|
||||
$proto = 'udp',
|
||||
$show_timezone = false,
|
||||
$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',
|
||||
$rabbit_log_level = 'NOTICE',
|
||||
$debug = false,
|
||||
$production = 'prod',
|
||||
$role = 'client',
|
||||
$log_remote = true,
|
||||
$log_local = false,
|
||||
$log_auth_local = false,
|
||||
$rotation = 'daily',
|
||||
$keep = '7',
|
||||
$limitsize = '300M',
|
||||
$rservers = [{'remote_type'=>'udp', 'server'=>'master', 'port'=>'514'},],
|
||||
$port = '514',
|
||||
$proto = 'udp',
|
||||
$show_timezone = false,
|
||||
$virtual = false,
|
||||
$rabbit_log_level = 'NOTICE',
|
||||
$production = 'prod',
|
||||
$escapenewline = false,
|
||||
) {
|
||||
|
||||
validate_re($proto, 'tcp|udp|both')
|
||||
validate_re($role, 'client|server')
|
||||
validate_re($rotation, 'daily|weekly|monthly|yearly')
|
||||
validate_re($proto, 'tcp|udp|both')
|
||||
validate_re($role, 'client|server')
|
||||
validate_re($rotation, 'daily|weekly|monthly|yearly')
|
||||
|
||||
if $role == 'client' {
|
||||
class { "::rsyslog::client":
|
||||
high_precision_timestamps => $show_timezone,
|
||||
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,
|
||||
# Fix for udp checksums should be applied if running on virtual node
|
||||
if $virtual {
|
||||
class { "openstack::checksum_udp" : port => $port }
|
||||
}
|
||||
|
||||
} else { # server
|
||||
include ::rsyslog::params
|
||||
|
||||
if $proto == 'both' {
|
||||
firewall { "$port udp rsyslog":
|
||||
port => $port,
|
||||
proto => 'udp',
|
||||
action => 'accept',
|
||||
# Configure syslog roles
|
||||
if $role == 'client' {
|
||||
|
||||
if $rservers == undef {
|
||||
$rservers_real = [{'remote_type'=>$remote_type, 'server'=>$server, 'port'=>$port}]
|
||||
}
|
||||
firewall { "$port tcp rsyslog":
|
||||
port => $port,
|
||||
proto => 'tcp',
|
||||
action => 'accept',
|
||||
else {
|
||||
$rservers_real = $rservers
|
||||
}
|
||||
} else {
|
||||
firewall { "$port $proto rsyslog":
|
||||
port => $port,
|
||||
proto => $proto,
|
||||
action => 'accept',
|
||||
|
||||
# Configure logging templates for rsyslog client side
|
||||
# Rabbitmq does not support syslogging, use imfile
|
||||
::rsyslog::imfile { "04-rabbitmq" :
|
||||
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/ {
|
||||
$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,
|
||||
}
|
||||
}
|
||||
|
||||
# Configure log rotation
|
||||
class {"::openstack::logrotate":
|
||||
role => $role,
|
||||
rotation => $rotation,
|
||||
keep => $keep,
|
||||
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.
|
||||
# [syslog_log_facility] Facility for syslog, if used. Optional. Note: duplicating conf option
|
||||
# wouldn't have been used, but more powerfull rsyslog features managed via conf template instead
|
||||
# [syslog_log_level] logging level for non verbose and non debug mode. Optional.
|
||||
|
||||
class openstack::neutron_router (
|
||||
$verbose = false,
|
||||
|
@ -14,7 +13,6 @@ class openstack::neutron_router (
|
|||
$neutron_server = true,
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL4',
|
||||
$syslog_log_level = 'WARNING',
|
||||
$ha_mode = false,
|
||||
$service_provider = 'generic',
|
||||
#$internal_address = $::ipaddress_br_mgmt,
|
||||
|
@ -28,7 +26,6 @@ class openstack::neutron_router (
|
|||
debug => $debug,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
server_ha_mode => $ha_mode,
|
||||
}
|
||||
#todo: add neutron::server here (into IF)
|
||||
|
|
|
@ -31,71 +31,70 @@ class openstack::nova::controller (
|
|||
# Nova Required
|
||||
$nova_user_password,
|
||||
$nova_db_password,
|
||||
$primary_controller = false,
|
||||
$primary_controller = false,
|
||||
# Network
|
||||
$fixed_range = '10.0.0.0/24',
|
||||
$floating_range = false,
|
||||
$fixed_range = '10.0.0.0/24',
|
||||
$floating_range = false,
|
||||
$internal_address,
|
||||
$admin_address,
|
||||
$service_endpoint = '127.0.0.1',
|
||||
$auto_assign_floating_ip = false,
|
||||
$create_networks = true,
|
||||
$num_networks = 1,
|
||||
$network_size = 255,
|
||||
$multi_host = false,
|
||||
$network_config = {},
|
||||
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||
$nova_quota_driver = 'nova.quota.NoopQuotaDriver',
|
||||
$service_endpoint = '127.0.0.1',
|
||||
$auto_assign_floating_ip = false,
|
||||
$create_networks = true,
|
||||
$num_networks = 1,
|
||||
$network_size = 255,
|
||||
$multi_host = false,
|
||||
$network_config = {},
|
||||
$network_manager = 'nova.network.manager.FlatDHCPManager',
|
||||
$nova_quota_driver = 'nova.quota.NoopQuotaDriver',
|
||||
# Quantum
|
||||
$quantum = false,
|
||||
$quantum_config = {},
|
||||
$quantum_network_node = false,
|
||||
$quantum_netnode_on_cnt = false,
|
||||
$segment_range = '1:4094',
|
||||
$tenant_network_type = 'gre',
|
||||
$quantum = false,
|
||||
$quantum_config = {},
|
||||
$quantum_network_node = false,
|
||||
$quantum_netnode_on_cnt = false,
|
||||
$segment_range = '1:4094',
|
||||
$tenant_network_type = 'gre',
|
||||
# Nova
|
||||
$nova_db_user = 'nova',
|
||||
$nova_db_dbname = 'nova',
|
||||
$nova_db_user = 'nova',
|
||||
$nova_db_dbname = 'nova',
|
||||
# RPC
|
||||
$queue_provider = 'rabbitmq',
|
||||
$amqp_hosts = ['127.0.0.1'],
|
||||
$amqp_user = 'nova',
|
||||
$amqp_password = 'rabbit_pw',
|
||||
$rabbit_ha_queues = false,
|
||||
$rabbitmq_bind_ip_address = 'UNSET',
|
||||
$rabbitmq_bind_port = '5672',
|
||||
$rabbitmq_cluster_nodes = [],
|
||||
$rabbit_cluster = false,
|
||||
$queue_provider = 'rabbitmq',
|
||||
$amqp_hosts = ['127.0.0.1'],
|
||||
$amqp_user = 'nova',
|
||||
$amqp_password = 'rabbit_pw',
|
||||
$rabbit_ha_queues = false,
|
||||
$rabbitmq_bind_ip_address = 'UNSET',
|
||||
$rabbitmq_bind_port = '5672',
|
||||
$rabbitmq_cluster_nodes = [],
|
||||
$rabbit_cluster = false,
|
||||
# Database
|
||||
$db_type = 'mysql',
|
||||
$db_type = 'mysql',
|
||||
# Glance
|
||||
$glance_api_servers = undef,
|
||||
$glance_api_servers = undef,
|
||||
# VNC
|
||||
$vnc_enabled = true,
|
||||
$vnc_enabled = true,
|
||||
# General
|
||||
$keystone_host = '127.0.0.1',
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$enabled = true,
|
||||
$exported_resources = true,
|
||||
$nameservers = undef,
|
||||
$ensure_package = present,
|
||||
$enabled_apis = 'ec2,osapi_compute',
|
||||
$api_bind_address = '0.0.0.0',
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL6',
|
||||
$keystone_host = '127.0.0.1',
|
||||
$verbose = false,
|
||||
$debug = false,
|
||||
$enabled = true,
|
||||
$exported_resources = true,
|
||||
$nameservers = undef,
|
||||
$ensure_package = present,
|
||||
$enabled_apis = 'ec2,osapi_compute',
|
||||
$api_bind_address = '0.0.0.0',
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility = 'LOG_LOCAL6',
|
||||
$syslog_log_facility_neutron = 'LOG_LOCAL4',
|
||||
$syslog_log_level = 'WARNING',
|
||||
$nova_rate_limits = undef,
|
||||
$nova_report_interval = '10',
|
||||
$nova_service_down_time = '60',
|
||||
$cinder = true,
|
||||
$nova_rate_limits = undef,
|
||||
$nova_report_interval = '10',
|
||||
$nova_service_down_time = '60',
|
||||
$cinder = true,
|
||||
# SQLAlchemy backend
|
||||
$idle_timeout = '3600',
|
||||
$max_pool_size = '10',
|
||||
$max_overflow = '30',
|
||||
$max_retries = '-1',
|
||||
$novnc_address = '127.0.0.1'
|
||||
$idle_timeout = '3600',
|
||||
$max_pool_size = '10',
|
||||
$max_overflow = '30',
|
||||
$max_retries = '-1',
|
||||
$novnc_address = '127.0.0.1'
|
||||
) {
|
||||
|
||||
# Configure the db string
|
||||
|
@ -152,7 +151,6 @@ class openstack::nova::controller (
|
|||
ensure_package => $ensure_package,
|
||||
api_bind_address => $api_bind_address,
|
||||
syslog_log_facility => $syslog_log_facility,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
use_syslog => $use_syslog,
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
|
@ -227,7 +225,6 @@ class openstack::nova::controller (
|
|||
debug => $debug,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $syslog_log_facility_neutron,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
server_ha_mode => $ha_mode,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
#
|
||||
class openstack::swift::proxy (
|
||||
$swift_user_password = 'swift_pass',
|
||||
$swift_hash_suffix = 'swift_secret',
|
||||
$swift_local_net_ip = $::ipaddress_eth0,
|
||||
$ring_part_power = 18,
|
||||
$ring_replicas = 3,
|
||||
$ring_min_part_hours = 1,
|
||||
$proxy_pipeline = [
|
||||
$swift_user_password = 'swift_pass',
|
||||
$swift_hash_suffix = 'swift_secret',
|
||||
$swift_local_net_ip = $::ipaddress_eth0,
|
||||
$ring_part_power = 18,
|
||||
$ring_replicas = 3,
|
||||
$ring_min_part_hours = 1,
|
||||
$proxy_pipeline = [
|
||||
'catch_errors',
|
||||
'healthcheck',
|
||||
'cache',
|
||||
|
@ -16,30 +16,29 @@ class openstack::swift::proxy (
|
|||
'authtoken',
|
||||
'keystone',
|
||||
'proxy-server'],
|
||||
$proxy_workers = $::processorcount,
|
||||
$proxy_port = '8080',
|
||||
$proxy_allow_account_management = true,
|
||||
$proxy_account_autocreate = true,
|
||||
$ratelimit_clock_accuracy = 1000,
|
||||
$ratelimit_max_sleep_time_seconds = 60,
|
||||
$ratelimit_log_sleep_time_seconds = 0,
|
||||
$ratelimit_rate_buffer_seconds = 5,
|
||||
$ratelimit_account_ratelimit = 0,
|
||||
$package_ensure = 'present',
|
||||
$controller_node_address = '10.0.0.1',
|
||||
$memcached = true,
|
||||
$swift_proxies = {
|
||||
$proxy_workers = $::processorcount,
|
||||
$proxy_port = '8080',
|
||||
$proxy_allow_account_management = true,
|
||||
$proxy_account_autocreate = true,
|
||||
$ratelimit_clock_accuracy = 1000,
|
||||
$ratelimit_max_sleep_time_seconds = 60,
|
||||
$ratelimit_log_sleep_time_seconds = 0,
|
||||
$ratelimit_rate_buffer_seconds = 5,
|
||||
$ratelimit_account_ratelimit = 0,
|
||||
$package_ensure = 'present',
|
||||
$controller_node_address = '10.0.0.1',
|
||||
$memcached = true,
|
||||
$swift_proxies = {
|
||||
'127.0.0.1' => '127.0.0.1'
|
||||
}
|
||||
,
|
||||
$primary_proxy = false,
|
||||
$swift_devices = undef,
|
||||
$master_swift_proxy_ip = undef,
|
||||
$collect_exported = false,
|
||||
$rings = ['account', 'object', 'container'],
|
||||
$debug = false,
|
||||
$verbose = true,
|
||||
$syslog_log_level = 'WARNING',
|
||||
$primary_proxy = false,
|
||||
$swift_devices = undef,
|
||||
$master_swift_proxy_ip = undef,
|
||||
$collect_exported = false,
|
||||
$rings = ['account', 'object', 'container'],
|
||||
$debug = false,
|
||||
$verbose = true,
|
||||
) {
|
||||
if !defined(Class['swift']) {
|
||||
class { 'swift':
|
||||
|
@ -62,7 +61,6 @@ class openstack::swift::proxy (
|
|||
package_ensure => $package_ensure,
|
||||
debug => $debug,
|
||||
verbose => $verbose,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
}
|
||||
|
||||
# configure all of the middlewares
|
||||
|
|
|
@ -1,51 +1,50 @@
|
|||
#
|
||||
class openstack::swift::storage_node (
|
||||
$swift_zone,
|
||||
$swift_hash_suffix = 'swift_secret',
|
||||
$swift_local_net_ip = $::ipaddress_eth0,
|
||||
$storage_type = 'loopback',
|
||||
$storage_base_dir = '/srv/loopback-device',
|
||||
$storage_mnt_base_dir = '/srv/node',
|
||||
$storage_devices = [
|
||||
$swift_hash_suffix = 'swift_secret',
|
||||
$swift_local_net_ip = $::ipaddress_eth0,
|
||||
$storage_type = 'loopback',
|
||||
$storage_base_dir = '/srv/loopback-device',
|
||||
$storage_mnt_base_dir = '/srv/node',
|
||||
$storage_devices = [
|
||||
'1',
|
||||
'2'],
|
||||
$storage_weight = 1,
|
||||
$package_ensure = 'present',
|
||||
$loopback_size = '1048756',
|
||||
$storage_weight = 1,
|
||||
$package_ensure = 'present',
|
||||
$loopback_size = '1048756',
|
||||
$master_swift_proxy_ip,
|
||||
$rings = [
|
||||
$rings = [
|
||||
'account',
|
||||
'object',
|
||||
'container'],
|
||||
$sync_rings = true,
|
||||
$sync_rings = true,
|
||||
# if the cinder management components should be installed
|
||||
$cinder = true,
|
||||
$manage_volumes = false,
|
||||
$nv_physical_volume = undef,
|
||||
$cinder_volume_group = 'cinder-volumes',
|
||||
$cinder_user_password = 'cinder_user_pass',
|
||||
$cinder_db_password = 'cinder_db_pass',
|
||||
$cinder_db_user = 'cinder',
|
||||
$cinder_db_dbname = 'cinder',
|
||||
$cinder_iscsi_bind_addr = false,
|
||||
$cinder_rate_limits = false,
|
||||
$db_host = '127.0.0.1',
|
||||
$service_endpoint = '127.0.0.1',
|
||||
$use_syslog = false,
|
||||
$cinder = true,
|
||||
$manage_volumes = false,
|
||||
$nv_physical_volume = undef,
|
||||
$cinder_volume_group = 'cinder-volumes',
|
||||
$cinder_user_password = 'cinder_user_pass',
|
||||
$cinder_db_password = 'cinder_db_pass',
|
||||
$cinder_db_user = 'cinder',
|
||||
$cinder_db_dbname = 'cinder',
|
||||
$cinder_iscsi_bind_addr = false,
|
||||
$cinder_rate_limits = false,
|
||||
$db_host = '127.0.0.1',
|
||||
$service_endpoint = '127.0.0.1',
|
||||
$use_syslog = false,
|
||||
$syslog_log_facility_cinder = 'LOG_LOCAL3',
|
||||
$syslog_log_level = 'WARNING',
|
||||
$debug = false,
|
||||
$verbose = true,
|
||||
$debug = false,
|
||||
$verbose = true,
|
||||
# Rabbit details necessary for cinder
|
||||
$rabbit_nodes = false,
|
||||
$rabbit_password = 'rabbit_pw',
|
||||
$rabbit_host = false,
|
||||
$rabbit_user = 'nova',
|
||||
$rabbit_ha_virtual_ip = false,
|
||||
$queue_provider = 'rabbitmq',
|
||||
$qpid_password = 'qpid_pw',
|
||||
$qpid_user = 'nova',
|
||||
$qpid_nodes = ['127.0.0.1'],
|
||||
$rabbit_nodes = false,
|
||||
$rabbit_password = 'rabbit_pw',
|
||||
$rabbit_host = false,
|
||||
$rabbit_user = 'nova',
|
||||
$rabbit_ha_virtual_ip = false,
|
||||
$queue_provider = 'rabbitmq',
|
||||
$qpid_password = 'qpid_pw',
|
||||
$qpid_user = 'nova',
|
||||
$qpid_nodes = ['127.0.0.1'],
|
||||
) {
|
||||
if !defined(Class['swift']) {
|
||||
class { 'swift':
|
||||
|
@ -72,7 +71,6 @@ class openstack::swift::storage_node (
|
|||
swift_zone => $swift_zone,
|
||||
debug => $debug,
|
||||
verbose => $verbose,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
}
|
||||
|
||||
validate_string($master_swift_proxy_ip)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# file is managed by puppet
|
||||
#
|
||||
<% if scope.lookupvar('rsyslog::client::log_remote') -%>
|
||||
# Log to remote syslog server using <%= scope.lookupvar('rsyslog::client::remote_type') %>
|
||||
<% if @log_remote -%>
|
||||
# Log to remote syslog server
|
||||
# Templates
|
||||
# RFC3164 emulation with long tags (32+)
|
||||
$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
|
||||
$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 rserver['remote_type'] == '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 -%>
|
||||
# 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 -%>
|
|
@ -1,6 +1,4 @@
|
|||
# managed by puppet
|
||||
|
||||
<%= @syslog_log_facility_nova_matched %>.* -/var/log/nova-all.log
|
||||
& ~
|
||||
:syslogtag, contains, "nova" -/var/log/nova-all.log
|
||||
& ~
|
|
@ -1,6 +1,4 @@
|
|||
# managed by puppet
|
||||
|
||||
<%= @syslog_log_facility_keystone_matched %>.* -/var/log/keystone-all.log
|
||||
& ~
|
||||
:syslogtag, contains, "keystone" -/var/log/keystone-all.log
|
||||
& ~
|
|
@ -1,6 +1,4 @@
|
|||
# managed by puppet
|
||||
|
||||
<%= @syslog_log_facility_cinder_matched %>.* -/var/log/cinder-all.log
|
||||
& ~
|
||||
:syslogtag, contains, "cinder" -/var/log/cinder-all.log
|
||||
& ~
|
|
@ -1,7 +1,7 @@
|
|||
# file is managed by puppet
|
||||
#
|
||||
# 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)
|
||||
$Template RemoteLog, "%timegenerated:1:32:date-rfc3339% %syslogseverity-text%: %msg%\n"
|
||||
<% 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'
|
||||
$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"
|
||||
|
||||
# Parse puppet logs
|
||||
:syslogtag, regex, "puppet-user" ?PuppetApplyLogFile;RemoteLog
|
||||
:syslogtag, regex, "puppet-user" ~
|
||||
|
||||
&~
|
||||
:syslogtag, regex, "puppet-error" ?PuppetApplyLogFile;RemoteLog
|
||||
:syslogtag, regex, "puppet-error" ~
|
||||
&~
|
||||
|
||||
:FROMHOST, regex, "^[1-9]" ?RemoteLogFile;RemoteLog
|
||||
# Drop message here and do not forward
|
||||
:FROMHOST, regex, "^[1-9]" ~
|
||||
&~
|
|
@ -1,6 +1,4 @@
|
|||
# managed by puppet
|
||||
|
||||
<%= @syslog_log_facility_glance_matched %>.* -/var/log/glance-all.log
|
||||
& ~
|
||||
:syslogtag, contains, "glance" -/var/log/glance-all.log
|
||||
& ~
|
|
@ -1,6 +1,4 @@
|
|||
# managed by puppet
|
||||
|
||||
<%= @syslog_log_facility_neutron_matched %>.* -/var/log/neutron-all.log
|
||||
& ~
|
||||
:syslogtag, contains, "neutron" -/var/log/neutron-all.log
|
||||
& ~
|
|
@ -1,4 +1,4 @@
|
|||
# managed by puppet
|
||||
|
||||
:syslogtag, contains, "ceilometer" -/var/log/ceilometer-all.log
|
||||
:syslogtag, contains, "ceilometer" ~
|
||||
&~
|
|
@ -1,15 +1,15 @@
|
|||
# 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
|
||||
auth,authpriv.* /var/log/auth.log
|
||||
<% end -%>
|
||||
|
||||
<% if scope.lookupvar('rsyslog::client::log_local') -%>
|
||||
<% if @log_local -%>
|
||||
# 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
|
||||
#
|
||||
*.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.
|
||||
# Verbose would have set INFO level messages
|
||||
# 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
|
||||
$debug = $::fuel_settings['debug']
|
||||
|
||||
|
@ -97,21 +96,23 @@ $debug = $::fuel_settings['debug']
|
|||
|
||||
|
||||
### Syslog ###
|
||||
#TODO(bogdando) move logging options to astute.yaml
|
||||
# Enable error messages reporting to rsyslog. Rsyslog must be installed in this case.
|
||||
$use_syslog = $::fuel_settings['use_syslog'] ? { default=>true }
|
||||
# Default log level would have been used, if non verbose and non debug
|
||||
$syslog_log_level = 'ERROR'
|
||||
# Syslog facilities for main openstack services, choose any, may overlap if needed
|
||||
# local0 is reserved for HA provisioning and orchestration services,
|
||||
# Syslog facilities for main openstack services
|
||||
# should vary (reserved usage)
|
||||
# local1 is reserved for openstack-dashboard
|
||||
$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'
|
||||
$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'
|
||||
# could be the same
|
||||
# local0 is free for use
|
||||
$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 = {
|
||||
'POST' => 1000,
|
||||
|
@ -200,7 +201,7 @@ class os_common {
|
|||
class { "::openstack::logging":
|
||||
stage => 'first',
|
||||
role => 'client',
|
||||
show_timezone => true,
|
||||
show_timezone => true,
|
||||
# log both locally include auth, and remote
|
||||
log_remote => true,
|
||||
log_local => true,
|
||||
|
@ -214,20 +215,8 @@ class os_common {
|
|||
rservers => $rservers,
|
||||
# should be true, if client is running at virtual node
|
||||
virtual => str2bool($::is_virtual),
|
||||
# facilities
|
||||
syslog_log_facility_murano => $syslog_log_facility_murano,
|
||||
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,
|
||||
# Rabbit doesn't support syslog directly
|
||||
rabbit_log_level => 'NOTICE',
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -256,90 +256,90 @@ class osnailyfacter::cluster_ha {
|
|||
class {'osnailyfacter::apache_api_proxy':}
|
||||
|
||||
class { 'openstack::controller_ha':
|
||||
controllers => $::osnailyfacter::cluster_ha::controllers,
|
||||
controller_public_addresses => $::osnailyfacter::cluster_ha::controller_public_addresses,
|
||||
controller_internal_addresses => $::osnailyfacter::cluster_ha::controller_internal_addresses,
|
||||
internal_address => $::internal_address,
|
||||
public_interface => $::public_int,
|
||||
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface']},
|
||||
internal_virtual_ip => $::fuel_settings['management_vip'],
|
||||
public_virtual_ip => $::fuel_settings['public_vip'],
|
||||
primary_controller => $::osnailyfacter::cluster_ha::primary_controller,
|
||||
floating_range => $::use_quantum ? { true=>$floating_hash, default=>false},
|
||||
fixed_range => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_network_range']},
|
||||
multi_host => $::osnailyfacter::cluster_ha::multi_host,
|
||||
network_manager => $::osnailyfacter::cluster_ha::network_manager,
|
||||
num_networks => $::osnailyfacter::cluster_ha::num_networks,
|
||||
network_size => $::osnailyfacter::cluster_ha::network_size,
|
||||
network_config => $::osnailyfacter::cluster_ha::network_config,
|
||||
debug => $::osnailyfacter::cluster_ha::debug,
|
||||
verbose => $::osnailyfacter::cluster_ha::verbose,
|
||||
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
||||
mysql_root_password => $::osnailyfacter::cluster_ha::mysql_hash[root_password],
|
||||
admin_email => $::osnailyfacter::cluster_ha::access_hash[email],
|
||||
admin_user => $::osnailyfacter::cluster_ha::access_hash[user],
|
||||
admin_password => $::osnailyfacter::cluster_ha::access_hash[password],
|
||||
keystone_db_password => $::osnailyfacter::cluster_ha::keystone_hash[db_password],
|
||||
keystone_admin_token => $::osnailyfacter::cluster_ha::keystone_hash[admin_token],
|
||||
keystone_admin_tenant => $::osnailyfacter::cluster_ha::access_hash[tenant],
|
||||
glance_db_password => $::osnailyfacter::cluster_ha::glance_hash[db_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],
|
||||
nova_db_password => $::osnailyfacter::cluster_ha::nova_hash[db_password],
|
||||
nova_user_password => $::osnailyfacter::cluster_ha::nova_hash[user_password],
|
||||
queue_provider => $::queue_provider,
|
||||
amqp_hosts => $::osnailyfacter::cluster_ha::amqp_hosts,
|
||||
amqp_user => $::osnailyfacter::cluster_ha::rabbit_hash['user'],
|
||||
amqp_password => $::osnailyfacter::cluster_ha::rabbit_hash['password'],
|
||||
rabbit_ha_queues => $::osnailyfacter::cluster_ha::rabbit_ha_queues,
|
||||
rabbitmq_bind_ip_address => $::osnailyfacter::cluster_ha::rabbitmq_bind_ip_address,
|
||||
rabbitmq_bind_port => $::osnailyfacter::cluster_ha::rabbitmq_bind_port,
|
||||
rabbitmq_cluster_nodes => $::osnailyfacter::cluster_ha::rabbitmq_cluster_nodes,
|
||||
memcached_servers => $::osnailyfacter::cluster_ha::controller_nodes,
|
||||
export_resources => false,
|
||||
glance_backend => $::osnailyfacter::cluster_ha::glance_backend,
|
||||
swift_proxies => $::osnailyfacter::cluster_ha::swift_proxies,
|
||||
rgw_servers => $::osnailyfacter::cluster_ha::rgw_servers,
|
||||
quantum => $::use_quantum,
|
||||
quantum_config => $::osnailyfacter::cluster_ha::quantum_config,
|
||||
quantum_network_node => $::use_quantum,
|
||||
quantum_netnode_on_cnt => $::use_quantum,
|
||||
cinder => true,
|
||||
cinder_user_password => $::osnailyfacter::cluster_ha::cinder_hash[user_password],
|
||||
cinder_iscsi_bind_addr => $::osnailyfacter::cluster_ha::cinder_iscsi_bind_addr,
|
||||
cinder_db_password => $::osnailyfacter::cluster_ha::cinder_hash[db_password],
|
||||
cinder_volume_group => "cinder",
|
||||
manage_volumes => $::osnailyfacter::cluster_ha::manage_volumes,
|
||||
ceilometer => $::osnailyfacter::cluster_ha::ceilometer_hash[enabled],
|
||||
ceilometer_db_password => $::osnailyfacter::cluster_ha::ceilometer_hash[db_password],
|
||||
ceilometer_user_password => $::osnailyfacter::cluster_ha::ceilometer_hash[user_password],
|
||||
ceilometer_metering_secret => $::osnailyfacter::cluster_ha::ceilometer_hash[metering_secret],
|
||||
ceilometer_db_type => 'mongodb',
|
||||
ceilometer_db_host => mongo_hosts($nodes_hash),
|
||||
galera_nodes => $::osnailyfacter::cluster_ha::controller_nodes,
|
||||
novnc_address => $::internal_address,
|
||||
sahara => $::osnailyfacter::cluster_ha::sahara_hash[enabled],
|
||||
murano => $::osnailyfacter::cluster_ha::murano_hash['enabled'],
|
||||
custom_mysql_setup_class => $::custom_mysql_setup_class,
|
||||
mysql_skip_name_resolve => true,
|
||||
use_syslog => $::osnailyfacter::cluster_ha::use_syslog,
|
||||
syslog_log_level => $::syslog_log_level,
|
||||
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,
|
||||
nova_rate_limits => $::nova_rate_limits,
|
||||
cinder_rate_limits => $::cinder_rate_limits,
|
||||
horizon_use_ssl => $::fuel_settings['horizon_use_ssl'],
|
||||
use_unicast_corosync => $::fuel_settings['use_unicast_corosync'],
|
||||
nameservers => $::dns_nameservers,
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
max_overflow => $max_overflow,
|
||||
idle_timeout => $idle_timeout,
|
||||
nova_report_interval => $::nova_report_interval,
|
||||
nova_service_down_time => $::nova_service_down_time,
|
||||
controllers => $::osnailyfacter::cluster_ha::controllers,
|
||||
controller_public_addresses => $::osnailyfacter::cluster_ha::controller_public_addresses,
|
||||
controller_internal_addresses => $::osnailyfacter::cluster_ha::controller_internal_addresses,
|
||||
internal_address => $::internal_address,
|
||||
public_interface => $::public_int,
|
||||
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface']},
|
||||
internal_virtual_ip => $::fuel_settings['management_vip'],
|
||||
public_virtual_ip => $::fuel_settings['public_vip'],
|
||||
primary_controller => $::osnailyfacter::cluster_ha::primary_controller,
|
||||
floating_range => $::use_quantum ? { true=>$floating_hash, default=>false},
|
||||
fixed_range => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_network_range']},
|
||||
multi_host => $::osnailyfacter::cluster_ha::multi_host,
|
||||
network_manager => $::osnailyfacter::cluster_ha::network_manager,
|
||||
num_networks => $::osnailyfacter::cluster_ha::num_networks,
|
||||
network_size => $::osnailyfacter::cluster_ha::network_size,
|
||||
network_config => $::osnailyfacter::cluster_ha::network_config,
|
||||
debug => $::osnailyfacter::cluster_ha::debug,
|
||||
verbose => $::osnailyfacter::cluster_ha::verbose,
|
||||
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
||||
mysql_root_password => $::osnailyfacter::cluster_ha::mysql_hash[root_password],
|
||||
admin_email => $::osnailyfacter::cluster_ha::access_hash[email],
|
||||
admin_user => $::osnailyfacter::cluster_ha::access_hash[user],
|
||||
admin_password => $::osnailyfacter::cluster_ha::access_hash[password],
|
||||
keystone_db_password => $::osnailyfacter::cluster_ha::keystone_hash[db_password],
|
||||
keystone_admin_token => $::osnailyfacter::cluster_ha::keystone_hash[admin_token],
|
||||
keystone_admin_tenant => $::osnailyfacter::cluster_ha::access_hash[tenant],
|
||||
glance_db_password => $::osnailyfacter::cluster_ha::glance_hash[db_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],
|
||||
nova_db_password => $::osnailyfacter::cluster_ha::nova_hash[db_password],
|
||||
nova_user_password => $::osnailyfacter::cluster_ha::nova_hash[user_password],
|
||||
queue_provider => $::queue_provider,
|
||||
amqp_hosts => $::osnailyfacter::cluster_ha::amqp_hosts,
|
||||
amqp_user => $::osnailyfacter::cluster_ha::rabbit_hash['user'],
|
||||
amqp_password => $::osnailyfacter::cluster_ha::rabbit_hash['password'],
|
||||
rabbit_ha_queues => $::osnailyfacter::cluster_ha::rabbit_ha_queues,
|
||||
rabbitmq_bind_ip_address => $::osnailyfacter::cluster_ha::rabbitmq_bind_ip_address,
|
||||
rabbitmq_bind_port => $::osnailyfacter::cluster_ha::rabbitmq_bind_port,
|
||||
rabbitmq_cluster_nodes => $::osnailyfacter::cluster_ha::rabbitmq_cluster_nodes,
|
||||
memcached_servers => $::osnailyfacter::cluster_ha::controller_nodes,
|
||||
export_resources => false,
|
||||
glance_backend => $::osnailyfacter::cluster_ha::glance_backend,
|
||||
swift_proxies => $::osnailyfacter::cluster_ha::swift_proxies,
|
||||
rgw_servers => $::osnailyfacter::cluster_ha::rgw_servers,
|
||||
quantum => $::use_quantum,
|
||||
quantum_config => $::osnailyfacter::cluster_ha::quantum_config,
|
||||
quantum_network_node => $::use_quantum,
|
||||
quantum_netnode_on_cnt => $::use_quantum,
|
||||
cinder => true,
|
||||
cinder_user_password => $::osnailyfacter::cluster_ha::cinder_hash[user_password],
|
||||
cinder_iscsi_bind_addr => $::osnailyfacter::cluster_ha::cinder_iscsi_bind_addr,
|
||||
cinder_db_password => $::osnailyfacter::cluster_ha::cinder_hash[db_password],
|
||||
cinder_volume_group => "cinder",
|
||||
manage_volumes => $::osnailyfacter::cluster_ha::manage_volumes,
|
||||
ceilometer => $::osnailyfacter::cluster_ha::ceilometer_hash[enabled],
|
||||
ceilometer_db_password => $::osnailyfacter::cluster_ha::ceilometer_hash[db_password],
|
||||
ceilometer_user_password => $::osnailyfacter::cluster_ha::ceilometer_hash[user_password],
|
||||
ceilometer_metering_secret => $::osnailyfacter::cluster_ha::ceilometer_hash[metering_secret],
|
||||
ceilometer_db_type => 'mongodb',
|
||||
ceilometer_db_host => mongo_hosts($nodes_hash),
|
||||
galera_nodes => $::osnailyfacter::cluster_ha::controller_nodes,
|
||||
novnc_address => $::internal_address,
|
||||
sahara => $::osnailyfacter::cluster_ha::sahara_hash[enabled],
|
||||
murano => $::osnailyfacter::cluster_ha::murano_hash['enabled'],
|
||||
custom_mysql_setup_class => $::custom_mysql_setup_class,
|
||||
mysql_skip_name_resolve => true,
|
||||
use_syslog => $::osnailyfacter::cluster_ha::use_syslog,
|
||||
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_ceilometer => $::syslog_log_facility_ceilometer,
|
||||
nova_rate_limits => $::nova_rate_limits,
|
||||
cinder_rate_limits => $::cinder_rate_limits,
|
||||
horizon_use_ssl => $::fuel_settings['horizon_use_ssl'],
|
||||
use_unicast_corosync => $::fuel_settings['use_unicast_corosync'],
|
||||
nameservers => $::dns_nameservers,
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
max_overflow => $max_overflow,
|
||||
idle_timeout => $idle_timeout,
|
||||
nova_report_interval => $::nova_report_interval,
|
||||
nova_service_down_time => $::nova_service_down_time,
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -381,7 +381,6 @@ class osnailyfacter::cluster_ha {
|
|||
swift_local_net_ip => $::storage_address,
|
||||
master_swift_proxy_ip => $master_swift_proxy_ip,
|
||||
sync_rings => ! $primary_proxy,
|
||||
syslog_log_level => $::syslog_log_level,
|
||||
debug => $::debug,
|
||||
verbose => $::verbose,
|
||||
}
|
||||
|
@ -404,7 +403,6 @@ class osnailyfacter::cluster_ha {
|
|||
controller_node_address => $::fuel_settings['management_vip'],
|
||||
swift_local_net_ip => $swift_local_net_ip,
|
||||
master_swift_proxy_ip => $master_swift_proxy_ip,
|
||||
syslog_log_level => $::syslog_log_level,
|
||||
debug => $::debug,
|
||||
verbose => $::verbose,
|
||||
}
|
||||
|
@ -461,7 +459,6 @@ class osnailyfacter::cluster_ha {
|
|||
use_floating_ips => $::fuel_settings['auto_assign_floating_ip'],
|
||||
|
||||
syslog_log_facility_sahara => $syslog_log_facility_sahara,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
debug => $::debug,
|
||||
verbose => $::verbose,
|
||||
use_syslog => $::use_syslog,
|
||||
|
@ -567,63 +564,55 @@ class osnailyfacter::cluster_ha {
|
|||
include osnailyfacter::test_compute
|
||||
|
||||
class { 'openstack::compute':
|
||||
public_interface => $::public_int,
|
||||
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface'] },
|
||||
internal_address => $::internal_address,
|
||||
libvirt_type => $::fuel_settings['libvirt_type'],
|
||||
fixed_range => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_network_range']},
|
||||
network_manager => $network_manager,
|
||||
network_config => $network_config,
|
||||
multi_host => $multi_host,
|
||||
sql_connection => "mysql://nova:${nova_hash[db_password]}@${::fuel_settings['management_vip']}/nova?read_timeout=60",
|
||||
queue_provider => $::queue_provider,
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $rabbit_hash['user'],
|
||||
amqp_password => $rabbit_hash['password'],
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
||||
glance_api_servers => "${::fuel_settings['management_vip']}:9292",
|
||||
vncproxy_host => $::fuel_settings['public_vip'],
|
||||
vncserver_listen => '0.0.0.0',
|
||||
debug => $::debug,
|
||||
verbose => $::verbose,
|
||||
cinder_volume_group => "cinder",
|
||||
vnc_enabled => true,
|
||||
manage_volumes => $manage_volumes,
|
||||
nova_user_password => $nova_hash[user_password],
|
||||
cache_server_ip => $controller_nodes,
|
||||
service_endpoint => $::fuel_settings['management_vip'],
|
||||
cinder => true,
|
||||
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
||||
cinder_user_password => $cinder_hash[user_password],
|
||||
cinder_db_password => $cinder_hash[db_password],
|
||||
ceilometer => $ceilometer_hash[enabled],
|
||||
ceilometer_metering_secret => $ceilometer_hash[metering_secret],
|
||||
ceilometer_user_password => $ceilometer_hash[user_password],
|
||||
db_host => $::fuel_settings['management_vip'],
|
||||
quantum => $::use_quantum,
|
||||
quantum_config => $quantum_config,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_level => $::syslog_log_level,
|
||||
syslog_log_facility => $::syslog_log_facility_nova,
|
||||
public_interface => $::public_int,
|
||||
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface'] },
|
||||
internal_address => $::internal_address,
|
||||
libvirt_type => $::fuel_settings['libvirt_type'],
|
||||
fixed_range => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_network_range']},
|
||||
network_manager => $network_manager,
|
||||
network_config => $network_config,
|
||||
multi_host => $multi_host,
|
||||
sql_connection => "mysql://nova:${nova_hash[db_password]}@${::fuel_settings['management_vip']}/nova?read_timeout=60",
|
||||
queue_provider => $::queue_provider,
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $rabbit_hash['user'],
|
||||
amqp_password => $rabbit_hash['password'],
|
||||
rabbit_ha_queues => $rabbit_ha_queues,
|
||||
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
||||
glance_api_servers => "${::fuel_settings['management_vip']}:9292",
|
||||
vncproxy_host => $::fuel_settings['public_vip'],
|
||||
vncserver_listen => '0.0.0.0',
|
||||
debug => $::debug,
|
||||
verbose => $::verbose,
|
||||
cinder_volume_group => "cinder",
|
||||
vnc_enabled => true,
|
||||
manage_volumes => $manage_volumes,
|
||||
nova_user_password => $nova_hash[user_password],
|
||||
cache_server_ip => $controller_nodes,
|
||||
service_endpoint => $::fuel_settings['management_vip'],
|
||||
cinder => true,
|
||||
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
||||
cinder_user_password => $cinder_hash[user_password],
|
||||
cinder_db_password => $cinder_hash[db_password],
|
||||
ceilometer => $ceilometer_hash[enabled],
|
||||
ceilometer_metering_secret => $ceilometer_hash[metering_secret],
|
||||
ceilometer_user_password => $ceilometer_hash[user_password],
|
||||
db_host => $::fuel_settings['management_vip'],
|
||||
quantum => $::use_quantum,
|
||||
quantum_config => $quantum_config,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $::syslog_log_facility_nova,
|
||||
syslog_log_facility_neutron => $::syslog_log_facility_neutron,
|
||||
syslog_log_facility_cinder => $::syslog_log_facility_cinder,
|
||||
nova_rate_limits => $::nova_rate_limits,
|
||||
nova_report_interval => $::nova_report_interval,
|
||||
nova_service_down_time => $::nova_service_down_time,
|
||||
state_path => $nova_hash[state_path],
|
||||
nova_rate_limits => $::nova_rate_limits,
|
||||
nova_report_interval => $::nova_report_interval,
|
||||
nova_service_down_time => $::nova_service_down_time,
|
||||
state_path => $nova_hash[state_path],
|
||||
}
|
||||
|
||||
if ($::use_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
|
||||
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'] }
|
||||
|
@ -677,7 +666,6 @@ class osnailyfacter::cluster_ha {
|
|||
iscsi_bind_host => $::storage_address,
|
||||
cinder_user_password => $cinder_hash[user_password],
|
||||
syslog_log_facility => $::syslog_log_facility_cinder,
|
||||
syslog_log_level => $::syslog_log_level,
|
||||
debug => $::debug,
|
||||
verbose => $::verbose,
|
||||
use_syslog => $::use_syslog,
|
||||
|
@ -687,11 +675,6 @@ class osnailyfacter::cluster_ha {
|
|||
idle_timeout => $idle_timeout,
|
||||
|
||||
}
|
||||
# class { "::rsyslog::client":
|
||||
# log_local => true,
|
||||
# log_auth_local => true,
|
||||
# rservers => $rservers,
|
||||
# }
|
||||
} # CINDER ENDS
|
||||
|
||||
"ceph-osd" : {
|
||||
|
|
|
@ -156,78 +156,78 @@ class osnailyfacter::cluster_simple {
|
|||
|
||||
class {'osnailyfacter::apache_api_proxy':}
|
||||
class { 'openstack::controller':
|
||||
admin_address => $controller_node_address,
|
||||
public_address => $controller_node_public,
|
||||
public_interface => $::public_int,
|
||||
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface']},
|
||||
internal_address => $controller_node_address,
|
||||
service_endpoint => $controller_node_address,
|
||||
floating_range => false, #todo: remove as not needed ???
|
||||
fixed_range => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_network_range'] },
|
||||
multi_host => $multi_host,
|
||||
network_manager => $network_manager,
|
||||
num_networks => $::use_quantum ? { true=>false, default=>$novanetwork_params['num_networks'] },
|
||||
network_size => $::use_quantum ? { true=>false, default=>$novanetwork_params['network_size'] },
|
||||
network_config => $::use_quantum ? { true=>false, default=>$network_config },
|
||||
debug => $debug,
|
||||
verbose => $verbose,
|
||||
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
||||
mysql_root_password => $mysql_hash[root_password],
|
||||
admin_email => $access_hash[email],
|
||||
admin_user => $access_hash[user],
|
||||
admin_password => $access_hash[password],
|
||||
keystone_db_password => $keystone_hash[db_password],
|
||||
keystone_admin_token => $keystone_hash[admin_token],
|
||||
keystone_admin_tenant => $access_hash[tenant],
|
||||
glance_db_password => $glance_hash[db_password],
|
||||
glance_user_password => $glance_hash[user_password],
|
||||
glance_backend => $glance_backend,
|
||||
glance_image_cache_max_size => $glance_hash[image_cache_max_size],
|
||||
nova_db_password => $nova_hash[db_password],
|
||||
nova_user_password => $nova_hash[user_password],
|
||||
nova_rate_limits => $::nova_rate_limits,
|
||||
ceilometer => $ceilometer_hash[enabled],
|
||||
ceilometer_db_password => $ceilometer_hash[db_password],
|
||||
ceilometer_user_password => $ceilometer_hash[user_password],
|
||||
ceilometer_metering_secret => $ceilometer_hash[metering_secret],
|
||||
ceilometer_db_type => 'mongodb',
|
||||
ceilometer_db_host => mongo_hosts($nodes_hash),
|
||||
queue_provider => $::queue_provider,
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $rabbit_hash['user'],
|
||||
amqp_password => $rabbit_hash['password'],
|
||||
rabbitmq_bind_ip_address => $rabbitmq_bind_ip_address,
|
||||
rabbitmq_bind_port => $rabbitmq_bind_port,
|
||||
rabbitmq_cluster_nodes => $rabbitmq_cluster_nodes,
|
||||
export_resources => false,
|
||||
quantum => $::use_quantum,
|
||||
quantum_config => $quantum_config,
|
||||
quantum_network_node => $::use_quantum,
|
||||
quantum_netnode_on_cnt => $::use_quantum,
|
||||
cinder => true,
|
||||
cinder_user_password => $cinder_hash[user_password],
|
||||
cinder_db_password => $cinder_hash[db_password],
|
||||
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
||||
cinder_volume_group => "cinder",
|
||||
manage_volumes => $manage_volumes,
|
||||
use_syslog => $use_syslog,
|
||||
novnc_address => $controller_node_public,
|
||||
syslog_log_level => $::syslog_log_level,
|
||||
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,
|
||||
cinder_rate_limits => $::cinder_rate_limits,
|
||||
horizon_use_ssl => $::horizon_use_ssl,
|
||||
nameservers => $::dns_nameservers,
|
||||
primary_controller => true,
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
max_overflow => $max_overflow,
|
||||
idle_timeout => $idle_timeout,
|
||||
nova_report_interval => $::nova_report_interval,
|
||||
nova_service_down_time => $::nova_service_down_time,
|
||||
admin_address => $controller_node_address,
|
||||
public_address => $controller_node_public,
|
||||
public_interface => $::public_int,
|
||||
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface']},
|
||||
internal_address => $controller_node_address,
|
||||
service_endpoint => $controller_node_address,
|
||||
floating_range => false, #todo: remove as not needed ???
|
||||
fixed_range => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_network_range'] },
|
||||
multi_host => $multi_host,
|
||||
network_manager => $network_manager,
|
||||
num_networks => $::use_quantum ? { true=>false, default=>$novanetwork_params['num_networks'] },
|
||||
network_size => $::use_quantum ? { true=>false, default=>$novanetwork_params['network_size'] },
|
||||
network_config => $::use_quantum ? { true=>false, default=>$network_config },
|
||||
debug => $debug,
|
||||
verbose => $verbose,
|
||||
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
||||
mysql_root_password => $mysql_hash[root_password],
|
||||
admin_email => $access_hash[email],
|
||||
admin_user => $access_hash[user],
|
||||
admin_password => $access_hash[password],
|
||||
keystone_db_password => $keystone_hash[db_password],
|
||||
keystone_admin_token => $keystone_hash[admin_token],
|
||||
keystone_admin_tenant => $access_hash[tenant],
|
||||
glance_db_password => $glance_hash[db_password],
|
||||
glance_user_password => $glance_hash[user_password],
|
||||
glance_backend => $glance_backend,
|
||||
glance_image_cache_max_size => $glance_hash[image_cache_max_size],
|
||||
nova_db_password => $nova_hash[db_password],
|
||||
nova_user_password => $nova_hash[user_password],
|
||||
nova_rate_limits => $::nova_rate_limits,
|
||||
ceilometer => $ceilometer_hash[enabled],
|
||||
ceilometer_db_password => $ceilometer_hash[db_password],
|
||||
ceilometer_user_password => $ceilometer_hash[user_password],
|
||||
ceilometer_metering_secret => $ceilometer_hash[metering_secret],
|
||||
ceilometer_db_type => 'mongodb',
|
||||
ceilometer_db_host => mongo_hosts($nodes_hash),
|
||||
queue_provider => $::queue_provider,
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $rabbit_hash['user'],
|
||||
amqp_password => $rabbit_hash['password'],
|
||||
rabbitmq_bind_ip_address => $rabbitmq_bind_ip_address,
|
||||
rabbitmq_bind_port => $rabbitmq_bind_port,
|
||||
rabbitmq_cluster_nodes => $rabbitmq_cluster_nodes,
|
||||
export_resources => false,
|
||||
quantum => $::use_quantum,
|
||||
quantum_config => $quantum_config,
|
||||
quantum_network_node => $::use_quantum,
|
||||
quantum_netnode_on_cnt => $::use_quantum,
|
||||
cinder => true,
|
||||
cinder_user_password => $cinder_hash[user_password],
|
||||
cinder_db_password => $cinder_hash[db_password],
|
||||
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
||||
cinder_volume_group => "cinder",
|
||||
manage_volumes => $manage_volumes,
|
||||
use_syslog => $use_syslog,
|
||||
novnc_address => $controller_node_public,
|
||||
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_ceilometer => $::syslog_log_facility_ceilometer,
|
||||
cinder_rate_limits => $::cinder_rate_limits,
|
||||
horizon_use_ssl => $::horizon_use_ssl,
|
||||
nameservers => $::dns_nameservers,
|
||||
primary_controller => true,
|
||||
max_retries => $max_retries,
|
||||
max_pool_size => $max_pool_size,
|
||||
max_overflow => $max_overflow,
|
||||
idle_timeout => $idle_timeout,
|
||||
nova_report_interval => $::nova_report_interval,
|
||||
nova_service_down_time => $::nova_service_down_time,
|
||||
}
|
||||
|
||||
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_user => $rabbit_hash[user],
|
||||
# qpid_nodes => [$controller_node_address],
|
||||
neutron_config => $quantum_config,
|
||||
neutron_network_node => true,
|
||||
neutron_config => $quantum_config,
|
||||
neutron_network_node => true,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_level => $::syslog_log_level,
|
||||
syslog_log_facility => $::syslog_log_facility_neutron,
|
||||
}
|
||||
}
|
||||
|
@ -287,7 +286,6 @@ class osnailyfacter::cluster_simple {
|
|||
use_floating_ips => $::fuel_settings['auto_assign_floating_ip'],
|
||||
|
||||
syslog_log_facility_sahara => $syslog_log_facility_sahara,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
debug => $debug,
|
||||
verbose => $verbose,
|
||||
use_syslog => $use_syslog,
|
||||
|
@ -308,20 +306,20 @@ class osnailyfacter::cluster_simple {
|
|||
|
||||
if ($::operatingsystem != 'RedHat') {
|
||||
class { 'heat' :
|
||||
pacemaker => false,
|
||||
external_ip => $controller_node_public,
|
||||
pacemaker => false,
|
||||
external_ip => $controller_node_public,
|
||||
|
||||
keystone_host => $controller_node_address,
|
||||
keystone_user => 'heat',
|
||||
keystone_password => 'heat',
|
||||
keystone_tenant => 'services',
|
||||
keystone_host => $controller_node_address,
|
||||
keystone_user => 'heat',
|
||||
keystone_password => 'heat',
|
||||
keystone_tenant => 'services',
|
||||
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $rabbit_hash['user'],
|
||||
amqp_password => $rabbit_hash['password'],
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $rabbit_hash['user'],
|
||||
amqp_password => $rabbit_hash['password'],
|
||||
|
||||
db_host => $controller_node_address,
|
||||
db_password => $heat_hash['db_password'],
|
||||
db_host => $controller_node_address,
|
||||
db_password => $heat_hash['db_password'],
|
||||
|
||||
debug => $debug,
|
||||
verbose => $verbose,
|
||||
|
@ -387,52 +385,51 @@ class osnailyfacter::cluster_simple {
|
|||
include osnailyfacter::test_compute
|
||||
|
||||
class { 'openstack::compute':
|
||||
public_interface => $::public_int,
|
||||
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface'] },
|
||||
internal_address => $::internal_address,
|
||||
libvirt_type => $::fuel_settings['libvirt_type'],
|
||||
fixed_range => $::fuel_settings['fixed_network_range'],
|
||||
network_manager => $network_manager,
|
||||
network_config => $::use_quantum ? { true=>false, default=>$network_config },
|
||||
multi_host => $multi_host,
|
||||
sql_connection => $sql_connection,
|
||||
nova_user_password => $nova_hash[user_password],
|
||||
ceilometer => $ceilometer_hash[enabled],
|
||||
ceilometer_metering_secret => $ceilometer_hash[metering_secret],
|
||||
ceilometer_user_password => $ceilometer_hash[user_password],
|
||||
queue_provider => $::queue_provider,
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $rabbit_hash['user'],
|
||||
amqp_password => $rabbit_hash['password'],
|
||||
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
||||
glance_api_servers => "${controller_node_address}:9292",
|
||||
vncproxy_host => $controller_node_public,
|
||||
vncserver_listen => '0.0.0.0',
|
||||
vnc_enabled => true,
|
||||
quantum => $::use_quantum,
|
||||
quantum_config => $quantum_config,
|
||||
# quantum_network_node => $::use_quantum,
|
||||
# quantum_netnode_on_cnt => $::use_quantum,
|
||||
service_endpoint => $controller_node_address,
|
||||
cinder => true,
|
||||
cinder_user_password => $cinder_hash[user_password],
|
||||
cinder_db_password => $cinder_hash[db_password],
|
||||
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
||||
cinder_volume_group => "cinder",
|
||||
manage_volumes => $manage_volumes,
|
||||
db_host => $controller_node_address,
|
||||
debug => $debug,
|
||||
verbose => $verbose,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_level => $::syslog_log_level,
|
||||
syslog_log_facility => $::syslog_log_facility_nova,
|
||||
syslog_log_facility_neutron => $::syslog_log_facility_neutron,
|
||||
syslog_log_facility_cinder => $::syslog_log_facility_cinder,
|
||||
state_path => $nova_hash[state_path],
|
||||
nova_rate_limits => $::nova_rate_limits,
|
||||
nova_report_interval => $::nova_report_interval,
|
||||
nova_service_down_time => $::nova_service_down_time,
|
||||
cinder_rate_limits => $::cinder_rate_limits
|
||||
public_interface => $::public_int,
|
||||
private_interface => $::use_quantum ? { true=>false, default=>$::fuel_settings['fixed_interface'] },
|
||||
internal_address => $::internal_address,
|
||||
libvirt_type => $::fuel_settings['libvirt_type'],
|
||||
fixed_range => $::fuel_settings['fixed_network_range'],
|
||||
network_manager => $network_manager,
|
||||
network_config => $::use_quantum ? { true=>false, default=>$network_config },
|
||||
multi_host => $multi_host,
|
||||
sql_connection => $sql_connection,
|
||||
nova_user_password => $nova_hash[user_password],
|
||||
ceilometer => $ceilometer_hash[enabled],
|
||||
ceilometer_metering_secret => $ceilometer_hash[metering_secret],
|
||||
ceilometer_user_password => $ceilometer_hash[user_password],
|
||||
queue_provider => $::queue_provider,
|
||||
amqp_hosts => $amqp_hosts,
|
||||
amqp_user => $rabbit_hash['user'],
|
||||
amqp_password => $rabbit_hash['password'],
|
||||
auto_assign_floating_ip => $::fuel_settings['auto_assign_floating_ip'],
|
||||
glance_api_servers => "${controller_node_address}:9292",
|
||||
vncproxy_host => $controller_node_public,
|
||||
vncserver_listen => '0.0.0.0',
|
||||
vnc_enabled => true,
|
||||
quantum => $::use_quantum,
|
||||
quantum_config => $quantum_config,
|
||||
# quantum_network_node => $::use_quantum,
|
||||
# quantum_netnode_on_cnt => $::use_quantum,
|
||||
service_endpoint => $controller_node_address,
|
||||
cinder => true,
|
||||
cinder_user_password => $cinder_hash[user_password],
|
||||
cinder_db_password => $cinder_hash[db_password],
|
||||
cinder_iscsi_bind_addr => $cinder_iscsi_bind_addr,
|
||||
cinder_volume_group => "cinder",
|
||||
manage_volumes => $manage_volumes,
|
||||
db_host => $controller_node_address,
|
||||
debug => $debug,
|
||||
verbose => $verbose,
|
||||
use_syslog => $use_syslog,
|
||||
syslog_log_facility => $::syslog_log_facility_nova,
|
||||
syslog_log_facility_neutron => $::syslog_log_facility_neutron,
|
||||
syslog_log_facility_ceilometer => $::syslog_log_facility_ceilometer,
|
||||
state_path => $nova_hash[state_path],
|
||||
nova_rate_limits => $::nova_rate_limits,
|
||||
nova_report_interval => $::nova_report_interval,
|
||||
nova_service_down_time => $::nova_service_down_time,
|
||||
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/use_cow_images': value => $::fuel_settings['use_cow_images'] }
|
||||
|
@ -496,7 +493,6 @@ class osnailyfacter::cluster_simple {
|
|||
iscsi_bind_host => $cinder_iscsi_bind_addr,
|
||||
cinder_user_password => $cinder_hash[user_password],
|
||||
syslog_log_facility => $::syslog_log_facility_cinder,
|
||||
syslog_log_level => $::syslog_log_level,
|
||||
debug => $debug,
|
||||
verbose => $verbose,
|
||||
use_syslog => $use_syslog,
|
||||
|
|
|
@ -3,39 +3,15 @@
|
|||
#
|
||||
|
||||
class rsyslog::client (
|
||||
$high_precision_timestamps = false,
|
||||
$log_remote = true,
|
||||
$remote_type = 'udp',
|
||||
$log_local = true,
|
||||
$log_auth_local = true,
|
||||
$remote_type = 'tcp',
|
||||
$log_local = false,
|
||||
$log_auth_local = false,
|
||||
$custom_config = undef,
|
||||
$server = 'master',
|
||||
$port = '514',
|
||||
$server = 'log',
|
||||
$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 {
|
||||
|
||||
# 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 ? {
|
||||
'' => template("${module_name}/01-client.conf.erb"),
|
||||
default => template($custom_config),
|
||||
|
@ -48,438 +24,6 @@ if $virtual { include rsyslog::checksum_udp514 }
|
|||
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:
|
||||
purge => true,
|
||||
recurse => true,
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
class rsyslog {
|
||||
# assumes rsyslog packages installed at BM stage or included in distro
|
||||
include rsyslog::params, rsyslog::config, rsyslog::service
|
||||
include rsyslog::params, rsyslog::install, rsyslog::config, rsyslog::service
|
||||
}
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
class rsyslog::install {
|
||||
if $rsyslog::params::rsyslog_package_name {
|
||||
package { $rsyslog::params::rsyslog_package_name:
|
||||
ensure => $rsyslog::params::package_status,
|
||||
}
|
||||
}
|
||||
|
||||
if $rsyslog::params::relp_package_name {
|
||||
package { $rsyslog::params::relp_package_name:
|
||||
ensure => $rsyslog::params::package_status
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,10 @@ class rsyslog::params {
|
|||
case $::operatingsystem {
|
||||
/(?i)(ubuntu|debian|redhat|centos)/: {
|
||||
$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'
|
||||
$rsyslog_d = '/etc/rsyslog.d/'
|
||||
$rsyslog_conf = '/etc/rsyslog.conf'
|
||||
|
|
|
@ -5,17 +5,13 @@
|
|||
class rsyslog::server (
|
||||
$enable_tcp = true,
|
||||
$enable_udp = true,
|
||||
$port = '514',
|
||||
$server_dir = '/srv/log/',
|
||||
$custom_config = undef,
|
||||
$high_precision_timestamps = false,
|
||||
$escapenewline = false,
|
||||
$virtual = true,
|
||||
$port = '514',
|
||||
) inherits rsyslog {
|
||||
|
||||
# Fix for udp checksums should be applied if running on virtual node
|
||||
if $virtual { include rsyslog::checksum_udp514 }
|
||||
|
||||
File {
|
||||
owner => root,
|
||||
group => $rsyslog::params::run_group,
|
||||
|
@ -31,11 +27,6 @@ if $virtual { include rsyslog::checksum_udp514 }
|
|||
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:
|
||||
ensure => present,
|
||||
content => $custom_config ? {
|
||||
|
|
|
@ -17,9 +17,9 @@ class sahara::api (
|
|||
$debug = false,
|
||||
$verbose = false,
|
||||
$use_syslog = false,
|
||||
$syslog_log_level = 'WARNING',
|
||||
$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 {
|
||||
|
||||
validate_string($keystone_password)
|
||||
|
@ -75,58 +75,41 @@ class sahara::api (
|
|||
'DEFAULT/debug' : value => $debug;
|
||||
}
|
||||
|
||||
$logging_file = '/etc/sahara/logging.conf'
|
||||
case $::osfamily {
|
||||
'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 {
|
||||
# Log configuration
|
||||
if $log_dir {
|
||||
sahara_config {
|
||||
'DEFAULT/log_config' : value => $logging_file;
|
||||
'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'],
|
||||
'DEFAULT/log_dir' : value => $log_dir;
|
||||
}
|
||||
} else {
|
||||
sahara_config {
|
||||
'DEFAULT/log_config' : 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,
|
||||
'DEFAULT/log_dir' : ensure => absent;
|
||||
}
|
||||
}
|
||||
|
||||
File[$logdir] -> File['sahara-logging.conf']
|
||||
File['sahara-logging.conf'] ~> Service <| title == 'sahara-api' |>
|
||||
File['sahara-logging.conf'] -> Sahara_config['DEFAULT/log_config']
|
||||
if $log_file {
|
||||
sahara_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,
|
||||
mode => '0751',
|
||||
}
|
||||
|
|
|
@ -21,14 +21,13 @@ class sahara (
|
|||
$sahara_db_allowed_hosts = ['localhost','%'],
|
||||
|
||||
$sahara_firewall_rule = '201 sahara-api',
|
||||
$use_neutron = false,
|
||||
$use_floating_ips = false,
|
||||
$use_neutron = false,
|
||||
$use_floating_ips = false,
|
||||
|
||||
$use_syslog = false,
|
||||
$debug = false,
|
||||
$verbose = false,
|
||||
$syslog_log_level = 'WARNING',
|
||||
$syslog_log_facility_sahara = 'LOG_LOCAL0',
|
||||
$use_syslog = false,
|
||||
$debug = false,
|
||||
$verbose = false,
|
||||
$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"
|
||||
|
@ -57,7 +56,6 @@ class sahara (
|
|||
debug => $debug,
|
||||
use_syslog => $use_syslog,
|
||||
verbose => $verbose,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
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(
|
||||
$proxy_local_net_ip,
|
||||
$port = '8080',
|
||||
$pipeline = ['healthcheck', 'cache', 'tempauth', 'proxy-server'],
|
||||
$workers = $::processorcount,
|
||||
$port = '8080',
|
||||
$pipeline = ['healthcheck', 'cache', 'tempauth', 'proxy-server'],
|
||||
$workers = $::processorcount,
|
||||
$allow_account_management = true,
|
||||
$account_autocreate = true,
|
||||
$package_ensure = 'present',
|
||||
$debug = false,
|
||||
$verbose = true,
|
||||
$syslog_log_level = 'WARNING',
|
||||
$account_autocreate = true,
|
||||
$package_ensure = 'present',
|
||||
$debug = false,
|
||||
$verbose = true,
|
||||
) {
|
||||
|
||||
include 'swift::params'
|
||||
|
|
|
@ -19,7 +19,7 @@ class swift::storage::all(
|
|||
$swift_zone,
|
||||
$storage_local_net_ip,
|
||||
$devices = '/srv/node',
|
||||
$devices_dirs = undef,
|
||||
$devices_dirs = undef,
|
||||
$object_port = '6000',
|
||||
$container_port = '6001',
|
||||
$account_port = '6002',
|
||||
|
@ -29,7 +29,6 @@ class swift::storage::all(
|
|||
$export_devices = false,
|
||||
$debug = false,
|
||||
$verbose = true,
|
||||
$syslog_log_level = 'WARNING',
|
||||
) {
|
||||
|
||||
class { 'swift::storage':
|
||||
|
@ -74,7 +73,6 @@ class swift::storage::all(
|
|||
storage_local_net_ip => $storage_local_net_ip,
|
||||
debug => $debug,
|
||||
verbose => $verbose,
|
||||
syslog_log_level => $syslog_log_level,
|
||||
}
|
||||
|
||||
swift::storage::server { $account_port:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
define swift::storage::server(
|
||||
$type,
|
||||
$swift_zone,
|
||||
$port = $name,
|
||||
$port = $name,
|
||||
$storage_local_net_ip,
|
||||
$devices = '/srv/node',
|
||||
$owner = 'swift',
|
||||
|
@ -23,7 +23,6 @@ define swift::storage::server(
|
|||
$config_file_path = "${type}-server/${name}.conf",
|
||||
$debug = false,
|
||||
$verbose = true,
|
||||
$syslog_log_level = 'WARNING',
|
||||
) {
|
||||
if (is_array($pipeline)) {
|
||||
$pipeline_real = $pipeline
|
||||
|
|
|
@ -10,7 +10,7 @@ log_level = DEBUG
|
|||
<% elsif @verbose then -%>
|
||||
log_level = INFO
|
||||
<% else -%>
|
||||
log_level = <%= @syslog_log_level %>
|
||||
log_level = WARNING
|
||||
<% end -%>
|
||||
log_name = swift-account-server
|
||||
workers = <%= @workers %>
|
||||
|
|
|
@ -10,7 +10,7 @@ log_level = DEBUG
|
|||
<% elsif @verbose then -%>
|
||||
log_level = INFO
|
||||
<% else -%>
|
||||
log_level = <%= @syslog_log_level %>
|
||||
log_level = WARNING
|
||||
<% end -%>
|
||||
log_name = swift-container-server
|
||||
workers = <%= @workers %>
|
||||
|
|
|
@ -10,7 +10,7 @@ log_level = DEBUG
|
|||
<% elsif @verbose then -%>
|
||||
log_level = INFO
|
||||
<% else -%>
|
||||
log_level = <%= @syslog_log_level %>
|
||||
log_level = WARNING
|
||||
<% end -%>
|
||||
log_name = swift-object-server
|
||||
workers = <%= @workers %>
|
||||
|
|
|
@ -10,7 +10,7 @@ log_level = DEBUG
|
|||
<% elsif @verbose then -%>
|
||||
log_level = INFO
|
||||
<% else -%>
|
||||
log_level = <%= @syslog_log_level %>
|
||||
log_level = WARNING
|
||||
<% end -%>
|
||||
log_name = swift-proxy-server
|
||||
user = swift
|
||||
|
|
Loading…
Reference in New Issue