Gehel has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/294288

Change subject: Send service logs by default to /srv/log.
......................................................................

Send service logs by default to /srv/log.

As firejail is used to start services and firejail mounts a tmpfs over
/var/log, using /var/log does not work as expected. /srv/log is not protected
by firejail and is already used by some services.

Change-Id: Iedae3ed12e3df4b2717c3d653ec89fc8220ca2c9
---
M hieradata/role/common/sca.yaml
M hieradata/role/common/scb.yaml
M modules/service/manifests/configuration.pp
3 files changed, 10 insertions(+), 5 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/88/294288/1

diff --git a/hieradata/role/common/sca.yaml b/hieradata/role/common/sca.yaml
index d5d37e8..78e8f29 100644
--- a/hieradata/role/common/sca.yaml
+++ b/hieradata/role/common/sca.yaml
@@ -3,7 +3,6 @@
   - sc-admins
   - zotero-admin
   - apertium-admins
-service::configuration::log_dir: /srv/log
 debdeploy::grains:
   debdeploy-sca:
     value: standard
diff --git a/hieradata/role/common/scb.yaml b/hieradata/role/common/scb.yaml
index cef6d88..8b244ea 100644
--- a/hieradata/role/common/scb.yaml
+++ b/hieradata/role/common/scb.yaml
@@ -10,7 +10,6 @@
 - mobileapps-admin
 - changeprop-admin
 - ores-admin
-service::configuration::log_dir: /srv/log
 graphoid::allowed_domains:
   https:
     - mediawiki.org
diff --git a/modules/service/manifests/configuration.pp 
b/modules/service/manifests/configuration.pp
index c10c056..9602c36 100644
--- a/modules/service/manifests/configuration.pp
+++ b/modules/service/manifests/configuration.pp
@@ -29,7 +29,7 @@
 #
 # [*log_dir*]
 #   Local root log directory. The service's logs will be placed in its
-#   subdirectory. Default: /var/log
+#   subdirectory. Default: /srv/log
 #
 # [*use_dev_pkgs*]
 #   Whether the development packages declared for services should be installed.
@@ -43,8 +43,15 @@
     $statsd_port   = 8125,
     $logstash_host = 'localhost',
     $logstash_port = 12201,
-    $log_dir       = '/var/log',
+    $log_dir       = '/srv/log',
     $use_dev_pkgs  = false,
 ){
-    # No op for now.
+
+    file { $log_dir:
+        ensure => present,
+        owner  => 'root',
+        group  => 'root',
+        mode   => '0755',
+    }
+
 }

-- 
To view, visit https://gerrit.wikimedia.org/r/294288
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Iedae3ed12e3df4b2717c3d653ec89fc8220ca2c9
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Gehel <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to