Allow configuration of MySQL max_connections setting
authorGiulio Fidente <gfidente@redhat.com>
Fri, 10 Jul 2015 01:28:46 +0000 (03:28 +0200)
committerGiulio Fidente <gfidente@redhat.com>
Fri, 10 Jul 2015 15:43:20 +0000 (17:43 +0200)
The number of connections created to the database depends on the
number of running processes and this is a factor of both the nodes
count and the cores count. We make it configurable so it can be
increased when needed.

Change-Id: I41d511bde95d0942706bf7c28cd913498ea165fb

controller.yaml
overcloud-without-mergepy.yaml
puppet/controller-puppet.yaml
puppet/manifests/overcloud_controller.pp
puppet/manifests/overcloud_controller_pacemaker.pp

index a22bb83..1bd1f59 100644 (file)
@@ -253,6 +253,10 @@ parameters:
         lower level default.
     type: number
     default: 0
+  MysqlMaxConnections:
+    description: Configures MySQL max_connections config setting
+    type: number
+    default: 1024
   MysqlRootPassword:
     type: string
     hidden: true
index 4258fe0..0bc585c 100644 (file)
@@ -410,6 +410,10 @@ parameters:
         lower level default.
     type: number
     default: 0
+  MysqlMaxConnections:
+    description: Configures MySQL max_connections config setting
+    type: number
+    default: 1024
   NeutronDnsmasqOptions:
     default: 'dhcp-option-force=26,1400'
     description: Dnsmasq options for neutron-dhcp-agent. The default value here forces MTU to be set to 1400 to account for the tunnel overhead.
@@ -734,6 +738,7 @@ resources:
           KeystoneSSLCertificateKey: {get_param: KeystoneSSLCertificateKey}
           MysqlClusterUniquePart: {get_attr: [MysqlClusterUniquePart, value]}
           MysqlInnodbBufferPoolSize: {get_param: MysqlInnodbBufferPoolSize}
+          MysqlMaxConnections: {get_param: MysqlMaxConnections}
           MysqlRootPassword: {get_attr: [MysqlRootPassword, value]}
           NeutronPublicInterfaceIP: {get_param: NeutronPublicInterfaceIP}
           NeutronFlatNetworks: {get_param: NeutronFlatNetworks}
index 9f531ef..3f01b09 100644 (file)
@@ -258,6 +258,10 @@ parameters:
         lower level default.
     type: number
     default: 0
+  MysqlMaxConnections:
+    description: Configures MySQL max_connections config setting
+    type: number
+    default: 1024
   MysqlRootPassword:
     type: string
     hidden: true
@@ -683,6 +687,7 @@ resources:
         enable_ceph_storage: {get_param: EnableCephStorage}
         enable_swift_storage: {get_param: EnableSwiftStorage}
         mysql_innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize}
+        mysql_max_connections: {get_param: MysqlMaxConnections}
         mysql_root_password: {get_param: MysqlRootPassword}
         mysql_cluster_name:
           str_replace:
@@ -953,6 +958,7 @@ resources:
                 enable_ceph_storage: {get_input: enable_ceph_storage}
                 enable_swift_storage: {get_input: enable_swift_storage}
                 mysql_innodb_buffer_pool_size: {get_input: mysql_innodb_buffer_pool_size}
+                mysql_max_connections: {get_input: mysql_max_connections}
                 mysql::server::root_password: {get_input: mysql_root_password}
                 mysql_cluster_name: {get_input: mysql_cluster_name}
                 mysql_bind_host: {get_input: mysql_network}
index 777ebad..f17dc83 100644 (file)
@@ -90,7 +90,7 @@ if hiera('step') >= 2 {
     override_options => {
       'mysqld' => {
         'bind-address' => hiera('mysql_bind_host'),
-        'max_connections' => '1024',
+        'max_connections' => hiera('mysql_max_connections'),
         'open_files_limit' => '-1',
       },
     }
index 3c5a015..8a31a9a 100644 (file)
@@ -140,7 +140,7 @@ if hiera('step') >= 1 {
       'query_cache_size'              => '0',
       'query_cache_type'              => '0',
       'bind-address'                  => hiera('mysql_bind_host'),
-      'max_connections'               => '1024',
+      'max_connections'               => hiera('mysql_max_connections'),
       'open_files_limit'              => '-1',
       'wsrep_provider'                => '/usr/lib64/galera/libgalera_smm.so',
       'wsrep_cluster_name'            => 'galera_cluster',