Mobrovac has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/326942 )
Change subject: EventBus Proxy: Ensure the syslog output file is readable ...................................................................... EventBus Proxy: Ensure the syslog output file is readable Bug: T153028 Change-Id: Ica22e4d1db937527676d85fd03a4071adbf2c623 --- M modules/eventlogging/manifests/service/service.pp M modules/role/manifests/eventbus/eventbus.pp 2 files changed, 17 insertions(+), 20 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/operations/puppet refs/changes/42/326942/1 diff --git a/modules/eventlogging/manifests/service/service.pp b/modules/eventlogging/manifests/service/service.pp index f3148a6..cc7a9ec 100644 --- a/modules/eventlogging/manifests/service/service.pp +++ b/modules/eventlogging/manifests/service/service.pp @@ -103,15 +103,21 @@ default => $_log_file, } + # ensure the rsyslog log file has sane permisions + file { $_log_file: + ensure => present, + replace => false, + content => '', + owner => 'eventlogging', + group => 'eventlogging', + mode => '0644', + before => Rsyslog::Conf[$service_name], + } # Rsyslog configuration that routes logs to a file. - file { "/etc/rsyslog.d/80-${service_name}.conf": - # FIXME - top-scope var without namespace, will break in puppet 2.8 - # lint:ignore:variable_scope - ensure => $ensure, - # lint:endignore - content => template('eventlogging/rsyslog.conf.erb'), - mode => '0444', - notify => Service['rsyslog'], + rsyslog::conf { $service_name: + content => template('eventlogging/rsyslog.conf.erb'), + priority => 80, + before => Base::Service_unit[$service_name], } # Python logging conf file that properly formats # output with $programname prefix so that rsyslog diff --git a/modules/role/manifests/eventbus/eventbus.pp b/modules/role/manifests/eventbus/eventbus.pp index d6cdfcb..f96116c 100644 --- a/modules/role/manifests/eventbus/eventbus.pp +++ b/modules/role/manifests/eventbus/eventbus.pp @@ -12,6 +12,9 @@ include base::firewall require ::eventschemas + # for /srv/log dir creation + require ::service::configuration + if hiera('has_lvs', true) { include ::role::lvs::realserver } @@ -65,18 +68,6 @@ default => 'INFO', } - # We ensure the /srv/log (parent of $out_dir) manually here, as - # there is no proper class to rely on for this, and starting a - # separate would be an overkill for now. We create these directories - # so we can save failed EventError events from eventbus here. - if !defined(File['/srv/log']) { - file { '/srv/log': - ensure => 'directory', - mode => '0755', - owner => 'root', - group => 'root', - } - } if !defined(File['/srv/log/eventlogging']) { file { '/srv/log/eventlogging': ensure => 'directory', -- To view, visit https://gerrit.wikimedia.org/r/326942 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ica22e4d1db937527676d85fd03a4071adbf2c623 Gerrit-PatchSet: 1 Gerrit-Project: operations/puppet Gerrit-Branch: production Gerrit-Owner: Mobrovac <mobro...@wikimedia.org> _______________________________________________ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits