215 Commits

Author SHA1 Message Date
Jimmy McCrory
bc963815ca Dynamically include upgrade_check task files
Dynamically include the correct galera_upgrade_check task file based on
the ansible_pkg_mgr variable.

Change-Id: Icf7a2556fc303f8920a85873a6f44d4548b7f459
2017-06-14 15:33:05 +00:00
Major Hayden
f46e152506
Disable PrivateDevices for Galera on CentOS 7
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
2017-06-14 09:02:08 -05:00
OpenStack Proposal Bot
6ac83ba587 Updated from global requirements
Change-Id: I43d8347229bfe44490307b79f590840c89dafe25
2017-06-12 12:58:25 +00:00
OpenStack Proposal Bot
aabfe39a04 Updated from global requirements
Change-Id: I41389931a6a9683268d2648943fe5cdd74f16c15
2017-06-10 21:43:55 +00:00
Jesse Pretorius
f272754df5 Ensure that role tests pin pip/setuptools/wheel
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
2017-06-04 11:18:15 +01:00
OpenStack Proposal Bot
2aaedec55f Updated from global requirements
Change-Id: I12c35ab7eec1f04a5e5a43e8848c2f782ca2ef99
2017-06-02 22:02:33 +00:00
OpenStack Proposal Bot
e05b6a85f2 Updated from global requirements
Change-Id: Ia4f1af92b3abc817487ed5450202d7cad2dbb278
2017-05-17 03:54:18 +00:00
Jesse Pretorius
0581614834 Use zuul-cloner for tests repo in OpenStack-CI
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
2017-05-04 16:49:16 +01:00
Logan V
8cc111819b Use the correct cluster addresses for node list
The cluster address list is broken when the wsrep node address is
not ansible_host.

Change-Id: I75b1fdb0332aa3102ed3841b84025207c52e242b
2017-04-26 21:37:18 +00:00
Logan V
963d7a06ed Add fallback fetch for xtrabackup and qpress
Change-Id: I87313ded52b2c1046782b45e90f2a73e5b8dcc90
2017-04-26 00:37:44 +00:00
Jimmy McCrory
6b5813b553 Standardize test vars
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
2017-04-25 17:36:52 -07:00
Jirayut Nimsaeng
61609d8f9f Fix conditional check error when run galera-bootstrap tag
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
2017-04-07 12:17:42 +07:00
Jenkins
fd0a6b104a Merge "Added Galera SSL support" 2017-03-30 22:11:43 +00:00
Andrey
eb5fc9c1e8 Added Galera SSL support
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
2017-03-30 09:42:38 -05:00
Andy McCrae
db64210b12 Fix upgrades for multinode galera
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
2017-03-22 14:31:28 +00:00
Jenkins
6bcf1e2383 Merge "Upgrade: Make removal list distribution-specific" 2017-03-16 12:31:39 +00:00
Jesse Pretorius
f939bf150f Upgrade: Make removal list distribution-specific
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
2017-03-16 11:05:23 +00:00
Jesse Pretorius
03b702b26a Rename vars/common.yml to vars/main.yml
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
2017-03-14 16:11:17 +00:00
Jesse Pretorius
1da7340a99 Force clean yum metadata when repo config changes
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
2017-03-14 15:25:43 +00:00
Logan V
cf1f8f3cac Install python2-pyOpenSSL package on CentOS
Package pyOpenSSL is obsoleted by python2-pyOpenSSL.

Change-Id: I202403ac059d4b1b25c1a39cc529af24a1208329
2017-03-03 12:49:09 -06:00
OpenStack Proposal Bot
2559482150 Updated from global requirements
Change-Id: I25da4cdc28fe543f204b6489936aebb5510627d5
2017-03-02 11:51:11 +00:00
Ravi Gummadi
5b9ce0b551 Cap the number of worker threads
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
2017-03-01 07:41:09 -05:00
Jimmy McCrory
2f68deee89 Fix fact set using ternary filter
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
2017-02-28 10:36:05 -08:00
Major Hayden
777641e056 Install packages in one step
Installing all packages in one step speeds up the playbook run and is
being used in other roles already.

Change-Id: Iadd07d7979772a49e5f55f612fd95a099924638d
2017-02-22 19:20:49 +00:00
Markos Chandras
c277ab8aa1 tasks: galera_upgrade_check: Fix yum tag
The tag for the 'yum' task should be 'install-yum' instead of
'install-apt'

Change-Id: I6760eca3ca8fe39301ac1edc6d8897e9a4293b45
2017-02-20 15:52:17 +00:00
Jenkins
c80643e848 Merge "Retry galera_running_check after systemctl daemon-reload" 2017-02-15 09:11:02 +00:00
Andy McCrae
841ac16df6 Retry galera_running_check after systemctl daemon-reload
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
2017-02-13 16:28:31 +00:00
OpenStack Proposal Bot
e605fa95eb Updated from global requirements
Change-Id: Ifab71bceb27b070051b42bfb7513249bf3db3a7b
2017-02-11 17:48:15 +00:00
OpenStack Proposal Bot
2a2062c2bb Updated from global requirements
Change-Id: Ic3105033bf233313a6edf00f6044069e3eba485e
2017-02-10 05:55:23 +00:00
Cuong Nguyen
144216bfe9 Install python2 for Ubuntu 16.04 and CentOS 7 in Vagrant
- Install python2 for Ubuntu 16.04 and CentOS 7 before executing test
  script.

Change-Id: I7b4b070bdea983aef5dff69939ce7991419292af
2017-02-07 08:57:18 +07:00
Jenkins
56c85547d4 Merge "Update reno for stable/ocata" 2017-02-06 09:32:40 +00:00
gecong1973
b8acdcfe88 Use https instead of http for git.openstack.org
TrivialFix

Change-Id: I82433ebf27ebaf01301895ff27615a4296f1eb44
2017-02-06 12:10:24 +08:00
931b35897d Update reno for stable/ocata
Change-Id: If77793bb2fc8ed74d18c0b9b857195f8369e7b15
2017-02-03 18:57:29 +00:00
Jenkins
a8aa9d69ec Merge "Update galera running check for CentOS" 2017-02-03 10:33:12 +00:00
Omer Anson
30c73621fa Verify systemd is reloaded after galera post install
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
15.0.0.0rc1
2017-01-31 17:37:02 +02:00
Major Hayden
d898abff4e Update galera running check for CentOS
This patch fixes the galera running checks so that they work
properly on CentOS.

Closes-Bug: 1660445
Change-Id: I7638456239aa23a7e5cd6027d1a399cfdadf4aaa
2017-01-30 15:32:49 -06:00
Jenkins
4d8b80395b Merge "Set the proper amount of open files in systemd" 2017-01-25 09:13:01 +00:00
Jean-Philippe Evrard
79b39d585a Set the proper amount of open files in systemd
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
2017-01-24 18:07:43 +00:00
Adam Reznechek
40c96eaa4b Update xtrabackup version for ppc64le
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
2017-01-24 09:54:11 -06:00
Jenkins
f8881fe986 Merge "Update and clean up run_tests.sh" 2017-01-10 09:47:55 +00:00
Jean-Philippe Evrard
323bfc8a19 Allow fallback to Newton default filename
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
2017-01-09 08:21:55 +00:00
Jenkins
2271abc26e Merge "Remove percona repo if not used" 2017-01-06 21:32:53 +00:00
Jenkins
3f8a30582a Merge "Bring consistency to tags" 2017-01-06 18:20:00 +00:00
Major Hayden
f89ee901c3 Update and clean up run_tests.sh
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>
2017-01-06 16:49:34 +00:00
Jean-Philippe Evrard
2861c4df36 Bring consistency to tags
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
2017-01-06 13:51:06 +00:00
Jean-Philippe Evrard
2aa7f1ca8a Remove percona repo if not used
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>
2017-01-06 12:10:11 +00:00
Jenkins
fc83b28723 Merge "Update xtrabackup version" 2017-01-05 15:01:26 +00:00
Jean-Philippe Evrard
2ec8d8407a Update xtrabackup version
This patch bumps the version of the percona xtrabackup tool, and
ensures that CentOS/ubuntu are running the same version.

Change-Id: I3e82c7be72df67604dbf43a5123a08bdbc1ed8a9
2017-01-04 18:17:12 +00:00
Jean-Philippe Evrard
3d1ecb7aa2 Allow override of the repo filename
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>
2017-01-04 09:17:57 +00:00
Jenkins
fa0cd6aeb3 Merge "Use local facts for ansible_architecture" 2017-01-03 11:16:28 +00:00