DCausse has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/367668 )

Change subject: Add script.max_compilations_per_minute to elasticsearch
......................................................................

Add script.max_compilations_per_minute to elasticsearch

Allows to customize the number of compilations per minute.
Workaround a limitation of the ltr plugin.

Bug: T171579
Change-Id: I927b0dec0ad2909335f8829d3a09f308000ca7ab
---
M hieradata/role/codfw/elasticsearch/cirrus.yaml
M hieradata/role/common/elasticsearch/relforge.yaml
M hieradata/role/eqiad/elasticsearch/cirrus.yaml
M modules/elasticsearch/manifests/init.pp
M modules/elasticsearch/templates/elasticsearch_5.yml.erb
5 files changed, 15 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/68/367668/1

diff --git a/hieradata/role/codfw/elasticsearch/cirrus.yaml 
b/hieradata/role/codfw/elasticsearch/cirrus.yaml
index e6d73ed..50e5cb9 100644
--- a/hieradata/role/codfw/elasticsearch/cirrus.yaml
+++ b/hieradata/role/codfw/elasticsearch/cirrus.yaml
@@ -67,3 +67,6 @@
 
 # Allow reindex from eqiad to codfw
 profile::elasticsearch::reindex_remote_whitelist: 'search.svc.eqiad.wmnet:9243'
+
+# Limitation of the ltr plugin (see T171579)
+profile::elasticsearch::script_max_compilations_per_minute: 10000
diff --git a/hieradata/role/common/elasticsearch/relforge.yaml 
b/hieradata/role/common/elasticsearch/relforge.yaml
index 6fd4425..f3ac846 100644
--- a/hieradata/role/common/elasticsearch/relforge.yaml
+++ b/hieradata/role/common/elasticsearch/relforge.yaml
@@ -18,3 +18,5 @@
 
 # Allow reindex from eqiad or codfw to relforge
 profile::elasticsearch::reindex_remote_whitelist: 
'search.svc.eqiad.wmnet:9243,search.svc.codfw.wmnet:9243'
+# Limitation of the ltr plugin (see T171579)
+profile::elasticsearch::script_max_compilations_per_minute: 10000
diff --git a/hieradata/role/eqiad/elasticsearch/cirrus.yaml 
b/hieradata/role/eqiad/elasticsearch/cirrus.yaml
index 03a5e36..10ca2cd 100644
--- a/hieradata/role/eqiad/elasticsearch/cirrus.yaml
+++ b/hieradata/role/eqiad/elasticsearch/cirrus.yaml
@@ -68,3 +68,6 @@
 
 # Allow reindex from codfw to eqiad
 profile::elasticsearch::reindex_remote_whitelist: 'search.svc.codfw.wmnet:9243'
+
+# Limitation of the ltr plugin (see T171579)
+profile::elasticsearch::script_max_compilations_per_minute: 10000
diff --git a/modules/elasticsearch/manifests/init.pp 
b/modules/elasticsearch/manifests/init.pp
index 9b5e328..dde3a87 100644
--- a/modules/elasticsearch/manifests/init.pp
+++ b/modules/elasticsearch/manifests/init.pp
@@ -76,6 +76,8 @@
 #        host and port combinations (e.g. otherhost:9243, another:9243,
 #        127.0.10.*:9243, localhost:*). Scheme is ignored by the whitelist - 
only host
 #        and port are used. Defaults to undef, which means no remote reindex 
can occur.
+# - $script_max_compilations_per_minute: integer, max number of script
+#        compilation per minute
 #
 # == Sample usage:
 #
@@ -114,6 +116,7 @@
     $search_shard_count_limit = 1000,
     $curator_uses_unicast_hosts = true,
     $reindex_remote_whitelist = undef,
+    $script_max_compilations_per_minute = undef,
 ) {
 
     # Check arguments
diff --git a/modules/elasticsearch/templates/elasticsearch_5.yml.erb 
b/modules/elasticsearch/templates/elasticsearch_5.yml.erb
index b81932a..1eed4b3 100644
--- a/modules/elasticsearch/templates/elasticsearch_5.yml.erb
+++ b/modules/elasticsearch/templates/elasticsearch_5.yml.erb
@@ -438,3 +438,7 @@
 # Hosts allowed as data sources for reindexing
 reindex.remote.whitelist: "<%= @reindex_remote_whitelist %>"
 <% end %>
+
+<% if @script_max_compilations_per_minute and 
@script_max_compilations_per_minute > 0 %>
+script.max_compilations_per_minute: <%=script_max_compilations_per_minute%>
+<% end %>

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

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

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

Reply via email to