diff options
author | Nirbhay Choubey <nirbhay@skysql.com> | 2014-09-25 20:59:15 -0400 |
---|---|---|
committer | Nirbhay Choubey <nirbhay@skysql.com> | 2014-09-25 20:59:15 -0400 |
commit | 236cc6cd49f250a43f0f6a794d5052207b2d9348 (patch) | |
tree | b1b5dfd2f560f18e32b7c4434cd517162ed82658 /support-files | |
parent | a756ac61900e28448776427e6ebbb0ef6f48d5cc (diff) | |
download | mariadb-git-236cc6cd49f250a43f0f6a794d5052207b2d9348.tar.gz |
wsrep-related changes: removed some unnecessary files & minor modifications.
Diffstat (limited to 'support-files')
-rw-r--r-- | support-files/CMakeLists.txt | 3 | ||||
-rw-r--r-- | support-files/mysql.server.sh | 5 | ||||
-rw-r--r-- | support-files/rpm/server.cnf | 2 | ||||
-rw-r--r-- | support-files/wsrep.cnf | 129 | ||||
-rw-r--r-- | support-files/wsrep.cnf.sh.moved | 129 | ||||
-rw-r--r-- | support-files/wsrep_notify | 102 |
6 files changed, 5 insertions, 365 deletions
diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index e9abb63a7dc..923eb52c1cb 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -50,7 +50,7 @@ ENDFOREACH() IF(UNIX) SET(prefix ${CMAKE_INSTALL_PREFIX}) - FOREACH(script mysqld_multi.server mysql-log-rotate binary-configure wsrep_notify) + FOREACH(script mysqld_multi.server mysql-log-rotate binary-configure wsrep_notify) CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/${script}.sh ${CMAKE_CURRENT_BINARY_DIR}/${script} @ONLY ) @@ -65,7 +65,6 @@ IF(UNIX) IF(INSTALL_SUPPORTFILESDIR) INSTALL(FILES magic DESTINATION ${inst_location} COMPONENT SupportFiles) INSTALL(DIRECTORY RHEL4-SElinux/ DESTINATION ${inst_location}/SELinux/RHEL4 COMPONENT SupportFiles) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/wsrep_notify DESTINATION ${inst_location} COMPONENT SupportFiles) ENDIF() INSTALL(FILES mysql.m4 DESTINATION ${INSTALL_SHAREDIR}/aclocal COMPONENT Development) diff --git a/support-files/mysql.server.sh b/support-files/mysql.server.sh index c98c8284a97..bdc481d39c2 100644 --- a/support-files/mysql.server.sh +++ b/support-files/mysql.server.sh @@ -52,6 +52,7 @@ datadir= # 0 means don't wait at all # Negative numbers mean to wait indefinitely service_startup_timeout=900 +startup_sleep=1 # Lock directory for RedHat / SuSE. lockdir='/var/lock/subsys' @@ -264,13 +265,13 @@ wait_for_ready () { fi if test -e $sst_progress_file && [ $startup_sleep -ne 10 ];then - echo $echo_n "SST in progress, setting sleep higher" + echo $echo_n "SST in progress, setting sleep intervals to 10 seconds" startup_sleep=10 fi echo $echo_n ".$echo_c" i=`expr $i + 1` - sleep 1 + sleep $startup_sleep done diff --git a/support-files/rpm/server.cnf b/support-files/rpm/server.cnf index 6170a2e4c49..b3c3a3abb38 100644 --- a/support-files/rpm/server.cnf +++ b/support-files/rpm/server.cnf @@ -22,7 +22,7 @@ #binlog_format=row #default_storage_engine=InnoDB #innodb_autoinc_lock_mode=2 -#query_cache_size=0 +#bind-address=0.0.0.0 # # Optional setting #innodb_flush_log_at_trx_commit=0 diff --git a/support-files/wsrep.cnf b/support-files/wsrep.cnf deleted file mode 100644 index 756d4f6783b..00000000000 --- a/support-files/wsrep.cnf +++ /dev/null @@ -1,129 +0,0 @@ -# This file contains wsrep-related mysqld options. It should be included -# in the main MySQL configuration file. -# -# Options that need to be customized: -# - wsrep_provider -# - wsrep_cluster_address -# - wsrep_sst_auth -# The rest of defaults should work out of the box. - -## -## mysqld options _MANDATORY_ for correct opration of the cluster -## -[mysqld] - -# (This must be substituted by wsrep_format) -binlog_format=ROW - -# Currently only InnoDB storage engine is supported -default-storage-engine=innodb - -# to avoid issues with 'bulk mode inserts' using autoinc -innodb_autoinc_lock_mode=2 - -# This is a must for paralell applying -innodb_locks_unsafe_for_binlog=1 - -# Query Cache is not supported with wsrep -query_cache_size=0 -query_cache_type=0 - -# Override bind-address -# In some systems bind-address defaults to 127.0.0.1, and with mysqldump SST -# it will have (most likely) disastrous consequences on donor node -bind-address=0.0.0.0 - -## -## WSREP options -## - -# Full path to wsrep provider library or 'none' -wsrep_provider=none - -# Provider specific configuration options -#wsrep_provider_options= - -# Logical cluster name. Should be the same for all nodes. -wsrep_cluster_name="my_wsrep_cluster" - -# Group communication system handle -#wsrep_cluster_address="dummy://" - -# Human-readable node name (non-unique). Hostname by default. -#wsrep_node_name= - -# Base replication <address|hostname>[:port] of the node. -# The values supplied will be used as defaults for state transfer receiving, -# listening ports and so on. Default: address of the first network interface. -#wsrep_node_address= - -# Address for incoming client connections. Autodetect by default. -#wsrep_node_incoming_address= - -# How many threads will process writesets from other nodes -wsrep_slave_threads=1 - -# DBUG options for wsrep provider -#wsrep_dbug_option - -# Generate fake primary keys for non-PK tables (required for multi-master -# and parallel applying operation) -wsrep_certify_nonPK=1 - -# Maximum number of rows in write set -wsrep_max_ws_rows=131072 - -# Maximum size of write set -wsrep_max_ws_size=1073741824 - -# to enable debug level logging, set this to 1 -wsrep_debug=0 - -# convert locking sessions into transactions -wsrep_convert_LOCK_to_trx=0 - -# how many times to retry deadlocked autocommits -wsrep_retry_autocommit=1 - -# change auto_increment_increment and auto_increment_offset automatically -wsrep_auto_increment_control=1 - -# retry autoinc insert, which failed for duplicate key error -wsrep_drupal_282555_workaround=0 - -# enable "strictly synchronous" semantics for read operations -wsrep_causal_reads=0 - -# Command to call when node status or cluster membership changes. -# Will be passed all or some of the following options: -# --status - new status of this node -# --uuid - UUID of the cluster -# --primary - whether the component is primary or not ("yes"/"no") -# --members - comma-separated list of members -# --index - index of this node in the list -wsrep_notify_cmd= - -## -## WSREP State Transfer options -## - -# State Snapshot Transfer method -wsrep_sst_method=rsync - -# Address which donor should send State Snapshot to. -# Should be the address of THIS node. DON'T SET IT TO DONOR ADDRESS!!! -# (SST method dependent. Defaults to the first IP of the first interface) -#wsrep_sst_receive_address= - -# SST authentication string. This will be used to send SST to joining nodes. -# Depends on SST method. For mysqldump method it is root:<root password> -wsrep_sst_auth=root: - -# Desired SST donor name. -#wsrep_sst_donor= - -# Reject client queries when donating SST (false) -#wsrep_sst_donor_rejects_queries=0 - -# Protocol version to use -# wsrep_protocol_version= diff --git a/support-files/wsrep.cnf.sh.moved b/support-files/wsrep.cnf.sh.moved deleted file mode 100644 index 756d4f6783b..00000000000 --- a/support-files/wsrep.cnf.sh.moved +++ /dev/null @@ -1,129 +0,0 @@ -# This file contains wsrep-related mysqld options. It should be included -# in the main MySQL configuration file. -# -# Options that need to be customized: -# - wsrep_provider -# - wsrep_cluster_address -# - wsrep_sst_auth -# The rest of defaults should work out of the box. - -## -## mysqld options _MANDATORY_ for correct opration of the cluster -## -[mysqld] - -# (This must be substituted by wsrep_format) -binlog_format=ROW - -# Currently only InnoDB storage engine is supported -default-storage-engine=innodb - -# to avoid issues with 'bulk mode inserts' using autoinc -innodb_autoinc_lock_mode=2 - -# This is a must for paralell applying -innodb_locks_unsafe_for_binlog=1 - -# Query Cache is not supported with wsrep -query_cache_size=0 -query_cache_type=0 - -# Override bind-address -# In some systems bind-address defaults to 127.0.0.1, and with mysqldump SST -# it will have (most likely) disastrous consequences on donor node -bind-address=0.0.0.0 - -## -## WSREP options -## - -# Full path to wsrep provider library or 'none' -wsrep_provider=none - -# Provider specific configuration options -#wsrep_provider_options= - -# Logical cluster name. Should be the same for all nodes. -wsrep_cluster_name="my_wsrep_cluster" - -# Group communication system handle -#wsrep_cluster_address="dummy://" - -# Human-readable node name (non-unique). Hostname by default. -#wsrep_node_name= - -# Base replication <address|hostname>[:port] of the node. -# The values supplied will be used as defaults for state transfer receiving, -# listening ports and so on. Default: address of the first network interface. -#wsrep_node_address= - -# Address for incoming client connections. Autodetect by default. -#wsrep_node_incoming_address= - -# How many threads will process writesets from other nodes -wsrep_slave_threads=1 - -# DBUG options for wsrep provider -#wsrep_dbug_option - -# Generate fake primary keys for non-PK tables (required for multi-master -# and parallel applying operation) -wsrep_certify_nonPK=1 - -# Maximum number of rows in write set -wsrep_max_ws_rows=131072 - -# Maximum size of write set -wsrep_max_ws_size=1073741824 - -# to enable debug level logging, set this to 1 -wsrep_debug=0 - -# convert locking sessions into transactions -wsrep_convert_LOCK_to_trx=0 - -# how many times to retry deadlocked autocommits -wsrep_retry_autocommit=1 - -# change auto_increment_increment and auto_increment_offset automatically -wsrep_auto_increment_control=1 - -# retry autoinc insert, which failed for duplicate key error -wsrep_drupal_282555_workaround=0 - -# enable "strictly synchronous" semantics for read operations -wsrep_causal_reads=0 - -# Command to call when node status or cluster membership changes. -# Will be passed all or some of the following options: -# --status - new status of this node -# --uuid - UUID of the cluster -# --primary - whether the component is primary or not ("yes"/"no") -# --members - comma-separated list of members -# --index - index of this node in the list -wsrep_notify_cmd= - -## -## WSREP State Transfer options -## - -# State Snapshot Transfer method -wsrep_sst_method=rsync - -# Address which donor should send State Snapshot to. -# Should be the address of THIS node. DON'T SET IT TO DONOR ADDRESS!!! -# (SST method dependent. Defaults to the first IP of the first interface) -#wsrep_sst_receive_address= - -# SST authentication string. This will be used to send SST to joining nodes. -# Depends on SST method. For mysqldump method it is root:<root password> -wsrep_sst_auth=root: - -# Desired SST donor name. -#wsrep_sst_donor= - -# Reject client queries when donating SST (false) -#wsrep_sst_donor_rejects_queries=0 - -# Protocol version to use -# wsrep_protocol_version= diff --git a/support-files/wsrep_notify b/support-files/wsrep_notify deleted file mode 100644 index bdbe3d12a39..00000000000 --- a/support-files/wsrep_notify +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -eu - -# This is a simple example of wsrep notification script (wsrep_notify_cmd). -# It will create 'wsrep' schema and two tables in it: 'membeship' and 'status' -# and fill them on every membership or node status change. -# -# Edit parameters below to specify the address and login to server. - -USER=root -PSWD=rootpass -HOST=127.0.0.1 -PORT=3306 - -SCHEMA="wsrep" -MEMB_TABLE="$SCHEMA.membership" -STATUS_TABLE="$SCHEMA.status" - -BEGIN=" -SET wsrep_on=0; -DROP SCHEMA IF EXISTS $SCHEMA; CREATE SCHEMA $SCHEMA; -CREATE TABLE $MEMB_TABLE ( - idx INT UNIQUE PRIMARY KEY, - uuid CHAR(40) UNIQUE, /* node UUID */ - name VARCHAR(32), /* node name */ - addr VARCHAR(256) /* node address */ -) ENGINE=MEMORY; -CREATE TABLE $STATUS_TABLE ( - size INT, /* component size */ - idx INT, /* this node index */ - status CHAR(16), /* this node status */ - uuid CHAR(40), /* cluster UUID */ - prim BOOLEAN /* if component is primary */ -) ENGINE=MEMORY; -BEGIN; -DELETE FROM $MEMB_TABLE; -DELETE FROM $STATUS_TABLE; -" -END="COMMIT;" - -configuration_change() -{ - echo "$BEGIN;" - - local idx=0 - - for NODE in $(echo $MEMBERS | sed s/,/\ /g) - do - echo "INSERT INTO $MEMB_TABLE VALUES ( $idx, " - # Don't forget to properly quote string values - echo "'$NODE'" | sed s/\\//\',\'/g - echo ");" - idx=$(( $idx + 1 )) - done - - echo "INSERT INTO $STATUS_TABLE VALUES($idx, $INDEX, '$STATUS', '$CLUSTER_UUID', $PRIMARY);" - - echo "$END" -} - -status_update() -{ - echo "SET wsrep_on=0; BEGIN; UPDATE $STATUS_TABLE SET status='$STATUS'; COMMIT;" -} - -COM=status_update # not a configuration change by default - -while [ $# -gt 0 ] -do - case $1 in - --status) - STATUS=$2 - shift - ;; - --uuid) - CLUSTER_UUID=$2 - shift - ;; - --primary) - [ "$2" = "yes" ] && PRIMARY="1" || PRIMARY="0" - COM=configuration_change - shift - ;; - --index) - INDEX=$2 - shift - ;; - --members) - MEMBERS=$2 - shift - ;; - esac - shift -done - -# Undefined means node is shutting down -if [ "$STATUS" != "Undefined" ] -then - $COM | mysql -B -u$USER -p$PSWD -h$HOST -P$PORT -fi - -exit 0 -# |