[MDEV-9007] [PATCH] Bootstrap does not work in CentOS start script Created: 2015-10-24  Updated: 2015-12-31  Resolved: 2015-11-03

Status: Closed
Project: MariaDB Server
Component/s: Scripts & Clients
Affects Version/s: 10.1.8
Fix Version/s: 10.1.9

Type: Bug Priority: Critical
Reporter: Michaël de groot Assignee: Nirbhay Choubey (Inactive)
Resolution: Fixed Votes: 0
Labels: patch, systemd

Issue Links:
Relates
relates to MDEV-7752 There is no bootstrap command option ... Closed
Sprint: 10.1.9-1

 Description   

Hi everybody,

In the Centos7 start script there is no way to bootstrap a new cluster.
"service mysql bootstrap" is says it is bootstrapping but it always fails trying to connect to another node.

Cheers,
Michael

Config:

[server]
 
server-id=2
 
# this is only for the mysqld standalone daemon
[mysqld]
default_storage_engine = InnoDB
max_connect_errors = 10
max_connections = 100
wait_timeout = 3600
datadir = /var/lib/mysql
 
max_heap_table_size = 100M
 
performance_schema = ON
 
##team@inbox 2015-10-23 logs setup
long_query_time = 0.1
slow_query_log = ON
log_error = /var/log/mysql/mysql.err
slow_query_log_file = /var/log/mysql/slow_query.log
sql_error_log_filename = /var/log/mysql/sql_error.log
plugin-load = sql_errlog.so
 
 
log_bin
 
binlog_format = ROW
innodb_locks_unsafe_for_binlog = 1
 
#binlog_format=row
#default_storage_engine=InnoDB
innodb_autoinc_lock_mode=2
bind-address=0.0.0.0
#
# Optional setting
wsrep_slave_threads=4
innodb_flush_log_at_trx_commit=2
 
##Galera settings from training material
wsrep_on = ON
wsrep_cluster_name="test_cluster"
wsrep_node_name=node2
wsrep_cluster_address="gcomm://192.168.76.199,192.168.76.189"
wsrep_node_address=192.168.76.199
wsrep_sst_method = xtrabackup-v2
wsrep_sst_receive_address=192.168.76.199
wsrep_sst_auth=sst:galera
wsrep_provider=/usr/lib64/galera/libgalera_smm.so
# this is only for embedded server
[embedded]
 
# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]
 
# This group is only read by MariaDB-10.1 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.1]



 Comments   
Comment by Elena Stepanova [ 2015-10-25 ]

michaeldg, I assume it was about 10.1.8?
Please always specify the version which report is about.

service redirects the job to systemctl, and our systemd service does not have a bootstrap option, so apparently it's just ignored. To bootstrap a cluster via systemctl, one can do the following

systemctl set-environment MYSQLD_OPTS=--wsrep-new-cluster
systemctl start mariadb
systemctl unset-environment MYSQLD_OPTS

svoj, danblack, any ideas what we should do? Remove 'bootstrap' from the init script, to avoid confusion?

Comment by Michaël de groot [ 2015-10-25 ]

Cheers, it was indeed about 10.1.8.

Perhaps the init script can set these environments before it redirects?

Comment by Daniel Black [ 2015-10-25 ]

> any ideas what we should do?

yes

> Remove 'bootstrap' from the init script, to avoid confusion?

Like the planned mariadb@bootstrap, make a service mariadb bootstrap error out and inform the user to use a galera_new_cluster (to be added) script.

Comment by Daniel Black [ 2015-10-25 ]

sudo service mysql bootstrap

Please use galera_new_cluster to start the mariadb service [FAILED]srep-new-cluster

Comment by Daniel Black [ 2015-10-26 ]

nirbhay_c you where going to look at this before the GA release? Still interested?

Comment by Nirbhay Choubey (Inactive) [ 2015-10-27 ]

danblack Yes, I can take care of this.

Comment by alex zver [ 2015-12-31 ]

This is an issue with MariaDB-server-10.1.10-1.el7.centos.x86_64.

Comment by Nirbhay Choubey (Inactive) [ 2015-12-31 ]

As noted in the following link use galera_new_cluster instead.
https://mariadb.com/kb/en/mariadb/systemd/

Generated at Thu Feb 08 07:31:26 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.