Skip to content
This repository was archived by the owner on Sep 21, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions jobs/mysql/spec
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ properties:
cf_mysql.mysql.port:
description: 'Port the mysql server should bind to'
default: 3306
cf_mysql.mysql.advertise_host:
description: 'IP address used to reach mysql from other cluster members'
cf_mysql.mysql.galera_port:
description: 'Port which Galera Cluster uses for communication across nodes'
default: 4567
Expand Down
3 changes: 1 addition & 2 deletions jobs/mysql/templates/mariadb_ctl_config.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ def discover_external_ip
end
network.ip
end
network_ip = discover_external_ip
%>

<%
Expand Down Expand Up @@ -52,4 +51,4 @@ Manager:
<% cluster_ips.each do |ip| %>
- <%= ip %>
<% end %>
MyIP: <%= network_ip %>
MyIP: <%= p('cf_mysql.mysql.advertise_host') || discover_external_ip %>
3 changes: 1 addition & 2 deletions jobs/mysql/templates/my.cnf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
end
network.ip
end
network_ip = discover_external_ip

def use_syslog
returnvalue = false
Expand Down Expand Up @@ -45,7 +44,7 @@ nice = 0
wsrep_provider=/var/vcap/packages/mariadb/lib/plugin/libgalera_smm.so
wsrep_provider_options="gcache.size=<%= p('cf_mysql.mysql.gcache_size') %>M;pc.recovery=TRUE;pc.checksum=TRUE"
wsrep_cluster_address="gcomm://<%= cluster_ips.join(",") %>"
wsrep_node_address='<%= network_ip %>:<%= p('cf_mysql.mysql.galera_port') %>'
wsrep_node_address='<%= p('cf_mysql.mysql.advertise_host') || discover_external_ip %>:<%= p('cf_mysql.mysql.galera_port') %>'
wsrep_node_name='<%= name %>/<%= index %>'
wsrep_cluster_name='cf-mariadb-galera-cluster'
wsrep_sst_method=xtrabackup-v2
Expand Down