Merge pull request #20 from tcpcloud/ulimit
Fix mysql with adding ulimit -n 102400
diff --git a/galera/master.sls b/galera/master.sls
index efde836..6d230b4 100644
--- a/galera/master.sls
+++ b/galera/master.sls
@@ -45,12 +45,25 @@
- require:
- pkg: galera_packages
+{%- if grains.get('init', None) == "upstart" %}
+
galera_purge_init:
file.absent:
- - name: /etc/init/mysql.conf
- - require:
+ - name: /etc/init.d/mysql
+ - require:
- pkg: galera_packages
+galera_overide:
+ file.managed:
+ - name: /etc/init/mysql.override
+ - contents: |
+ limit nofile 102400 102400
+ exec /usr/bin/mysqld_safe
+ - require:
+ - pkg: galera_packages
+
+{%- endif %}
+
galera_conf_debian:
file.managed:
- name: /etc/mysql/debian.cnf
diff --git a/galera/slave.sls b/galera/slave.sls
index 5a58186..fb59f48 100644
--- a/galera/slave.sls
+++ b/galera/slave.sls
@@ -45,12 +45,25 @@
- require:
- pkg: galera_packages
+{%- if grains.get('init', None) == "upstart" %}
+
galera_purge_init:
file.absent:
- - name: /etc/init/mysql.conf
+ - name: /etc/init.d/mysql
- require:
- pkg: galera_packages
+galera_overide:
+ file.managed:
+ - name: /etc/init/mysql.override
+ - contents: |
+ limit nofile 102400 102400
+ exec /usr/bin/mysqld_safe
+ - require:
+ - pkg: galera_packages
+
+{%- endif %}
+
galera_conf_debian:
file.managed:
- name: /etc/mysql/debian.cnf