Gehel has submitted this change and it was merged.

Change subject: Elastic: add publish_host support
......................................................................


Elastic: add publish_host support

Set publish_host to eth0 for codfw, elastic was confused by the lvs loopback
address.

Change-Id: I2728b8fadd1ab3f80d94129a578a193b8b86f346
---
M hieradata/role/codfw/elasticsearch/server.yaml
M modules/elasticsearch/manifests/init.pp
M modules/elasticsearch/templates/elasticsearch.yml.erb
3 files changed, 6 insertions(+), 1 deletion(-)

Approvals:
  Gehel: Verified; Looks good to me, approved



diff --git a/hieradata/role/codfw/elasticsearch/server.yaml 
b/hieradata/role/codfw/elasticsearch/server.yaml
index 4b17618..32945f7 100644
--- a/hieradata/role/codfw/elasticsearch/server.yaml
+++ b/hieradata/role/codfw/elasticsearch/server.yaml
@@ -13,6 +13,8 @@
   - _local_
   - _site_
 
+elasticsearch::publish_host: _eth0_
+
 elasticsearch::plugins_mandatory:
   - 'experimental-highlighter'
   - 'extra'
diff --git a/modules/elasticsearch/manifests/init.pp 
b/modules/elasticsearch/manifests/init.pp
index 0c00d66..44d3306 100644
--- a/modules/elasticsearch/manifests/init.pp
+++ b/modules/elasticsearch/manifests/init.pp
@@ -58,6 +58,8 @@
 #       its pings reach other servers.
 # - $bind_networks: networks to bind (both transport and http connectors)
 #       see 
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html#network-interface-values
+# - $publish_host: host to publish (both transport and http connectors)
+#       see 
https://www.elastic.co/guide/en/elasticsearch/reference/current/modules-network.html
 # - $filter_cache_size: size of the filter cache.  See
 #       
www.elasticsearch.org/guide/en/elasticsearch/reference/current/index-modules-cache.html
 #       for possible values.  Default is 10% like the Elasticsearch default.
@@ -99,6 +101,7 @@
                     $multicast_enabled = true,
                     $unicast_hosts = undef,
                     $bind_networks = undef,
+                    $publish_host = undef,
                     $filter_cache_size = '10%',
                     $bulk_thread_pool_executors = undef,
                     $bulk_thread_pool_capacity = undef,
diff --git a/modules/elasticsearch/templates/elasticsearch.yml.erb 
b/modules/elasticsearch/templates/elasticsearch.yml.erb
index c692bd9..aa36326 100644
--- a/modules/elasticsearch/templates/elasticsearch.yml.erb
+++ b/modules/elasticsearch/templates/elasticsearch.yml.erb
@@ -203,7 +203,7 @@
 # Set the address other nodes will use to communicate with this node. If not
 # set, it is automatically derived. It must point to an actual IP address.
 #
-#network.publish_host: 192.168.0.1
+<%= @publish_host ? "network.publish_host: #{@publish_host}" : 
"#network.publish_host: 192.168.0.1" %>
 
 # Set both 'bind_host' and 'publish_host':
 #

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I2728b8fadd1ab3f80d94129a578a193b8b86f346
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: DCausse <[email protected]>
Gerrit-Reviewer: Gehel <[email protected]>

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

Reply via email to