Hashar has uploaded a new change for review.

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

Change subject: elasticsearch: ensure /var/run subdir exists
......................................................................

elasticsearch: ensure /var/run subdir exists

On Precise, the elasticsearch 1.6.0 Debian packages creates a
/var/run/elasticsearch file which is on a tmpfs. On a reboot the init
script deadlocks cause the sub directory has been deleted (tmpfs) and
the pid file never got created (parent dir does not exist).

Workaround it by having puppet create the directory which would
eventually undeadlock elasticsearch from time to time.

The proper fix is to hack the init script to ensure it creates the
directory properly.

Bug: T109497
Change-Id: Ic5848244437a06d7341030539d045598102e77ad
---
M modules/elasticsearch/manifests/init.pp
1 file changed, 11 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/13/233413/1

diff --git a/modules/elasticsearch/manifests/init.pp 
b/modules/elasticsearch/manifests/init.pp
index a20abe4..52c95ba 100644
--- a/modules/elasticsearch/manifests/init.pp
+++ b/modules/elasticsearch/manifests/init.pp
@@ -130,6 +130,16 @@
     # config files because you need to be somewhat careful when restarting it.
     # So, for now at least, we'll be restarting it manually.
 
+    # T109497 elasticsearch 1.6.0 init script does not recreate the run
+    # directory which is on tmpfs.
+    file { '/var/run/elasticsearch':
+        ensure  => directory,
+        owner   => 'elasticsearch',
+        group   => 'elasticsearch',
+        mode    => '0755',
+        require => Package['elasticsearch'],  # provides user
+    }
+
     # Keep service running
     service { 'elasticsearch':
         ensure  => running,
@@ -139,6 +149,7 @@
             File['/etc/elasticsearch/elasticsearch.yml'],
             File['/etc/elasticsearch/logging.yml'],
             File['/etc/default/elasticsearch'],
+            File['/var/run/elasticsearch'],
         ],
     }
 

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic5848244437a06d7341030539d045598102e77ad
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Hashar <has...@free.fr>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to