Dynamically include the correct galera_upgrade_check task file based on
the ansible_pkg_mgr variable.
Change-Id: Icf7a2556fc303f8920a85873a6f44d4548b7f459
This patch adds the `galera_disable_privatedevices` variable that
allows deployers to disable PrivateDevices in the systemd unit file
shipped with MariaDB 10.1+ on CentOS 7 systems.
This is a workaround to fix the systemd/LXC issues with bind
mounting an already bind mounted `/dev/ptmx` inside the LXC
container.
See Launchpad bug, lxc/lxc#1623, or systemd/systemd#6121 for more
details.
Co-Authored-By: Major Hayden <major@mhtx.net>
Closes-bug: 1697531
Change-Id: I8a74113bd16a768a4754fb1f6ee04caf1ac82920
Currently the role tests use whatever versions of pip,
setuptools and wheel are already installed on the host.
When a version of these tools changes it often causes
problems for our testing.
This will ensure that we use a known good set of pins
which is maintained in the general SHA bumping process.
Change-Id: I50eb6e2adfd6daf725fbceab46c8a1de461e758d
When executing the tests repo clone in OpenStack-CI,
use zuul-cloner instead of git to enable cross-repo
testing. This ensures that if a dependent patch from
the tests repo is noted using 'Depends-On: <change-id>'
in the commit message, that patch will be included.
Change-Id: Id40ba2e8093741feb795959a9d8292fd73af887b
Depends-On: Idce7abebf32f24c356a27e099fbca954d917402b
Move test host vars from the inventory to individual files for each
host. 'ansible_become' has been removed from localhost's vars since it
should be handled on a playbook basis.
Change-Id: I57f17002f6e8877403d3fc00f6eb148f50b80241
Task "Start mysql node normally" needs to add "galera-bootstrap"
tag or it will causing conditional check error on mysql_started
variable
Change-Id: Id7e3fd30480b39b200cffb085c212b5ab5229f04
Closes-Bug: #1680694
MySQL SSL connections allowed. Self-signed SSL bundle
created and placed to the deployment host, or user-provided
SSL bundle (CA, cert and the key) is used.
Change-Id: Ibac61d45cea67123fe61a6de4f906b4bd1949a34
Partial-Bug: #1667789
During an upgrade, we run the upgrade in serial, and we attempt to
bootstrap the cluster from the "galera_server_bootstrap_node". This
causes issues when there is an existing cluster that is still up.
To avoid this, we can simply attempt to start the cluster normally, if
it fails to start, and join the existing cluster, we can bootstrap as
usual.
Additionally, we can make the bootstrap slightly more efficient by only
running it against the bootstrap host and splitting out the
"galera_upgrade_post.yml" tasks.
Finally - run the upgrade in serial which mirrors our approach in the
integrated repo.
Change-Id: Ic4d69f0fa75c1eea81d10a76cca9a8d9c3822094
Closes-Bug: #1667103
When trying to execute an upgrade the removal fails
if packages in the list are included that cannot be
found in one of the repositories configured.
This patch endeavours to only remove packages that
will be found.
Change-Id: I67cc225b25fca005cdba3bf67793b4f23d6ae82a
The file vars/main.yml is automatically loaded
so by using this file name we're able to get
rid of the task that loads vars/common.yml which
is a small optimisation.
Change-Id: I4e32c8e10414080a5c0bd14df874a28b8f28e9fa
When changing the repo URL, the metadata does not reliably
update, resulting in the right URL being used, but the
wrong package list. This is why we force the metadata to be
cleaned out whenever the repo config changes.
Change-Id: I9bca9a89b58cd539dd5c224d6b141dc4d844bcc2
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
When the set_fact module is used with the ternary filter the evaluated
condition must be surrounded in parentheses, otherwise the fact will
always be set to False.
While other uses of ternary within this role don't seem to be effected,
update them also for consistency and readability.
Change-Id: I4809ded8b6fe738f8fa700434739ee0b1f6d3af1
Installing all packages in one step speeds up the playbook run and is
being used in other roles already.
Change-Id: Iadd07d7979772a49e5f55f612fd95a099924638d
Since the systemctl daemon-reload has been added we're seeing some race
conditions that are causing intermittent failures. We can utilise the
retry option for galera_running_check and ensure the service is running
before continuing.
Change-Id: I7937a71f81862db3de682e45dda62fa0432c31a1
In the galera post install playbook, the systemd configuration files are
modified. This change verifies that systemctl daemon-reload is called,
so that these files are re-read, and the configuration is up-to-date.
Closes-Bug: #1656821
Change-Id: I5d8fcf1f2500146fc86db4dd19cd30aaa1055adb
This patch fixes the galera running checks so that they work
properly on CentOS.
Closes-Bug: 1660445
Change-Id: I7638456239aa23a7e5cd6027d1a399cfdadf4aaa
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
This patch bumps the version of the percona xtrabackup tool for
ppc64le to match the amd64 version. A playbook for building this
in an automated way is also available on Github[1].
[1] - https://github.com/powervm/ppc64le-osa-build
Change-Id: I6b488c0b2f51b47b316ef06f0bcdc3455f05ec51
Closes-Bug: #1653962
If the deployer decides to override the complete apt repository
git, it would be best to have the possibility to NOT define a
filename, this way it would be the same behavior as in N.
This also allows a combined backport of
https://review.openstack.org/#/c/417362/
to fix bug 1653947 cleanly in Newton.
Change-Id: I00b924275cd9350a93b48f4d886919b597392049
The run_tests.sh script fails when it is run multiple times on CentOS.
The `bindep` run returns an empty list of packages and then `yum`
exits with an error since no packages were provided to install.
This patch checks the length of the `bindep` output and skips the `yum`
installation when the package list is empty.
The patch also cleans up some of the old cruft left over from previous
scripts and avoids repetition.
Change-Id: I05f47ad8dc0f5a6c2a48a37be1d0d994164c349a
Signed-off-by: Major Hayden <major@mhtx.net>
If we filtered this role by running only on tags config/install,
the task(s) changed here wouldn't be properly targeted.
Under ubuntu the galera server would run by default if only doing the
install tag, where it should stay disabled.
Change-Id: Ic23fad68b9ee383559695ab73d6447735f445f51
If the ``use_percona_upstream`` value is changed from True to False,
don't remove the existing repository. This is also the source of a bug
in Mitaka: We were installing the repo by default and installed the
percona-xtrabackup tool with a deb file. If another playbook/role
installed percona-xtrabackup, it would override (and probably upgrade)
the deb installed version, which is undesired.
Change-Id: I2ccc2904d0d4244dc0792411b49763cc3f7e2e22
Closes-Bug: 1653947
Signed-off-by: Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk>
This patch bumps the version of the percona xtrabackup tool, and
ensures that CentOS/ubuntu are running the same version.
Change-Id: I3e82c7be72df67604dbf43a5123a08bdbc1ed8a9
Apt cannot have 2 mirrors with the same content in 2 different files.
If a deployer has an apt mirror with mariadb (and others), the deployer
still need to add a repository, but will also need to define the
filename used, in order to avoid clashes.
This commit makes possible to decide the filename for the repo.
Change-Id: I047bdaf58a4057a96103f6d56c2f811886b1b625
Signed-off-by: Jean-Philippe Evrard <jean-philippe.evrard@rackspace.co.uk>