Fixes MariaDB to support Heat

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
This commit is contained in:
Daneyon Hansen 2015-06-15 23:05:31 +00:00
parent f23a35651e
commit 4a4cf92eb9
3 changed files with 4 additions and 0 deletions

View File

@ -19,6 +19,7 @@ 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 collation-server $COLLATION_SERVER
crudini --set $server_cnf mysqld init-connect "'${INIT_CONNECT}'" 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 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 if [ "${INNODB_FILE_PER_TABLE}" == "true" ] || ["${INNODB_FILE_PER_TABLE}" == "True" ] ; then
crudini --set $server_cnf mysqld innodb_file_per_table 1 crudini --set $server_cnf mysqld innodb_file_per_table 1
fi fi

View File

@ -77,6 +77,7 @@ all containers. This allows a simple method of ensuring every type of node
KEYSTONE_PUBLIC_SERVICE_HOST=<IP> - The IP address where Keystone is running KEYSTONE_PUBLIC_SERVICE_HOST=<IP> - The IP address where Keystone is running
MARIADB_ROOT_PASSWORD=<mariadb root password> - defines the MariaDB root password MARIADB_ROOT_PASSWORD=<mariadb root password> - defines the MariaDB root password
MARIADB_SERVICE_HOST=<IP> - The IP Address where Mariadb is running MARIADB_SERVICE_HOST=<IP> - The IP Address where Mariadb is running
MARIADB_MAX_CONNECTIONS=<151> - The maximum number of connections to the MariaDB server
NETWORK_MANAGER=<nova|neutron> - Use Nova or Neutron networking NETWORK_MANAGER=<nova|neutron> - Use Nova or Neutron networking
NOVA_API_SERVICE_HOST=<IP> - The IP Address where the Nova API Service is hosted NOVA_API_SERVICE_HOST=<IP> - The IP Address where the Nova API Service is hosted
METADATA_HOST=<IP> - The IP address of the Nova Metadata service METADATA_HOST=<IP> - The IP address of the Nova Metadata service

View File

@ -31,6 +31,7 @@ INIT_HEAT_DB=true
INIT_KEYSTONE_DB=true INIT_KEYSTONE_DB=true
INIT_NOVA_DB=true INIT_NOVA_DB=true
MARIADB_ROOT_PASSWORD=kolla MARIADB_ROOT_PASSWORD=kolla
MARIADB_MAX_CONNECTIONS=151
PASSWORD=12345 PASSWORD=12345
@ -256,6 +257,7 @@ KEYSTONE_DB_PASSWORD=$KEYSTONE_DB_PASSWORD
KEYSTONE_PUBLIC_SERVICE_HOST=$KEYSTONE_PUBLIC_SERVICE_HOST KEYSTONE_PUBLIC_SERVICE_HOST=$KEYSTONE_PUBLIC_SERVICE_HOST
MARIADB_SERVICE_HOST=$HOST_IP MARIADB_SERVICE_HOST=$HOST_IP
MARIADB_ROOT_PASSWORD=$MARIADB_ROOT_PASSWORD MARIADB_ROOT_PASSWORD=$MARIADB_ROOT_PASSWORD
MARIADB_MAX_CONNECTIONS=$MARIADB_MAX_CONNECTIONS
NETWORK_MANAGER=$NETWORK_MANAGER NETWORK_MANAGER=$NETWORK_MANAGER
NOVA_API_SERVICE_HOST=$NOVA_API_SERVICE_HOST NOVA_API_SERVICE_HOST=$NOVA_API_SERVICE_HOST
NOVA_METADATA_API_SERVICE_HOST=$NOVA_METADATA_API_SERVICE_HOST NOVA_METADATA_API_SERVICE_HOST=$NOVA_METADATA_API_SERVICE_HOST