Merge pull request #296 from enovance/enhancement/187/sbadia
Improve OpenStack Logging
This commit is contained in:
commit
291fbe0703
@ -94,6 +94,13 @@ class cloud::compute(
|
||||
}
|
||||
}
|
||||
|
||||
# Disable twice logging if syslog is enabled
|
||||
if $use_syslog {
|
||||
$log_dir = false
|
||||
} else {
|
||||
$log_dir = '/var/log/nova'
|
||||
}
|
||||
|
||||
$encoded_user = uriescape($nova_db_user)
|
||||
$encoded_password = uriescape($nova_db_password)
|
||||
|
||||
@ -106,8 +113,9 @@ class cloud::compute(
|
||||
memcached_servers => $memcache_servers,
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
log_dir => $log_dir,
|
||||
log_facility => $log_facility,
|
||||
use_syslog => $use_syslog
|
||||
use_syslog => $use_syslog,
|
||||
}
|
||||
|
||||
class { 'nova::network::neutron':
|
||||
|
@ -400,6 +400,13 @@ class cloud::identity (
|
||||
$ks_token_expiration = $os_params::ks_token_expiration
|
||||
){
|
||||
|
||||
# Disable twice logging if syslog is enabled
|
||||
if $use_syslog {
|
||||
$log_dir = false
|
||||
} else {
|
||||
$log_dir = '/var/log/keystone'
|
||||
}
|
||||
|
||||
$encoded_user = uriescape($keystone_db_user)
|
||||
$encoded_password = uriescape($keystone_db_password)
|
||||
|
||||
@ -418,6 +425,7 @@ class cloud::identity (
|
||||
use_syslog => $use_syslog,
|
||||
verbose => $verbose,
|
||||
bind_host => $api_eth,
|
||||
log_dir => $log_dir,
|
||||
public_port => $ks_keystone_public_port,
|
||||
admin_port => $ks_keystone_admin_port,
|
||||
token_expiration => $ks_token_expiration
|
||||
|
@ -88,6 +88,17 @@ class cloud::image(
|
||||
$use_syslog = $os_params::use_syslog
|
||||
) {
|
||||
|
||||
# Disable twice logging if syslog is enabled
|
||||
if $use_syslog {
|
||||
$log_dir = false
|
||||
$log_file_api = false
|
||||
$log_file_registry = false
|
||||
} else {
|
||||
$log_dir = '/var/log/glance'
|
||||
$log_file_api = '/var/log/glance/api.log'
|
||||
$log_file_registry = '/var/log/glance/registry.log'
|
||||
}
|
||||
|
||||
$encoded_glance_user = uriescape($glance_db_user)
|
||||
$encoded_glance_password = uriescape($glance_db_password)
|
||||
|
||||
@ -102,6 +113,8 @@ class cloud::image(
|
||||
keystone_tenant => 'services',
|
||||
keystone_user => 'glance',
|
||||
show_image_direct_url => true,
|
||||
log_dir => $log_dir,
|
||||
log_file => $log_file_api,
|
||||
log_facility => $log_facility,
|
||||
bind_host => $api_eth,
|
||||
bind_port => $ks_glance_api_internal_port,
|
||||
@ -117,6 +130,8 @@ class cloud::image(
|
||||
keystone_tenant => 'services',
|
||||
keystone_user => 'glance',
|
||||
bind_host => $api_eth,
|
||||
log_dir => $log_dir,
|
||||
log_file => $log_file_registry,
|
||||
bind_port => $ks_glance_registry_internal_port,
|
||||
use_syslog => $use_syslog,
|
||||
log_facility => $log_facility,
|
||||
|
@ -65,10 +65,17 @@ class cloud::network(
|
||||
$api_eth = $os_params::api_eth,
|
||||
$provider_vlan_ranges = $os_params::provider_vlan_ranges,
|
||||
$provider_bridge_mappings = $os_params::provider_bridge_mappings,
|
||||
$use_syslog = $os_params::neutron_use_syslog,
|
||||
$log_facility = $os_params::neutron_log_facility
|
||||
$use_syslog = $os_params::use_syslog,
|
||||
$log_facility = $os_params::log_facility
|
||||
) {
|
||||
|
||||
# Disable twice logging if syslog is enabled
|
||||
if $use_syslog {
|
||||
$log_dir = false
|
||||
} else {
|
||||
$log_dir = '/var/log/neutron'
|
||||
}
|
||||
|
||||
class { 'neutron':
|
||||
allow_overlapping_ips => true,
|
||||
verbose => $verbose,
|
||||
@ -82,7 +89,8 @@ class cloud::network(
|
||||
use_syslog => $use_syslog,
|
||||
dhcp_agents_per_network => '2',
|
||||
core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin',
|
||||
service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin']
|
||||
service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin'],
|
||||
log_dir => $log_dir,
|
||||
}
|
||||
|
||||
class { 'neutron::agents::ovs':
|
||||
|
@ -39,7 +39,7 @@ class cloud::network::controller(
|
||||
auth_host => $ks_keystone_admin_host,
|
||||
auth_port => $ks_keystone_public_port,
|
||||
database_connection => "mysql://${encoded_user}:${encoded_password}@${neutron_db_host}/neutron?charset=utf8",
|
||||
api_workers => $::processorcount
|
||||
api_workers => $::processorcount,
|
||||
}
|
||||
|
||||
# Note(EmilienM):
|
||||
|
@ -112,6 +112,13 @@ class cloud::orchestration(
|
||||
$log_facility = $os_params::log_facility
|
||||
) {
|
||||
|
||||
# Disable twice logging if syslog is enabled
|
||||
if $use_syslog {
|
||||
$log_dir = false
|
||||
} else {
|
||||
$log_dir = '/var/log/heat'
|
||||
}
|
||||
|
||||
$encoded_user = uriescape($heat_db_user)
|
||||
$encoded_password = uriescape($heat_db_password)
|
||||
|
||||
@ -129,6 +136,7 @@ class cloud::orchestration(
|
||||
debug => $debug,
|
||||
log_facility => $log_facility,
|
||||
use_syslog => $use_syslog,
|
||||
log_dir => $log_dir,
|
||||
}
|
||||
|
||||
# Note(EmilienM):
|
||||
|
@ -84,6 +84,13 @@ class cloud::telemetry(
|
||||
$use_syslog = $os_params::use_syslog,
|
||||
){
|
||||
|
||||
# Disable twice logging if syslog is enabled
|
||||
if $use_syslog {
|
||||
$log_dir = false
|
||||
} else {
|
||||
$log_dir = '/var/log/ceilometer'
|
||||
}
|
||||
|
||||
class { 'ceilometer':
|
||||
metering_secret => $ceilometer_secret,
|
||||
rabbit_hosts => $rabbit_hosts,
|
||||
@ -91,6 +98,7 @@ class cloud::telemetry(
|
||||
rabbit_userid => 'ceilometer',
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
log_dir => $log_dir,
|
||||
use_syslog => $use_syslog,
|
||||
log_facility => $log_facility
|
||||
}
|
||||
|
@ -78,6 +78,13 @@ class cloud::volume(
|
||||
$use_syslog = $os_params::use_syslog
|
||||
) {
|
||||
|
||||
# Disable twice logging if syslog is enabled
|
||||
if $use_syslog {
|
||||
$log_dir = false
|
||||
} else {
|
||||
$log_dir = '/var/log/cinder'
|
||||
}
|
||||
|
||||
$encoded_user = uriescape($cinder_db_user)
|
||||
$encoded_password = uriescape($cinder_db_password)
|
||||
|
||||
@ -90,6 +97,7 @@ class cloud::volume(
|
||||
rabbit_virtual_host => '/',
|
||||
verbose => $verbose,
|
||||
debug => $debug,
|
||||
log_dir => $log_dir,
|
||||
log_facility => $log_facility,
|
||||
use_syslog => $use_syslog
|
||||
}
|
||||
|
@ -66,7 +66,8 @@ describe 'cloud::compute::controller' do
|
||||
:rabbit_virtual_host => '/',
|
||||
:memcached_servers => ['10.0.0.1','10.0.0.2'],
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:glance_api_servers => 'http://10.0.0.1:9292'
|
||||
:glance_api_servers => 'http://10.0.0.1:9292',
|
||||
:log_dir => false
|
||||
)
|
||||
should contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with('value' => true)
|
||||
should contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
|
||||
|
@ -92,7 +92,8 @@ describe 'cloud::compute::hypervisor' do
|
||||
:rabbit_virtual_host => '/',
|
||||
:memcached_servers => ['10.0.0.1','10.0.0.2'],
|
||||
:database_connection => 'mysql://nova:secrete@10.0.0.1/nova?charset=utf8',
|
||||
:glance_api_servers => 'http://10.0.0.1:9292'
|
||||
:glance_api_servers => 'http://10.0.0.1:9292',
|
||||
:log_dir => false
|
||||
)
|
||||
should contain_nova_config('DEFAULT/resume_guests_state_on_host_boot').with('value' => true)
|
||||
should contain_nova_config('DEFAULT/default_availability_zone').with('value' => 'MyZone')
|
||||
@ -139,8 +140,8 @@ describe 'cloud::compute::hypervisor' do
|
||||
:rabbit_virtual_host => '/',
|
||||
:bind_host => '10.0.0.1',
|
||||
:core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin',
|
||||
:service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin']
|
||||
|
||||
:service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin'],
|
||||
:log_dir => false
|
||||
)
|
||||
should contain_class('neutron::agents::ovs').with(
|
||||
:enable_tunneling => true,
|
||||
|
@ -110,7 +110,8 @@ describe 'cloud::identity' do
|
||||
:bind_host => '10.0.0.1',
|
||||
:public_port => '5000',
|
||||
:admin_port => '35357',
|
||||
:token_expiration => '3600'
|
||||
:token_expiration => '3600',
|
||||
:log_dir => false
|
||||
)
|
||||
should contain_keystone_config('ec2/driver').with('value' => 'keystone.contrib.ec2.backends.sql.Ec2')
|
||||
end
|
||||
|
@ -58,7 +58,9 @@ describe 'cloud::image' do
|
||||
:log_facility => 'LOG_LOCAL0',
|
||||
:bind_host => '10.0.0.1',
|
||||
:bind_port => '9292',
|
||||
:use_syslog => true
|
||||
:use_syslog => true,
|
||||
:log_dir => false,
|
||||
:log_file => false
|
||||
)
|
||||
end
|
||||
|
||||
@ -74,7 +76,9 @@ describe 'cloud::image' do
|
||||
:log_facility => 'LOG_LOCAL0',
|
||||
:bind_host => '10.0.0.1',
|
||||
:bind_port => '9191',
|
||||
:use_syslog => true
|
||||
:use_syslog => true,
|
||||
:log_dir => false,
|
||||
:log_file => false
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -59,8 +59,8 @@ describe 'cloud::network::controller' do
|
||||
:rabbit_virtual_host => '/',
|
||||
:bind_host => '10.0.0.1',
|
||||
:core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin',
|
||||
:service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin']
|
||||
|
||||
:service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin'],
|
||||
:log_dir => false
|
||||
)
|
||||
should contain_class('neutron::agents::ovs').with(
|
||||
:enable_tunneling => true,
|
||||
|
@ -54,8 +54,8 @@ describe 'cloud::network::dhcp' do
|
||||
:rabbit_virtual_host => '/',
|
||||
:bind_host => '10.0.0.1',
|
||||
:core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin',
|
||||
:service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin']
|
||||
|
||||
:service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin'],
|
||||
:log_dir => false
|
||||
)
|
||||
should contain_class('neutron::agents::ovs').with(
|
||||
:enable_tunneling => true,
|
||||
|
@ -54,8 +54,8 @@ describe 'cloud::network::l3' do
|
||||
:rabbit_virtual_host => '/',
|
||||
:bind_host => '10.0.0.1',
|
||||
:core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin',
|
||||
:service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin']
|
||||
|
||||
:service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin'],
|
||||
:log_dir => false
|
||||
)
|
||||
should contain_class('neutron::agents::ovs').with(
|
||||
:enable_tunneling => true,
|
||||
|
@ -53,8 +53,8 @@ describe 'cloud::network::lbaas' do
|
||||
:rabbit_virtual_host => '/',
|
||||
:bind_host => '10.0.0.1',
|
||||
:core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin',
|
||||
:service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin']
|
||||
|
||||
:service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin'],
|
||||
:log_dir => false
|
||||
)
|
||||
should contain_class('neutron::agents::ovs').with(
|
||||
:enable_tunneling => true,
|
||||
|
@ -61,8 +61,8 @@ describe 'cloud::network::metadata' do
|
||||
:rabbit_virtual_host => '/',
|
||||
:bind_host => '10.0.0.1',
|
||||
:core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin',
|
||||
:service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin']
|
||||
|
||||
:service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin'],
|
||||
:log_dir => false
|
||||
)
|
||||
should contain_class('neutron::agents::ovs').with(
|
||||
:enable_tunneling => true,
|
||||
|
@ -49,8 +49,8 @@ describe 'cloud::network::vpn' do
|
||||
:rabbit_virtual_host => '/',
|
||||
:bind_host => '10.0.0.1',
|
||||
:core_plugin => 'neutron.plugins.ml2.plugin.Ml2Plugin',
|
||||
:service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin']
|
||||
|
||||
:service_plugins => ['neutron.services.loadbalancer.plugin.LoadBalancerPlugin','neutron.services.metering.metering_plugin.MeteringPlugin','neutron.services.l3_router.l3_router_plugin.L3RouterPlugin'],
|
||||
:log_dir => false
|
||||
)
|
||||
should contain_class('neutron::agents::ovs').with(
|
||||
:enable_tunneling => true,
|
||||
|
@ -65,7 +65,8 @@ describe 'cloud::orchestration::api' do
|
||||
:keystone_protocol => 'http',
|
||||
:keystone_password => 'secrete',
|
||||
:auth_uri => 'http://10.0.0.1:5000/v2.0',
|
||||
:sql_connection => 'mysql://heat:secrete@10.0.0.1/heat'
|
||||
:sql_connection => 'mysql://heat:secrete@10.0.0.1/heat',
|
||||
:log_dir => false
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -68,7 +68,8 @@ describe 'cloud::orchestration::engine' do
|
||||
:keystone_protocol => 'http',
|
||||
:keystone_password => 'secrete',
|
||||
:auth_uri => 'http://10.0.0.1:5000/v2.0',
|
||||
:sql_connection => 'mysql://heat:secrete@10.0.0.1/heat'
|
||||
:sql_connection => 'mysql://heat:secrete@10.0.0.1/heat',
|
||||
:log_dir => false
|
||||
)
|
||||
end
|
||||
|
||||
|
@ -51,7 +51,8 @@ describe 'cloud::telemetry::centralagent' do
|
||||
:rabbit_password => 'secrete',
|
||||
:metering_secret => 'secrete',
|
||||
:use_syslog => true,
|
||||
:log_facility => 'LOG_LOCAL0'
|
||||
:log_facility => 'LOG_LOCAL0',
|
||||
:log_dir => false
|
||||
)
|
||||
should contain_class('ceilometer::agent::auth').with(
|
||||
:auth_password => 'secrete',
|
||||
|
@ -57,7 +57,8 @@ describe 'cloud::telemetry::server' do
|
||||
:rabbit_password => 'secrete',
|
||||
:metering_secret => 'secrete',
|
||||
:use_syslog => true,
|
||||
:log_facility => 'LOG_LOCAL0'
|
||||
:log_facility => 'LOG_LOCAL0',
|
||||
:log_dir => false
|
||||
)
|
||||
should contain_class('ceilometer::agent::auth').with(
|
||||
:auth_password => 'secrete',
|
||||
|
@ -58,7 +58,8 @@ describe 'cloud::volume::controller' do
|
||||
:rabbit_password => 'secrete',
|
||||
:rabbit_virtual_host => '/',
|
||||
:log_facility => 'LOG_LOCAL0',
|
||||
:use_syslog => true
|
||||
:use_syslog => true,
|
||||
:log_dir => false
|
||||
)
|
||||
should contain_class('cinder::ceilometer')
|
||||
end
|
||||
|
@ -53,7 +53,8 @@ describe 'cloud::volume::storage' do
|
||||
:rabbit_password => 'secrete',
|
||||
:rabbit_virtual_host => '/',
|
||||
:log_facility => 'LOG_LOCAL0',
|
||||
:use_syslog => true
|
||||
:use_syslog => true,
|
||||
:log_dir => false
|
||||
)
|
||||
|
||||
should contain_cinder_config('DEFAULT/notification_driver').with('value' => 'cinder.openstack.common.notifier.rpc_notifier')
|
||||
|
Loading…
x
Reference in New Issue
Block a user