![Daneyon Hansen](/assets/img/avatar_default.png)
When spawning Heat stacks, the DB reaches the max_connections limit. This causes MariaDB to block all traffic by source IP, essentially blocking all services. This patch introduces the MARIADB_MAX_CONNECTIONS parameter to make the max_connections configurable. The default of 151 max_connections is maintained. Closes-Bug: #1465422 Change-Id: I869aa9f117c6fa959b1c6948dfc379f30a6bc1d7
26 lines
973 B
Bash
Executable File
26 lines
973 B
Bash
Executable File
#!/bin/bash
|
|
|
|
. /opt/kolla/kolla-common.sh
|
|
|
|
: ${BIND_ADDRESS:=$PUBLIC_IP}
|
|
: ${DB_ROOT_PASSWORD:=$DB_ROOT_PASSWORD}
|
|
: ${DEFAULT_STORAGE_ENGINE:=innodb}
|
|
: ${COLLATION_SERVER:=utf8_general_ci}
|
|
: ${INIT_CONNECT:=SET NAMES utf8}
|
|
: ${CHAR_SET_SERVER:=utf8}
|
|
: ${INNODB_FILE_PER_TABLE:=true}
|
|
: ${DATADIR:=/var/lib/mysql}
|
|
: ${TEMP_FILE:='/tmp/mysql-first-time.sql'}
|
|
|
|
server_cnf=/etc/my.cnf.d/server.cnf
|
|
|
|
crudini --set $server_cnf mysqld bind-address $BIND_ADDRESS
|
|
crudini --set $server_cnf mysqld default-storage-engine $DEFAULT_STORAGE_ENGINE
|
|
crudini --set $server_cnf mysqld collation-server $COLLATION_SERVER
|
|
crudini --set $server_cnf mysqld init-connect "'${INIT_CONNECT}'"
|
|
crudini --set $server_cnf mysqld character-set-server $CHAR_SET_SERVER
|
|
crudini --set $server_cnf mysqld max_connections "$MARIADB_MAX_CONNECTIONS"
|
|
if [ "${INNODB_FILE_PER_TABLE}" == "true" ] || ["${INNODB_FILE_PER_TABLE}" == "True" ] ; then
|
|
crudini --set $server_cnf mysqld innodb_file_per_table 1
|
|
fi
|