Commit Graph

74 Commits

Author SHA1 Message Date
Jimmy McCrory 3f02976760 Additional TLS configuration options
Add variables `galera_require_secure_transport` and `galera_tls_version`
for requiring encrypted connections to the server and providing the list
of permitted protocols of those connections when `galera_use_ssl` is
enabled.

Change-Id: I28c548a5ee778c4957dc73e3547d585344755c0f
Depends-On: I6b77c828d251aeee53b83404e7e3131e3f61cbb1
Depends-On: I23d839e75b202d0400aeefe6e98c429e16ecd37e
2024-03-11 11:02:48 -07:00
David Hitze 3e2afc1e4e Added vars to override systemd for mariabackup
Added variables ``galera_backups_full_init_overrides`` and
``galera_backups_increment_init_overrides`` that can be leveraged to
override default set of systemd unit file for mariadb backups.

Change-Id: Ib15c60dc577b376b1f761c4266eea89c4cb0be9f
2023-09-11 15:34:38 +02:00
Simon Hensel 60009ed7ce Add optional compression to mariabackup
As database backups can grow substantially in size, compressing backups
helps to preserve disk space.
While the mariabackup utility offers no compression by itself, we can
stream the backup into a compression tool to create an archive [1].
The xtrabackup_checkpoints file, which contains metadata on a backup,
gets stored alongside the archive, allowing to create incremental
backups from non-compressed backups and vice-versa [2].
One thing to note, is that compressed backups cannot be prepared in
advance, this step must be manually carried out by the user.
Backup compression is disabled by default and different compressors
can be chosen (zstd, xz, ...), with gzip being the default.

[1] https://mariadb.com/kb/en/using-encryption-and-compression-tools-with-mariabackup/
[2] https://mariadb.com/kb/en/incremental-backup-and-restore-with-mariabackup/#combining-with-stream-output

Change-Id: I28c6a0e0b41d4d29c3e79e601de45ea373dee4fb
Signed-off-by: Simon Hensel <simon.hensel@inovex.de>
2023-06-20 15:34:39 +02:00
OpenStack Release Bot 0c902dae98 Update master for stable/zed
Add file to the reno documentation build to show release notes for
stable/zed.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/zed.

Sem-Ver: feature
Change-Id: Id775e9c34da18cf370b61e19f4966a31bcdbc8f4
2022-12-13 13:07:49 +00:00
Andrew Bonney 5200b50cf6 Add the ability to specify custom additional galera users
This provides the capability to add and remove additional users
in the Galera database which may be used by external resource
monitoring systems (for example).

The Ansible mysql 'resource_limits' variable is also exposed to
enable setting connection limits against individual users.

Change-Id: Idcc9251340215baf5e6f550a9ca844c8c097d353
2022-09-12 13:24:37 +01:00
Christian Rohmann ae0e53a9be Allow setting of RandomizedDelaySec for backup systemd timers
By allowing for a random delay for the OnCalendar timers it's possible
to run backups on multiple nodes without having them happen at the exact
same time. By omitting the option by default the current behavior remains
unchanged.

Change-Id: I005cf8ba94ab043d7075039975d5f0bc250f9187
2022-09-01 13:06:54 +02:00
Dmitriy Rabotyagov 5884ee918e Add galera_data_dir variable
Control mysql datadir with variable. Decrease code dublication since path
is heavily used in different places. If path needs to be changed
overriding config won't be enough.

Change-Id: I6fcefe216236ffea60da5fee42aad47c6f7da133
2022-04-12 11:27:03 +00:00
Dmitriy Rabotyagov ebc0417919 Use separate tmp directory
During upgrades or cluster repairments, temporary directories are created
inside /var/lib/mysql and treated as databases. This results in errors
during mysqlcheck like:

`Got error: 1102: Incorrect database name '#mysql50#tmp.stLr46FBlt'`

Path outside of datadir is not choosen since it could be separate mount
point and it's important for replication
to survive reboots.

Change-Id: Ia110dd9ed09b04f6bb7a0a3adf5a808966558507
2022-04-11 15:24:29 +00:00
Zuul ff5ef389a4 Merge "Convert xinetd clustercheck to systemd socket service" 2022-02-09 00:44:07 +00:00
Jonathan Rosser 41553dfa7a Convert xinetd clustercheck to systemd socket service
Depends-On: https://review.opendev.org/c/openstack/ansible-role-systemd_service/+/826602
Change-Id: I76e7498b1676a2b4c550fda049f332aa209ce53d
2022-02-01 08:27:12 +00:00
Andrew Bonney da6bdafd65 Listen on an additional port for monitoring/diagnostic purposes
If the Galera cluster hits its configured max_connections value
then only the super-users can still connect for debug purposes.
As the monitoring user cannot connect, this can cause a cascading
failure as HAProxy marks the instance as unreachable.

This configuration adds an extra listening port with a limited
number of connections to allow the monitoring user to connect at
all times.

Change-Id: I57187bab2ee35521c275f0f0b99c1ca8fd1830ad
2022-01-31 10:01:58 +00:00
Damian Dabrowski b79574382b Inherit default galera_wait_timeout value from openstack_db_connection_recycle_time
Set a new default value for ``galera_wait_timeout`` which is inherited from global ``openstack_db_connection_recycle_time``.

These variables are directly related, it would cause errors when ``galera_wait_timeout`` is lower than ``openstack_db_connection_recycle_time``.
From the other hand, I don't see any reason for ``galera_wait_timeout`` to be higher than ``openstack_db_connection_recycle_time`` in most cases.

Change-Id: I9450912ec7960a8ab713517532164cab52628b30
2021-12-02 12:15:06 +01:00
Dmitriy Rabotyagov 6bc6929d09 Use ansible-role-pki to generate SSL certificates
Supports two scenarios:

1) variables defined in defaults/main.yml are sufficient to create
a root/intermediate CA certificate for mariadb when this role
is used outside openstack-ansible.

2) when:

openstack_pki_dir
openstack_pki_setup_host
openstack_pki_authorities
openstack_pki_service_intermediate_cert_name

are defined, an external CA already created on the deploy host
with a previous run of ansible-role-pki will be used as the CA.

Server certificates for the galera instances are created from the
data in galera_pki_certificates in both situations

Depends-On: https://review.opendev.org/c/openstack/ansible-role-pki/+/807771
Change-Id: I72738e4f8bd2233dedbed4428baafd4436de84b5
2021-09-09 15:21:38 +00:00
Dmitriy Rabotyagov 818c5a71b0 Replace systemd unit overrides with role
Instead of placing bunch of templates, we can use our systemd_role
that is capable of placing just overrides file, that will have same
functionality but also provide ability to easily add required data into
systemd overrides.

Change-Id: I7b3b0f4da047f82a49266ef57fba2fbaa24cebdc
2021-06-16 15:40:29 +03:00
Dmitriy Rabotyagov 3f61ca7cdb Revert "Update mariadb version to 10.5.10"
This reverts commit 973402f179.

Reason for revert: We suspect that 10.5.10 release of mariadb brings
in intermiment error that raises during cinder migration.

This way we also align with the mariadb version available for bullseye

Change-Id: I36192deb77bea3a4ade35b1741aa9386ac8a4d01
2021-05-14 04:15:30 +00:00
Jonathan Rosser 973402f179 Update mariadb version to 10.5.10
This release includes the fix for MDEV-25030 [1] which means the
workaround for this bug can be reverted.

[1] https://jira.mariadb.org/browse/MDEV-25030
[2] Id28057c9b9043c9ef609f4ed6f40a8a21a2e6a8e

Change-Id: Ie9963a9a5dc3424b9eddcbbe3061b4de87750554
2021-05-11 14:44:39 +01:00
Zuul 99a5559f60 Merge "Bump MariaDB version to 10.5.9" 2021-04-21 10:58:41 +00:00
Sebastian Gumprich e91c8be449 add support for encryption
Closes-Bug: #1921861

Change-Id: I73e548ac208a96ddaa687a1b5fbb22cac20037d0
2021-04-20 06:42:28 +00:00
Jonathan Rosser 1db0ef2efb Bump MariaDB version to 10.5.9
We also workaround known mariadb bug which make upgrades from previous
version to fail because of changing privileges bits which ends up
in revoking some of the privileges from superusers.

Depends-On: https://review.opendev.org/775684
Depends-On: https://review.opendev.org/781305
Change-Id: Id28057c9b9043c9ef609f4ed6f40a8a21a2e6a8e
2021-04-19 14:35:25 +00:00
Andreas Jaeger bb691a505d Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: Iebfa30b3545bab9eb568ac30f9296ba51b4ba6c8
2020-06-03 18:23:49 +02:00
OpenStack Release Bot 70881b6325 Update master for stable/ussuri
Add file to the reno documentation build to show release notes for
stable/ussuri.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/ussuri.

Change-Id: Icf87f3b888199e230330e6cadee02b3e93cb1105
Sem-Ver: feature
2020-06-01 13:09:18 +00:00
Zuul 05701ba83d Merge "Combine galera client role into galera_server" 2020-05-25 21:27:47 +00:00
Jonathan Rosser 49b95ebcb7 Combine galera client role into galera_server
Depends-On: https://review.opendev.org/725902
Depends-On: https://review.opendev.org/728434
Change-Id: I02dc06d61006bb71a417a1470343e9c9c77d7935
2020-05-22 15:13:20 +03:00
Andreas Jaeger 9754e55f25 Update docstheme for style
New version of openstackdocstheme (Victoria+) respects pygments_style.
Since this repo is using now Victoria (master) requirements but has
not branched for Ussuri yet, it uses the new version.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

Change-Id: I16d112e26aa9df9607f54dec9cf3b2219d67e44c
2020-05-20 18:44:37 +02:00
Andreas Jaeger c33db01ecf Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Remove obsolete sections from setup.cfg
- Cleanup */source/conf.py to remove now obsolete content.
- remove install_cmd, move constraints into deps,
  small cleanup of tox.ini

Change-Id: Ib88cbadb622163d41428b153739679cbba7c336d
2020-04-27 18:13:49 +02:00
Dmitriy Rabotyagov 232976de42 Replace git.openstack.org with opendev.org
This patch replaces git.openstack.org with opendev.org as redirection
from old path was enabled.

Change-Id: I865ba354604d256d3f9f18c11a94c69992f5dae8
2019-11-14 14:02:45 +02:00
OpenStack Release Bot 52813695f6 Update master for stable/train
Add file to the reno documentation build to show release notes for
stable/train.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/train.

Change-Id: I2e63f826f27f6ec9fbefeccf9f37dc55de532609
Sem-Ver: feature
2019-10-22 18:53:53 +00:00
OpenStack Release Bot 8de6d5c85f Update master for stable/stein
Add file to the reno documentation build to show release notes for
stable/stein.

Use pbr instruction to increment the minor version number
automatically so that master versions are higher than the versions on
stable/stein.

Change-Id: Ie7ebbee86ec526ab4fb16293e48e7dd1c0328e61
Sem-Ver: feature
2019-04-08 09:14:49 +00:00
Jesse Pretorius 556a8ac726 Update mariabackup-related release notes
Release notes are aggregated from the roles into the integrated repo,
so they should be written to include the context of which role the
change was implemented, otherwise they make little sense. More info
about this is in https://docs.openstack.org/openstack-ansible/latest/contributor/code-rules.html#release-notes

Also, the changes made in I59a0e225205be43b5bfc76c4bc3381b6e9c54cfd
included some variable removals, so we should communicate it to allow
operators to remove any related overrides.

Change-Id: Ie8d41ad00ede510324e13b42a11fe39bbc129b93
2019-03-20 05:38:11 +00:00
Mohammed Naser 94640cd215 Bump version and use mariabackup
We're currently deploying 10.2.17 which is quite old and we seem
to be having issues in the gate with some database sync's causing
MariaDB to crash, as well as personal experience with similar
crashes around Cinder database syncs

In addition, this change implements the usage of mariabackup for
SST transfers which eliminates the need for the Percona repos.

The compression is no longer recommended by upstream now, therefore,
we remove it.

Change-Id: I59a0e225205be43b5bfc76c4bc3381b6e9c54cfd
2019-03-19 17:12:15 -04:00
Kevin Carter b78e58b1d7
Allow mysqlcheck to be enabled/disabled and tuned
The mysqlcheck allows deployers the ability to perform a cluster health
check from anywhere using simple http requests on a specific port. This
change makes it possible for deployers to enable or disable this check
capability. This also allows deployers to change the port used for the
mysqlcheck running within xinetd.

New options:
 + galera_monitoring_check_enabled - bool
 + galera_monitoring_check_port - int

The new options retains the hard-coded values as defaults, it will be
enabled and run on port 9200.

Change-Id: Ic966fbe5dfb39a35ecd10ece2901bb317c905c84
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2019-01-25 22:25:14 -06:00
Jesse Pretorius c2b73bff52 Normalise in-repo GPG key implementation
To ensure that we have a consistent implementation
between the galera_client and galera_server roles,
we change the galera_server role to match galera_client
as was done in I520ccbadf3320b0d07fc83e3dbec9ea2bd16ec83

This updates it to a mechanism which will be easier to
maintain.

Change-Id: I7ac1a5e3a05aa3d0b4fae86c4a325ef147a9a528
2018-12-18 12:41:15 +00:00
Markos Chandras be75dd0604 defaults: Bump mariadb to 10.2 release branch
mariadb 10.2 was first released in April 2016 and OpenStack services
should be ready to use it by now, so lets switch to 10.2. For mariadb
10.2 we need to use xtrabackup-24. This version is not available in Leap
42.3 so we add an extra OBS repository for it.

Change-Id: I5f1aaf1f8608ad085acfebc8458910391f280193
2018-09-12 12:11:33 +01:00
OpenStack Release Bot 2d4821498b Update reno for stable/rocky
Change-Id: I08bc6a4853ce5b1bcd538b15a846a9a4a86dad11
2018-08-10 16:44:46 +00:00
Jesse Pretorius 1075fe411a Restore support for percona packages when using ppc64le
In https://review.openstack.org/535252 the installation
process for the role was simplified, but an unintentional
side-effect was to removed the previously included support
for installing the extra percona packages when installing
on the ppc64le platform.

This patch re-introduces that ability, but scopes it to
only execute on that hardware platform, and only for Ubuntu.

The download is, by default, facilitated through the deploy
node (rather than the target nodes) so that the download
is done once, then pushed to the targets. This can be
adjusted with the right parameters to download from the
targets instead.

Also, in https://review.openstack.org/543888 adjustments
were made to disable compression/qpress on architectures
other than x86_64, and to fail the role execution if it
was enabled on any other architecture. This has been
corrected to ensure that compression is enabled by default
for ppc64le on Ubuntu, and enabled by default for x86_64,
but disabled by default for all other combinations. The
fail task is adjusted appropriately and moved to the main
task file so that it executes and fails out before any
changes are made.

Change-Id: I850a37b465a427a827e357111942973457fafa0d
2018-02-23 16:48:15 +00:00
OpenStack Release Bot bff68d656c Update reno for stable/queens
Change-Id: I57466c0fe2595ccb6000f5f52bd5ce56bf47385b
2018-02-14 15:45:07 +00:00
Markos Chandras f047cae496 vars: Drop galera_percona_xtrabackup_repo_url variable
This variable was only used on Ubuntu distributions to select the
upstream Percona repository. There is not much point in having this
configurable so simply hardcode the upstream url to the repository
information and drop the variable.

Change-Id: I12088bd52ab3c392913385001fb71555e101ef56
2018-01-19 09:31:42 +00:00
Jean-Philippe Evrard 7b92a07fb4 Fix galera_monitoring_allowed_source
Currently the integrated build fails with the existing value
of galera_monitoring_allowed_source.

This can be simplified while still staying secure by default
by giving no access to the xinetd service, unless explicitly
defined.

The xinetd whitelist can accept hostnames, so we document this
feature in defaults, and simplify the role.

Change-Id: Ibb2c5b90c79899036e5bcf9717a3b51cf5ec6b70
2017-11-29 13:50:19 +00:00
Kevin Carter 94821f8108 Implement a proper WSREP check for galera
The galera cluster rely on WSREP for cluster consistency. While the
default MySQL monitor will allow us to know when the database node is
minimally functional it does not provide the ability to query the node
state allowing loadbalancers, operators, and deployers to know a node
is healthy prior to being allowed to accept connections. This change
implements the checkcluster script as provided by the fine folks at
Percona. The implementation of this check follows the guild-lines noted
here [0]. With this in-place, we'll be able to convert our haproxy check
for the galera cluster nodes to use an HTTP check on port 9200 instead
of the default MySQL login which will provide for a more robust and
fault tolerant cluster.

[0] https://www.percona.com/doc/percona-xtradb-cluster/LATEST/howtos/virt_sandbox.html
Closes-Bug: #1665667

Change-Id: Ie1b3b9724dd33de1d90634166e585ecceb1f4c96
Signed-off-by: Kevin Carter <kevin.carter@rackspace.com>
2017-11-29 01:52:15 +00:00
Andreas Jaeger e9d7ab177e Remove setting of version/release from releasenotes
Release notes are version independent, so remove version/release
values. We've found that projects now require the service package
to be installed in order to build release notes, and this is entirely
due to the current convention of pulling in the version information.

Release notes should not need installation in order to build, so this
unnecessary version setting needs to be removed.

This is needed for new release notes publishing, see
I56909152975f731a9d2c21b2825b972195e48ee8 and the discussion starting
at
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124480.html
.

Change-Id: I3b1d5da600d829759aba003b74e29c140e9e7239
2017-11-17 07:42:52 +01:00
Jean-Philippe Evrard e8b4875e40 Initial OSA zuul v3 role jobs
This patch implements an initial set of jobs intended to match
the current job execution method. It does not intend to improve
how the jobs are executed - only to replicate what is currently
in openstack-infra/openstack-zuul-jobs and provide the platform
to iterate on.

Change-Id: I1911542e61df7bed475eac199669773ae4e1a205
2017-10-17 19:29:16 +01:00
OpenStack Release Bot 62cd6fb5cd Update reno for stable/pike
Change-Id: I34975a043bda4d3012715a3e4f5ae249db9d7dcd
2017-08-21 10:27:45 +01:00
ZhongShengping 37645e5fce Fix openstackdocstheme settings
To use openstackdocstheme 1.11.0 properly, this patch fixes
some settings according to follow[0].

[0]https://docs.openstack.org/openstackdocstheme/latest/

Change-Id: Ifb0cb2eed9ca1b5a993a87c877f5082874daca78
2017-07-03 16:07:56 +08:00
Miguel Alex Cantu 34f52a673e Add ignore_none_type to config_template
The .cnf files can have valueless options present.
This commit ensures that these valueless options are not ignored

Addtionally, my.cnf overrides are added to the variable overrides
test file to ensure that the my.cnf file can run through the
config_template engine properly.

Change-Id: I8b09c2520c84bb43353b4c56bac157259f71b041
Closes-Bug: #1693234
2017-06-27 16:19:23 +00:00
ZhongShengping d4a2f20720 Switch from oslosphinx to openstackdocstheme
As part of the docs migration work[0] for Pike we need to switch to use the
openstackdocstheme.

[0]https://review.openstack.org/#/c/472275/

Change-Id: I893d88a9e65f8675a7983f3accfdfde45a1982f5
2017-06-26 14:31:35 +08: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
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
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
OpenStack Release Bot 931b35897d Update reno for stable/ocata
Change-Id: If77793bb2fc8ed74d18c0b9b857195f8369e7b15
2017-02-03 18:57:29 +00:00