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

{%- from "galera/map.jinja" import slave with context %} {%- from "galera/map.jinja" import slave with context %}
{%- set service = slave %} {%- set service = slave %}
{%- endif %} {%- endif %}
[mysqld_safe]
syslog


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



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

{%- from "galera/map.jinja" import slave with context %} {%- from "galera/map.jinja" import slave with context %}
{%- set service = slave %} {%- set service = slave %}
{%- endif %} {%- endif %}

[mysqld_safe]
syslog
[mysqld] [mysqld]
datadir=/var/lib/mysql datadir=/var/lib/mysql
bind-address={{ service.bind.address }} bind-address={{ service.bind.address }}
init-connect='SET NAMES utf8' init-connect='SET NAMES utf8'
character-set-server=utf8 character-set-server=utf8
default-storage-engine=innodb default-storage-engine=innodb

skip-external-locking skip-external-locking
skip-name-resolve skip-name-resolve



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

[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



{%- if salt['cmd.run']('test -e /var/lib/mysql/.galera_bootstrap; echo $?') != '0' %} {%- 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: galera_init_start_service:
cmd.run: cmd.run:
- name: /usr/local/sbin/galera_init.sh - name: /usr/local/sbin/galera_init.sh

+ 10
- 0
galera/slave.sls View File



{%- if salt['cmd.run']('test -e /var/lib/mysql/.galera_bootstrap; echo $?') != '0' %} {%- 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: galera_init_start_service:
cmd.run: cmd.run:
- name: /usr/local/sbin/galera_init.sh - name: /usr/local/sbin/galera_init.sh

Loading…
Cancel
Save