aboutsummaryrefslogtreecommitdiff
path: root/docker/mariadb
AgeCommit message (Collapse)AuthorFilesLines
2025-10-14Drop support for building MariaDB clustercheckSeunghun Lee11-550/+0
MariaDB clustercheck script has not been maintained and it will not work with MariaDB 11.4 (the next LTS version). This is because clustercheck.sh uses ``mysql*`` commands but from MariaDB 11.4, those commands are not supported. The health check of MariaDB server containers will be done by new script which comes with change [1]. Without MariaDB clustercheck, MariaDB server becomes only container image in the family, so mariadb-base and mariadb-server dockerfiles are merged. To avoid breaking changes, the name 'mariadb-server' is retained. Follow-up to rename references in Kolla and K-A from 'mariadb-server' to 'mariadb' would be nice. [1] https://review.opendev.org/c/openstack/kolla/+/962657 Change-Id: I01278f76ee82b018a854b5862f3caaa8c78a9a30 Signed-off-by: Seunghun Lee <seunghun@stackhpc.com>
2025-10-06Merge "Add MariaDB healthcheck.sh"Zuul1-0/+6
2025-10-03Add MariaDB healthcheck.shSeunghun Lee1-0/+6
MariaDB clustercheck has not been updated for a long time. Since the script uses ``mysql*`` commands but MariaDB 11.4 (next LTS version) does not support them, it will not work once MariaDB gets upgraded. Added alternative MariaDB container health check script ``healthcheck.sh`` from official MariaDB docker images. [1] This script uses ``mariadb*`` commands, so it's prone to MariaDB upgrade. [1] https://mariadb.com/docs/server/server-management/install-and-upgrade-mariadb/installing-mariadb/binary-packages/automated-mariadb-deployment-and-administration/docker-and-mariadb/using-healthcheck-sh Change-Id: I7816edb6ebd8c95412a6833ea20b32193c2d1415 Signed-off-by: Seunghun Lee <seunghun@stackhpc.com>
2025-10-02Move repo enablement to respective rpm blocksMichal Nasiadka1-2/+4
Currently we are enabling repos irrespective of rpm/deb statement blocks and not failing in the method used if a repository is missing. Downside is - we might be producing one more layer, but it probably is a more logical approach. This is required for adding rpm support in repos.yaml that will also include failing on missing repositories. Change-Id: I5479c5c935760f00fe4cd307366f261deee3199f Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
2025-07-16Move to CentOS Stream 10Michal Nasiadka2-3/+6
Known missing packages: - mod_auth_mellon - missing SAML support in Keystone/Horizon - built in Kolla COPR - glusterfs-fuse in manila-share - built in Kolla COPR - collectd/telegraf - no opstools repository - redis - needs a switch to valkey - python3-ethtool - not required for neutron-mlnx-agent since 6 years [1] Building packages in Kolla COPR is a temporary solution until these show up in EPEL10. [1]: Id2cae3ac9ff049e9fc8225551f99e1e99a87fc65 Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/951751 Change-Id: I7074fabcf95184fcfd2561648ae1e05acfb0bc11 Signed-off-by: Michal Nasiadka <mnasiadka@gmail.com>
2025-05-30[mariadb] Fix incremental backup using correct base dirMichal Arbet2-47/+77
The original script used --incremental-history-name and compressed full backups as gzip streams. This failed because mariabackup expects an actual decompressed base directory for incremental backups. This patch: - Decompresses the latest full backup into a temporary directory - Uses that as --incremental-basedir - Aligns the backup flow with official Mariabackup documentation: https://mariadb.com/kb/en/incremental-backup-and-restore-with-mariabackup/ This makes the incremental process reliable and fully supported. Closes-Bug: #2111620 Change-Id: I562ce5e54752015863a20bf113bce74a69e02331
2024-11-15Add mechanism for patching files in containersMichal Arbet3-0/+8
This patch adds a way to patch files in a Docker image built by Kolla. This is very useful for several reasons, specifically: - Custom modifications - The stable branch of some library has a fix but no pip package has been released - Eliminates the need to package your own pip packages - Eliminates the need to invent your own versioning to prevent upstream versioning - Eliminates the need to manage a pip server - In other words, it eliminates the need to get a wheel into the image and install it manually using any method not previously mentioned It is also highly desirable because, although Kolla can replace the source for a service with a custom URL for a tarball or its own Git repo, it cannot do this for dependencies pulled from pip. I would also like to point out that this is a feature with its own code path and works only if the user "inserts" a patch into the folder patches/docker-image/something.patch and creates an analogous series file for patch source code. Simply said, this code will never interfere with the upstream build process since this feature is not intended for use in upstream. It is rather meant for downstream users who know what they are doing. Now they just have an option to patch their images. Everything works on all layers of the Docker image and stores a report of applied patches which can then be seen in /etc. This mechanism is similar as debian patch quilt. Change-Id: I61d0790c5d4d070b7ea9e8c99c0a76ff5d22bf9d
2024-10-09Add way to backup from MariaDB replica serverMichal Arbet2-1/+139
ProxySQL reports its version to MySQL clients, causing the backup process to fail when ProxySQL is used. This patch adds a new script that handles backups from the replica server directly, without modifying the original backup script. The new script retrieves the server address via the load balancer and connects directly to the replica server to execute the backup. Moreover, this reduces the risk that the backup will be inconsistent or that it will block OpenStack MySQL clients, because they are connected to a different server, and no one is connected to the replica, or that it will overload the load balancer (such as ProxySQL or HAProxy) which listens on the VIP. Closes-Bug: #2080818 Change-Id: Ibf7e40e8b059d733e114963022df06180249c650
2024-01-09mariadb-clustercheck: Add a script handling signalsMichal Nasiadka2-1/+22
Since socat does not rewrite SIGTERM to exit 0 (see [1]) - let's fix it in a different way. [1]: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=809633 Change-Id: If27d93c509496651f8aa5e49a7d63b24eda91a8e
2023-07-26mariadb: Add log for mariadb-upgradeMichal Nasiadka1-1/+1
Change-Id: I7c01ba1127f3f0bbfddf373fa66cd2627e627415
2023-06-26mariadb: Bump to current LTS (10.11)Michal Nasiadka1-1/+2
Depends-On: I2189dafca070accfd8efcd4b8cc4221c6decdc9f Change-Id: I849608a8b90f48912e102ddab395b1a229346c5a
2023-05-30mariadb-clustercheck: ensure /var/log/kolla/mariadb existsMark Goddard2-0/+15
If mariadb-clustercheck starts before mariadb, the directory may not exist, and the command fails. This is necessary for the refactored MariaDB restart in I5a12670d07077d24047aaff57ce8d33ccf7156ff. Change-Id: Ie1b36eb9a403611c2f86aa4c1d500d324e5291f3
2023-05-08mariadb: log bootstrap output to fileMichal Nasiadka1-2/+5
Depends-On: https://review.opendev.org/c/openstack/ansible-collection-kolla/+/882344 Change-Id: Id627edcc2a42643ad3ae6184d972aca760474634
2022-12-01mariadb: update clustercheck branch to match db versionMichal Nasiadka1-1/+1
Change-Id: I99bda6801995727dbeaa07219f336e22c8346ada
2022-09-27Move to CentOS Stream 9Marcin Juszkiewicz1-1/+1
OpenStack 'zed' requires Python 3.8+ so RHEL 8 family has to go. This changeset moves to CentOS Stream 9 while move to RockyLinux 9 is planned as final solution. CI moved to CentOS Stream 9 nodes. Depends-on: https://review.opendev.org/c/openstack/kolla-ansible/+/839715 Change-Id: I113b9984294cf8663d3fc0c8840320e1d40ea731
2022-09-23Merge "centos: we install 'hostname' in base image"Zuul1-1/+0
2022-09-13centos: we install 'hostname' in base imageMarcin Juszkiewicz1-1/+0
There is no need to install it in other images. Change-Id: I9fdb987533662ee532141b06fc23b64c92788429
2022-09-12Add missing labels blocksChristian Berendt1-0/+2
Change-Id: I1396131c3e33e5f139339a203ebfb48841a358d7
2022-07-29mariadb-clustercheck: do not install xinetdMarcin Juszkiewicz1-8/+0
We moved to socat on kolla-ansible side. Change-Id: Icce201677dceaab8ca6f045158bbf565eef3a324
2022-04-21flatten images a bitMarcin Juszkiewicz1-4/+3
As we have one type of images now some RUN calls could be merged so we will have less layers in resulting images. Change-Id: I5178c58fbd8c65efe825dc249c0f1368ef0fe8e0
2022-04-11Adjust permissions on _extend_start files.Tim Shearer1-1/+1
Explicitly set the permissions on the kolla-toolbox kolla_extend_start file. Also, since all extend_start files are sourced rather than executed, the executable bits are now cleared throughout the project. Change-Id: I5c2deb4a2e33575d57c852089f856a9acc6818d0
2022-04-11drop infra_image_prefixMarcin Juszkiewicz3-3/+3
We have one install_type only now so that infra stuff is not needed anymore. Change-Id: I60d50ba7699d46d001eaef365fb84b0ce8e9b262
2022-03-11Unify curl use (customisation options)Maksim Malchuk1-1/+6
This change adds and unifies an ability to override hardcoded URLs for air-gapped environments via the usual blocks mechanism. Also, this change replaces ENV with ARG instruction for the variables used only in building images, and uses bash variable expansion where it possible. This change is a continuation of the I46b77978926fc2b578a68d1aaa944b2198af0685 Change-Id: I1fbad333b1bc95484e6f4c5145d5936a0e2db84f Signed-off-by: Maksim Malchuk <maksim.malchuk@gmail.com>
2021-09-28Move all distros to upstream MariaDB 10.5Radosław Piliszek3-79/+18
Per meeting's agreement [1]. [1] https://meetings.opendev.org/meetings/kolla/2021/kolla.2021-09-22-15.01.log.html#l-71 Change-Id: If24c53b3b89eddfaf2cad39fb9e70cea0f770c96
2021-08-31Move clustercheck script to mariadb-baseMichal Arbet2-16/+6
This patch moves clustercheck script to mariadb-base image, so it can be used for mariadb's docker healthcheck. Change-Id: I4abcbf67a84b7e96f42cd5e1324ff79e47eb1cb5
2021-05-06Merge "Modify healthcheck_mariadb"Zuul1-3/+5
2021-04-26move to Debian 'bullseye'Marcin Juszkiewicz2-0/+71
Bullseye is now in hard freeze cycle and goes for release. https://release.debian.org/bullseye/freeze_policy.html Co-Authored-By: Michal Nasiadka <mnasiadka@gmail.com> Change-Id: I543965a2741cebfa759576a4c75669a7bacd4208
2021-04-26Modify healthcheck_mariadbLinPeiWen1-3/+5
Use the healthcheck_mariadb script to check the status of mariadb Related patch of kolla-ansible: https://review.opendev.org/c/openstack/kolla-ansible/+/780404 Change-Id: I9e8fb8fab1adba03aba4ed9ce42e4d4666bc764b
2021-04-12Remove mariadb imageMichał Nasiadka6-271/+0
It has been deprecated in [1]. [1]: https://review.opendev.org/c/openstack/kolla/+/752430 Change-Id: Iee69d8480960562a3d19752661c0556db65ade45
2020-12-17Merge "mariadb: Fixes incremental backup failure when full not created today"Zuul2-6/+22
2020-12-12Merge "Remove footer block from intermediate images"Zuul1-1/+0
2020-12-02Unify curl optionsMichał Nasiadka1-1/+1
Currently we use couple of curl options throughout Dockerfiles, this change adds all common options to curlrc (-sSLf) and removes usage of those in Dockerfiles. Change-Id: I46b77978926fc2b578a68d1aaa944b2198af0685
2020-11-20Remove footer block from intermediate imagesMark Goddard1-1/+0
Only the final image in a hierarchy should have the footer block. neutron-infoblox-ipam-agent image still has two footers because it inherits from the neutron-server image. We set the user to root at the beginning of that Dockerfile, so that headers and footers have the right context. Change-Id: I95e5bb5583be2a76e289749e8adfc303a4e7197a
2020-10-23mariadb: Fixes incremental backup failure when full not created todayabraden2-6/+22
backup_full() saves the history name in $BACKUP_DIR/last_full_date. backup_incremental() attempts to read from $BACKUP_DIR/last_full_date into $LAST_FULL_DATE. After the read attempt; if $LAST_FULL_DATE is zero length then $(date +%d-%m-%Y) is used. Change-Id: I4172b814d5d95ae3debbc1cf3feaeee2e2bec9bd Closes-bug: 1897948
2020-07-09introduce 'infra_image_prefix' for infra imagesMarcin Juszkiewicz4-4/+4
Defaults to 'image_prefix' for now but shows which images gets their names changed soon. Change-Id: I0608e8f62f28d6667b4c8753c47553e4cbf75503
2020-04-22Add mariadb_clustercheck imageMichal Nasiadka14-0/+317
Add mariadb_clustercheck image with xinetd and clustercheck binary for haproxy checking of galera status. Reorganise existing mariadb images by creating mariadb-base and mariadb-server. Existing mariadb image will be deprecated (in a separate change). Change-Id: Ib601f64e1514521154beeaac40f0c058a7119408
2020-03-01Add block labels to all DockerfilesChristian Berendt1-0/+2
Change-Id: I9692dda817ef134d647247431565e1b58cf9da41
2020-02-26Actually disable EPEL, and epel-modularMark Goddard1-1/+2
The disable_extra_repos macro accepts a list as its only argument. We were calling it like this to disable EPEL: disable_extra_repos('epel') The macro interpreted this as a request to disable three repos, e, p, l. Thanks Python! Type validation to be improved separately. Additionally, on CentOS 8 the EPEL repository was not included in the repository mapping file, repos.yaml. There is also another EPEL repository on CentOS 8, epel-modular, which is enabled by default after installing epel-release. This change adds mappings for epel and epel-modular repos to repos.yaml, and fixes the disabling of epel in the base image, as well as disabling epel-modular. There are some cases where EPEL is still used (it seemed a bit too easy...), and the repository has been enabled for these images: * bifrost-base (nginx) * ironic-conductor (C7 only, shellinabox) * freezer-base (C7 only, trickle) * gnocchi-base (C8 binary only, python3-boto3) * mariadb (pv) * mongodb (C7 only, mongodb) * nova-spicehtml5proxy (C7 only, spice-html5) * telegraf (C7 only, python2-pip) A few other things were changed: * ironic-conductor does not require the ceph repo * python3-pika is no longer installed in the openstack-base image Related: blueprint remove-epel Change-Id: I3761825239dfc462072383cde6276c4fb3e1bf12
2019-12-09Build images with healthcheck scripts for core servicesMichal Nasiadka2-0/+26
blueprint container-health-check Now docker supports healthcheck directive[0] in Dockerfile, which is helpful for checking container aliveness. Base for this patch were healthcheck scripts from tripleo[1]. [0] https://docs.docker.com/engine/reference/builder/#healthcheck [1] https://github.com/openstack/tripleo-common/tree/master/healthcheck Change-Id: Ifc32713cd4d6b45c74855c0ebf5bb65784701d44
2019-11-29Enable repos only when neededMarcin Juszkiewicz1-0/+2
Disable external repositories by default and enable only when needed. Depends-on: https://review.opendev.org/696480 Implements: blueprint repos-off-by-default Change-Id: Icf2a8397a8349e0fe849d88d160409fd234480a9
2019-10-25Set pipefail in kolla_mariadb_backup.shMark Goddard1-0/+1
Without this, a failure in mariabackup would be ignored due to the pipe to gzip. Change-Id: I84536b302991e8fb04d5fa67ea266bc428437ce1 Related-Bug: #1843043
2019-10-23Fix mariabackup argumentsMark Goddard1-11/+10
After switching from innobackupex to mariabackup [1] for database backups, the kolla_mariadb_backup.sh script was not modified to account for the difference in arguments between innobackupex and mariabackup. There is a compatibility mode, the documentation [2] for which covers some of the differences. The following have been changed: - Add explicit --backup argument, now required - Remove './' positional argument - not required with --stream - Remove --no-timestamp argument - only supported in innobackupex compatibility mode - Remove --incremental argument - implied by --incremental-history-name - Remove deprecated --compress argument, which requires qpress to be installed (it is not). The stream is now passed through gzip instead [3] [1] https://mariadb.com/kb/en/library/mariabackup-overview/ [2] https://mariadb.com/kb/en/library/mariabackup-options/#-innobackupex [3] https://mariadb.com/kb/en/library/using-encryption-and-compression-tools-with-mariabackup/ Change-Id: I67cff47cbf56570b8eaeb66092dd87c2769fc8a6 Closes-Bug: #1843043
2019-09-12Drop Percona XtraBackup in favour of MariaDB BackupMarcin Juszkiewicz2-12/+55
XtraBackup started failing to install on Ubuntu and does not support MariaDB 10.3 version. Related-Bug: #1843043 Change-Id: I9cf62c8e03a02574d85e5349df1d23a51d4c99be
2019-08-31Move to MariaDB upstream repo and new version (10.3) on UbuntuMichal Nasiadka1-1/+2
MariaDB in Ubuntu packages is backlevel (10.1). Devstack gates are tested on MySQL 5.7 which is not compatible with MariaDB 10.1. Neutron recently introduced a db migration that breaks on MariaDB 10.1, but works on MariaDB 10.3 [0]. Bumping up version to 10.3 on Ubuntu to match CentOS (RDO) version. [0]: https://review.opendev.org/#/c/677221/ Closes-Bug: #1841907 Change-Id: I16e4c40208912691e3015bfe2065ea0ce2358edb
2019-08-08Support customising MariaDB log directoryDoug Szumski1-4/+6
This retains the default, but allows the directory to be customised if required. This is useful, for example, when using Kolla Ansible to deploy multiple instances of MariaDB. Partially Implements: blueprint support-nova-cells Change-Id: I042fbe140ee84f2ed72e27635be247cb145aac5f
2019-04-03Add config option use_dumb_init to add it to container imagesRabi Mishra1-1/+4
Usage of dumb-init can also be disabled from cli with `--nouse-dumb-init` when building images. Also moves ENTRYPOINT outside of dumb_init_installation block. Change-Id: Id32d54fc9913b83cf121ede5a5e265e0772062ae Related-Bug: #1821970
2019-03-23MariaDB upgrade: specify host and portMark Goddard1-1/+1
While mysql_upgrade seems to work on CentOS images without specifying a host and port, it fails on Ubuntu without these. Change-Id: Ie140de57c4fe2f2e4db6a90c18e3535d9cc71ff2 Related-Bug: #1820325
2019-03-18Fix MariaDB 10.3 upgradeMark Goddard2-1/+26
There are a couple of issues with the mariadb image currently. 1. it doesn't include mysql_upgrade on CentOS/RHEL. It is necessary to run this after an upgrade of MariaDB. This is fixed by installing mariadb-server-utils. 2. it inherits the standard dumb-init entrypoint from the base image, which includes a --single-child argument. That causes signals to be forwarded only to the process executed by dumb-init, which in the case of kolla-ansible is mysqld_safe, however mysqld_safe ignores SIGTERM. After a timeout, Docker then forcibly kills the container. Executing dumb-init without --single-child ensures the TERM signal is sent to mysqld, allowing it to shutdown gracefully. Change-Id: I1a450736721863b91be1ea3d3c8948990de9fdeb Closes-Bug: #1820325
2019-01-17Use base_package_typeAlex Schultz1-3/+3
This change updates the docker files to use base_package_type instead of doing specific distro checks for the rhel/deb generic cases. The base_distro is still available and is used when a specific distro needs a customization but if the differences are purely rpm vs deb, then the base_package_type can be used. Change-Id: I8d720bb185df65a0178061ccf20b1ab2265da2c5
2018-12-11Required changes for mariadb 10.3Eduardo Gonzalez1-2/+2
Mysql-python is a deprecated package and fails to build currently. Make use of mysqlclient as is a fork of mysql-python with many bug fixes a python3 support. percona xtrabackup doenst work with mariadb 10.3, replaces to use mariadb-backup tool. https://jira.mariadb.org/browse/MDEV-15774 Change-Id: Icefe3a77fb12d57c869521000d458e3f58435374