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
This patch ensure the local host's ansible facts are used for the
"ansible_architecture" fact, rather than the "physical_host". Since we
don't explicitly collect facts for "physical_host", and the
ansible_architecture fact is set for the local host container, we
don't need to try to retrieve the "physical_host" facts.
A new var "galera_package_arch" is created so that the architecture can
be overriden if it isn't being calculated correctly. Additionally, the
duplicate vars that are not specific to distributions have been moved
into defaults, and out of the specific distribution vars files.
Change-Id: I5124c061faf124388a88eefee93d96e9a9e90d8f
Closes-Bug: 1650384
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
The galera_server and galera_client roles both configure the apt or
yum repository for galera and percona. This can cause a conflict if
the version of the client and server differ.
This patch sets the galera_client dependency to deploy the /root/.my.cnf
file rather than installing all the client packages as well. The client
package is already deployed as part of the galera_server role
deployment.
Change-Id: I9534a02d4ce827a2f0fdf415a11e37808be941e5
Depends-On: I00d662a8afc7ddd4778787d31dc394a0ea3b1401
When there is only one galera node, configure galera with an empty
cluster address. Each time the mysql service starts on this node it will
automatically create a new cluster.
Closes-Bug: #1624327
Change-Id: If653b1aacbd446a4ea5bb806a839dad40011b5b8
Replacing usage of ansible_ssh_host, ansible_ssh_user,
ansible_ssh_port with ansible_host, ansible_user and ansible_port
Change-Id: I35371879a87c115f219cd181245fe59f6d7d3f77
On a running galera cluster, we don't want to unintentionally allow a
galera_cluster_name from changing. This will cause a cluster to fail to
start (if the nodes are restarted sequentially) as the cluter name value
has changed.
To ensure we can still change this value, a new
"galera_force_change_cluster_name" variable is added, which can be set
to "True" in order to change the cluster name.
Change-Id: I8bae038bd207a15d5731b9c91b78df851a4c1986
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
In order to make it easier to differentiate between the lists of
python packages, distribution packages, downloaded packages,
package pins and other similar variables the variable names are
being changed to ensure that they have a more explicit suffix
that defines the purpose and makes the naming more consistent.
This is to facilitate a lookup plugin which will be able to look
up all the package lists and present them as a consolidated piece
of data which may be used for artifact preparation.
Change-Id: Iba040bf8da6ec0552fcf7d10022094dc57d312bc
The current method of installing the distribution packages required is
set in the tasks and cannot be changed by a deployer.
Currently the apt task always installs the latest package. This results
in unexpected binary changes when a deployer may simply be trying to
execute a configuration change.
This patch adds the ability for a deployer to change the desired state
so that the results are predictable.
Change-Id: Ifefa11da81b59084c238a8264fec9f0018dfe23d
Updates the multi-distro framework to add CentOS7 support.
Depends-On: Ieadcdd70e9b8271aee3880896255a5037f56567e
Change-Id: I7e889ea4653a6972ea7f8208416fc1fc3db45e5c
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
This commit implements support for Ubuntu 16.04 Xenial. Changes
include renaming several variables from galera_* to percona_* for
clarity. The reason for this change is that 16.04 will be using
distribution provided packages for percona-xtrabackup.
Mariadb 10.0 packages are available for Ubuntu 16.04, so those
packages and installations procedures will remain unchanged.
Depends-On: Iab5485529cf14933fd7f37430d234a5c41185c18
Change-Id: I4baeb2eddf137619ffedba2f9efd61b7bd142f92
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
* The default apt packages have been moved into a var file
that is only loaded when the detected OS is matched.
* The Install task file has had the apt specific tasks moved
into a named install task file.
Change-Id: I145f6ea0249d577a99c771704125736f3fccef4f
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
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
Default to validation, but allow deployers to override
if they have hosts behind a misbehaving proxy server or
are serving the deb from an alternate location with a
self-signed certificate
Change-Id: I5f104867c6c7dd41d288477a1c330ff3243644fd
Most hosts will have apt-transport-https installed already, however
this should ensure that those that do not will successfully install
the MariaDB packages hosted on an HTTPS repository
Change-Id: I43c1c99ea85ea6f1ec1041cb03071d2c1557d4f4
Related-Bug: #1547541
Workarounding the upstream ansible apt module bug
documented here:
https://github.com/ansible/ansible-modules-core/pull/1517
For the next versions of ansible we'll be using, we should
check if the apt bug is fixed. When it's fixed, we could
abandon this change and use the standard apt module
with correct cache handling.
Change-Id: Id86af470197fe5b70724f0296f1cb0aed21bf826
The change adds in the ability for the role to take care of a major upgrade
in a version of an installed mariadb galera cluster.
The change adds a new task file that checks if the installed version of the
galera cluster matches that of the specified major version. The role will
hard stop if there is a version mismatch and the option "galera_upgrade=true"
is not passed.
Change-Id: I26560668325d45f670c8b946c978c48559f58419
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
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>