Browse Source

Galera master installation hangs

Galera master installation hangs on installation
mysql-server-wsrep-5.6. It seems that log_error is not working,
because of next message: "mysqld_safe Can't log to error log and
syslog at the same time. Remove all --log-error configuration
options for --syslog to take effect." Using "syslog = yes" instead
of log_error makes it works without any other changes.

Change-Id: I39a8a87ed048557c19f3843b97c75469385e4978
Closes-bug: PROD-9065
pr/24
Jakub Pavlik 7 years ago
parent
commit
8d1060a83f
5 changed files with 61 additions and 3 deletions
  1. +3
    -1
      galera/files/my.cnf
  2. +2
    -2
      galera/files/my.cnf.init
  3. +36
    -0
      galera/files/my.cnf.pre
  4. +10
    -0
      galera/master.sls
  5. +10
    -0
      galera/slave.sls

+ 3
- 1
galera/files/my.cnf View File

@@ -9,6 +9,8 @@
{%- from "galera/map.jinja" import slave with context %}
{%- set service = slave %}
{%- endif %}
[mysqld_safe]
syslog

[mysqld]
datadir=/var/lib/mysql
@@ -21,7 +23,7 @@ collation-server=utf8_general_ci
init-connect='SET NAMES utf8'
character-set-server=utf8
default-storage-engine=innodb
log_error=/var/log/mysql/error.log
#log_error=/var/log/mysql/error.log
skip-external-locking
skip-name-resolve


+ 2
- 2
galera/files/my.cnf.init View File

@@ -9,7 +9,8 @@
{%- from "galera/map.jinja" import slave with context %}
{%- set service = slave %}
{%- endif %}

[mysqld_safe]
syslog
[mysqld]
datadir=/var/lib/mysql
bind-address={{ service.bind.address }}
@@ -21,7 +22,6 @@ collation-server=utf8_general_ci
init-connect='SET NAMES utf8'
character-set-server=utf8
default-storage-engine=innodb

skip-external-locking
skip-name-resolve


+ 36
- 0
galera/files/my.cnf.pre View File

@@ -0,0 +1,36 @@
[client]
port = 3306
socket = /var/run/mysqld/mysqld.sock
[mysqld_safe]
socket = /var/run/mysqld/mysqld.sock
nice = 0
syslog
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
basedir = /usr
datadir = /var/lib/mysql
tmpdir = /tmp
lc-messages-dir = /usr/share/mysql
skip-external-locking
bind-address = 127.0.0.1
key_buffer = 16M
max_allowed_packet = 16M
thread_stack = 192K
thread_cache_size = 8
myisam-recover = BACKUP
query_cache_limit = 1M
query_cache_size = 16M
#log_error = /var/log/mysql/error.log
expire_logs_days = 10
max_binlog_size = 100M
[mysqldump]
quick
quote-names
max_allowed_packet = 16M
[mysql]
[isamchk]
key_buffer = 16M
!includedir /etc/mysql/conf.d/

+ 10
- 0
galera/master.sls View File

@@ -95,6 +95,16 @@ galera_bootstrap_script:

{%- if salt['cmd.run']('test -e /var/lib/mysql/.galera_bootstrap; echo $?') != '0' %}

# Enforce config before package installation
galera_pre_config:
file.managed:
- name: {{ master.config }}
- source: salt://galera/files/my.cnf.pre
- mode: 644
- template: jinja
- require_in:
- pkg: galera_packages

galera_init_start_service:
cmd.run:
- name: /usr/local/sbin/galera_init.sh

+ 10
- 0
galera/slave.sls View File

@@ -95,6 +95,16 @@ galera_bootstrap_script:

{%- if salt['cmd.run']('test -e /var/lib/mysql/.galera_bootstrap; echo $?') != '0' %}

# Enforce config before package installation
galera_pre_config:
file.managed:
- name: {{ slave.config }}
- source: salt://galera/files/my.cnf.pre
- mode: 644
- template: jinja
- require_in:
- pkg: galera_packages

galera_init_start_service:
cmd.run:
- name: /usr/local/sbin/galera_init.sh

Loading…
Cancel
Save