Let puppet-zuul manage log configuration files

gearman-logging.conf, logging.conf and merger-logging.conf
has been moved in puppet-zuul modules in:
I76851c8672968a7581622cac8ff0062c1f50e0ef

The patch this one depends on adds a feature flag (by default set
to false) that can activate the installation of these configuration
files.

This patch removes the configuration files and set the
feature flag to true in order to let puppet-zuul manage
the configuration files by itself.

Two follow up patches will then be created (once this one is merged)
in order to set the feature flag (in puppet-zuul) at true by default
and another one on system-config to remove "manage_log_conf => true".

Change-Id: Ic5ceb7fb23a8403a31f9db2774ddd900fd838930
Depends-On: I76851c8672968a7581622cac8ff0062c1f50e0ef
This commit is contained in:
Fabien Boucher 2015-05-06 16:38:20 +00:00
parent e24e1b5b99
commit 03560b7696
6 changed files with 12 additions and 176 deletions

View File

@ -1,33 +0,0 @@
[loggers]
keys=root,gear
[handlers]
keys=console,normal
[formatters]
keys=simple
[logger_root]
level=WARNING
handlers=console
[logger_gear]
level=DEBUG
handlers=normal
qualname=gear
[handler_console]
level=WARNING
class=StreamHandler
formatter=simple
args=(sys.stdout,)
[handler_normal]
level=WARNING
class=logging.handlers.WatchedFileHandler
formatter=simple
args=('/var/log/zuul/gearman-server.log',)
[formatter_simple]
format=%(asctime)s %(levelname)s %(name)s: %(message)s
datefmt=

View File

@ -1,49 +0,0 @@
[loggers]
keys=root,zuul,gerrit,gear
[handlers]
keys=console,debug,normal
[formatters]
keys=simple
[logger_root]
level=WARNING
handlers=console
[logger_zuul]
level=DEBUG
handlers=debug,normal
qualname=zuul
[logger_gerrit]
level=DEBUG
handlers=debug,normal
qualname=gerrit
[logger_gear]
level=WARNING
handlers=debug,normal
qualname=gear
[handler_console]
level=WARNING
class=StreamHandler
formatter=simple
args=(sys.stdout,)
[handler_debug]
level=DEBUG
class=logging.handlers.WatchedFileHandler
formatter=simple
args=('/var/log/zuul/debug.log',)
[handler_normal]
level=INFO
class=logging.handlers.WatchedFileHandler
formatter=simple
args=('/var/log/zuul/zuul.log',)
[formatter_simple]
format=%(asctime)s %(levelname)s %(name)s: %(message)s
datefmt=

View File

@ -1,49 +0,0 @@
[loggers]
keys=root,zuul,gerrit,gear
[handlers]
keys=console,debug,normal
[formatters]
keys=simple
[logger_root]
level=WARNING
handlers=console
[logger_zuul]
level=DEBUG
handlers=debug,normal
qualname=zuul
[logger_gerrit]
level=INFO
handlers=debug,normal
qualname=gerrit
[logger_gear]
level=WARNING
handlers=debug,normal
qualname=gear
[handler_console]
level=WARNING
class=StreamHandler
formatter=simple
args=(sys.stdout,)
[handler_debug]
level=DEBUG
class=logging.handlers.WatchedFileHandler
formatter=simple
args=('/var/log/zuul/merger-debug.log',)
[handler_normal]
level=INFO
class=logging.handlers.WatchedFileHandler
formatter=simple
args=('/var/log/zuul/merger.log',)
[formatter_simple]
format=%(asctime)s %(levelname)s %(name)s: %(message)s
datefmt=

View File

@ -51,11 +51,14 @@ class openstack_project::zuul_dev(
} }
class { '::zuul::server': class { '::zuul::server':
layout_dir => $::project_config::zuul_layout_dir, layout_dir => $::project_config::zuul_layout_dir,
require => $::project_config::config_dir, manage_log_conf => true,
require => $::project_config::config_dir,
} }
class { '::zuul::merger': } class { '::zuul::merger':
manage_log_conf => true,
}
if $gerrit_ssh_host_key != '' { if $gerrit_ssh_host_key != '' {
file { '/home/zuul/.ssh': file { '/home/zuul/.ssh':
@ -75,21 +78,4 @@ class openstack_project::zuul_dev(
require => File['/home/zuul/.ssh'], require => File['/home/zuul/.ssh'],
} }
} }
file { '/etc/zuul/logging.conf':
ensure => present,
source => 'puppet:///modules/openstack_project/zuul/logging.conf',
notify => Exec['zuul-reload'],
}
file { '/etc/zuul/gearman-logging.conf':
ensure => present,
source => 'puppet:///modules/openstack_project/zuul/gearman-logging.conf',
notify => Exec['zuul-reload'],
}
file { '/etc/zuul/merger-logging.conf':
ensure => present,
source => 'puppet:///modules/openstack_project/zuul/merger-logging.conf',
}
} }

View File

@ -27,7 +27,9 @@ class openstack_project::zuul_merger(
git_name => 'OpenStack Jenkins', git_name => 'OpenStack Jenkins',
} }
class { '::zuul::merger': } class { '::zuul::merger':
manage_log_conf => true,
}
if $gerrit_ssh_host_key != '' { if $gerrit_ssh_host_key != '' {
file { '/home/zuul/.ssh': file { '/home/zuul/.ssh':
@ -47,9 +49,4 @@ class openstack_project::zuul_merger(
require => File['/home/zuul/.ssh'], require => File['/home/zuul/.ssh'],
} }
} }
file { '/etc/zuul/merger-logging.conf':
ensure => present,
source => 'puppet:///modules/openstack_project/zuul/merger-logging.conf',
}
} }

View File

@ -69,8 +69,9 @@ class openstack_project::zuul_prod(
} }
class { '::zuul::server': class { '::zuul::server':
layout_dir => $::project_config::zuul_layout_dir, layout_dir => $::project_config::zuul_layout_dir,
require => $::project_config::config_dir, manage_log_conf => true,
require => $::project_config::config_dir,
} }
if $gerrit_ssh_host_key != '' { if $gerrit_ssh_host_key != '' {
@ -91,21 +92,4 @@ class openstack_project::zuul_prod(
require => File['/home/zuul/.ssh'], require => File['/home/zuul/.ssh'],
} }
} }
file { '/etc/zuul/logging.conf':
ensure => present,
source => 'puppet:///modules/openstack_project/zuul/logging.conf',
notify => Exec['zuul-reload'],
}
file { '/etc/zuul/gearman-logging.conf':
ensure => present,
source => 'puppet:///modules/openstack_project/zuul/gearman-logging.conf',
notify => Exec['zuul-reload'],
}
file { '/etc/zuul/merger-logging.conf':
ensure => present,
source => 'puppet:///modules/openstack_project/zuul/merger-logging.conf',
}
} }