Users can configure the number of worker threads however when it's
not specified the calculated number of workers can get too large on
hosts with a large number of CPUs.
Change-Id: Ic0c77d03ab67d3850fa6b46010e63d886a96cc31
We used the amount of connections instead of the maximum number
of open files for the systemd unit limit.
The amount of connections are handled by mysql.
Change-Id: Ib82cba87038ac2601b4ff268c6c889dbe2387228
Closes-Bug: #1659060
The max connection calculation uses the number of vcpus reported by ansible
however it's using the wrong value in one portion of the calculation. The
result is that the calculation returns 0 rather than the intended 200 when
there are both x86 and POWER controllers.
Change-Id: I48314a3b701da4df6aaa0c163b14da36a1e70b7f
Closes-Bug: #1647106
Update repos and packages to install the server for MariaDB 10.1, the
current stable release.
Several improvements have been made to improve the upgrade process and
an upgrade from 10.0 has been included in the test playbooks.
Make use of the yum_repository module for installing on yum based
systems and give the apt repository files consistent names, 'MariaDB'
and 'Percona' for easier maintenance and handling of upgrades going
forward.
Depends-On: I8939703f26e5d8adc393b984266f4cad7a6e0b4c
Change-Id: Ib6409f1fcf4a664b65dbe01372a19509d02d70a4
Enable the 'log_bin_trust_function_creators' option to allow users to
create stored procedures and triggers without needing to grant them
SUPER privileges.
This is required specifically to allow the keystone user to create
database triggers during the live migration process.
Change-Id: I17d5bba2a81911b74ad5d23687cfc7a7ed81feb4
While working on https://review.openstack.org/#/c/320542/, galera
was found to be listening only on IPv6 addresses. Connections to
::1 worked fine, but connections to 127.0.0.1 failed.
This patch ensures that galera is listening on all IPv4 and IPv6
addresses.
Closes-bug: 1620793
Change-Id: I1ddae03343b6fe9542b6118810cc55108d4417c0
This changes how several fields using ansible_processor_vcpus are set to
work around a bug in Ansible where ansible_processor_vcpus is reported
as 0 on ppc64le today due to issues with /proc/cpuinfo format differences.
An upstream fix has been proposed at [1].
[1] - ansible/ansible#16533
Change-Id: I49a024aa2165db6501d9e26d09d7940cb0531bd4
Using the --compact option with xtrabackup has been shown to cause
crashes when used during an SST to transfer data between nodes:
https://bugs.launchpad.net/percona-xtrabackup/+bug/1192834
Based on DBA advice, we are disabling this option.
Closes-Bug: #1590166
Change-Id: I23fd5e36b74163fe97cf983cdc4b1d5678d94e7b
There can be issues during database migrations when a column used as a
foreign key is using a different collation between the parent and
child table.
Update the my.cnf template to set the server default collation to
utf8_general_ci to ensure consistency between tables initially
created with and those later altered to use the utf8 character set.
This matches both the instruction from the OpenStack install guide[0],
and MariaDB's default for the utf8 character set[1].
[0]
http://docs.openstack.org/mitaka/install-guide-ubuntu/environment-sql-database.html
[1]
> SHOW CHARACTER SET WHERE CHARSET = 'utf8';
+---------+---------------+-------------------+--------+
| Charset | Description | Default collation | Maxlen |
+---------+---------------+-------------------+--------+
| utf8 | UTF-8 Unicode | utf8_general_ci | 3 |
+---------+---------------+-------------------+--------+
Related-Bug: 1594195
Change-Id: I8507b6c9bd058bb308cc089f3802e52e24bea324
Add the galera_apt_pinned_packages default variable which is passed to
the apt_package_pinning role, instead of a template within this role, to
pin the MariaDB repo.
Change-Id: Iea8b002b57fa72230056656f42eaa75e84e9b5a6
Create a new variable called galera_cluster_members which is a list of
the hosts that make up the galera cluster. Set the default value to
groups['galera_all'] which is the group used by openstack-ansible to
refer to the members of the cluster. Replace all other references to
groups['galera_all'] with the new variable. This allows other consumers
of this role to use their own group naming scheme.
Add a new task to verify that current host is a member of
galera_cluster_members.
Add the var galera_client_drop_config_file=true to the role dependency
galera_client, this is required because the default value for that var
in the galera_client role is based on membership of the galera_all
group.
Modify the functional testing to override galera_cluster_members, this
aims to prevent the return of any hard-coded role references.
Change-Id: I59af07217114a001cbebaa95a651919d53c9ec21
In some cases Ansible does not detect the number of CPU's on the
target host. This patch ensures that in such cases there is always
a usable value.
Change-Id: I504d2ae34ce587a3ea6639e182d29303667139e3
The role was changed to make it compatible with the OpenStack
CI. The changes effect defaults, handlers, and the tests for
the role and adds gitignore/review files.
The changes essentially get the role to a state where its passing
the tests which are spinning up a galera cluster, adding users
and databases, and then testing integrity from every node. The
tests specifically ensure we're able to guarantee that after the
role runs everything works. Previously to these changes the role
assumed everything was working and nothing had been done to
guarantee cluster state.
In the handler changes, the temporary "sst" directory is cleaned up
should the handler restart fail. This ensure that a node is in a clean
state if a leftover sst directory was on the disk which would cause
a node to fail to join a cluster or bootstrap. Additionally the
environment variable "MYSQLD_STARTUP_TIMEOUT" is now being passed
into the init script because the defaults are not being sourced
at the init script runtime.
In the task changes a new configuration file, that is part of the
mariadb package, is being removed which has unforeseen options within
it causing no logs to be created.
the default option "galera_innodb_additional_mem_pool_size" was removed
because its no longer valid within MariaDB10 and we'd never caught that
error message until now.
The tests were updated to support running the role from a user which
was not root.
Change-Id: I16af30c660790656fc2d59f9943c172b88098905
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>