From 03560b7696ec72328f121c53514cb8df16a5e307 Mon Sep 17 00:00:00 2001 From: Fabien Boucher Date: Wed, 6 May 2015 16:38:20 +0000 Subject: [PATCH] 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 --- .../files/zuul/gearman-logging.conf | 33 ------------- .../openstack_project/files/zuul/logging.conf | 49 ------------------- .../files/zuul/merger-logging.conf | 49 ------------------- .../openstack_project/manifests/zuul_dev.pp | 26 +++------- .../manifests/zuul_merger.pp | 9 ++-- .../openstack_project/manifests/zuul_prod.pp | 22 ++------- 6 files changed, 12 insertions(+), 176 deletions(-) delete mode 100644 modules/openstack_project/files/zuul/gearman-logging.conf delete mode 100644 modules/openstack_project/files/zuul/logging.conf delete mode 100644 modules/openstack_project/files/zuul/merger-logging.conf diff --git a/modules/openstack_project/files/zuul/gearman-logging.conf b/modules/openstack_project/files/zuul/gearman-logging.conf deleted file mode 100644 index c662068b62..0000000000 --- a/modules/openstack_project/files/zuul/gearman-logging.conf +++ /dev/null @@ -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= diff --git a/modules/openstack_project/files/zuul/logging.conf b/modules/openstack_project/files/zuul/logging.conf deleted file mode 100644 index f4002b325d..0000000000 --- a/modules/openstack_project/files/zuul/logging.conf +++ /dev/null @@ -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= diff --git a/modules/openstack_project/files/zuul/merger-logging.conf b/modules/openstack_project/files/zuul/merger-logging.conf deleted file mode 100644 index 1807f2a427..0000000000 --- a/modules/openstack_project/files/zuul/merger-logging.conf +++ /dev/null @@ -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= diff --git a/modules/openstack_project/manifests/zuul_dev.pp b/modules/openstack_project/manifests/zuul_dev.pp index ab954db6a5..96c2f807e5 100644 --- a/modules/openstack_project/manifests/zuul_dev.pp +++ b/modules/openstack_project/manifests/zuul_dev.pp @@ -51,11 +51,14 @@ class openstack_project::zuul_dev( } class { '::zuul::server': - layout_dir => $::project_config::zuul_layout_dir, - require => $::project_config::config_dir, + layout_dir => $::project_config::zuul_layout_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 != '' { file { '/home/zuul/.ssh': @@ -75,21 +78,4 @@ class openstack_project::zuul_dev( 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', - } } diff --git a/modules/openstack_project/manifests/zuul_merger.pp b/modules/openstack_project/manifests/zuul_merger.pp index b4c9bf7279..3d3567400a 100644 --- a/modules/openstack_project/manifests/zuul_merger.pp +++ b/modules/openstack_project/manifests/zuul_merger.pp @@ -27,7 +27,9 @@ class openstack_project::zuul_merger( git_name => 'OpenStack Jenkins', } - class { '::zuul::merger': } + class { '::zuul::merger': + manage_log_conf => true, + } if $gerrit_ssh_host_key != '' { file { '/home/zuul/.ssh': @@ -47,9 +49,4 @@ class openstack_project::zuul_merger( require => File['/home/zuul/.ssh'], } } - - file { '/etc/zuul/merger-logging.conf': - ensure => present, - source => 'puppet:///modules/openstack_project/zuul/merger-logging.conf', - } } diff --git a/modules/openstack_project/manifests/zuul_prod.pp b/modules/openstack_project/manifests/zuul_prod.pp index aecfe391c2..abc04979cd 100644 --- a/modules/openstack_project/manifests/zuul_prod.pp +++ b/modules/openstack_project/manifests/zuul_prod.pp @@ -69,8 +69,9 @@ class openstack_project::zuul_prod( } class { '::zuul::server': - layout_dir => $::project_config::zuul_layout_dir, - require => $::project_config::config_dir, + layout_dir => $::project_config::zuul_layout_dir, + manage_log_conf => true, + require => $::project_config::config_dir, } if $gerrit_ssh_host_key != '' { @@ -91,21 +92,4 @@ class openstack_project::zuul_prod( 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', - } }