summaryrefslogtreecommitdiff
path: root/docker/mariadb
AgeCommit message (Collapse)AuthorFilesLines
2020-03-18mariadb: install mariabackup on DebianMarcin Juszkiewicz1-0/+1
On AArch64 systems we are unable to deploy Stein due to lack of mariabackup command. Change-Id: I00b8c945470a0f63f23f2d0da74eed3189f5d9e5 Closes-bug: #1867750
2019-11-05Stein: support mariabackup for backupsMarcin Juszkiewicz2-0/+51
This is a combination of 3 commits from Train. Rather than dropping xtrabackup, we are keeping it in addition to adding support for backups using mariabackup. 1. Drop Percona XtraBackup in favour of MariaDB Backup XtraBackup started failing to install on Ubuntu and does not support MariaDB 10.3 version. Related-Bug: #1843043 I9cf62c8e03a02574d85e5349df1d23a51d4c99be 2. Fix mariabackup arguments 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/ I67cff47cbf56570b8eaeb66092dd87c2769fc8a6 Closes-Bug: #1843043 (cherry picked from commit 65b27d772be32738a8508ea8e6c07f74f229cdb7) 3. Set pipefail in kolla_mariadb_backup.sh Without this, a failure in mariabackup would be ignored due to the pipe to gzip. I84536b302991e8fb04d5fa67ea266bc428437ce1 Related-Bug: #1843043 Change-Id: Idf1aed905a7d9ad461dd6fe17ed199c8d60370e6
2019-04-13Add 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 (cherry picked from commit fb4cb9efda5a522ba0d837047385b61275d09150)
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
2018-10-24mariadb: make security_reset.expect's timeout configurableDamien Ciabrini1-1/+1
Under heavy load, when the security_reset script is being run to set up root password, it might happen that the mysql server doesn't get a change to evaluate the SQL statement sent by security_reset.expect before the hardcoded 10 seconds timeout is reached. Allow the timeout to be overriden via env variable DB_MAX_TIMEOUT, which is already used as a timeout variable in extend_start.sh Change-Id: If82c6daca82a48d899605829dc99cf4a352cddcd Closes-Bug: #1775864
2018-05-26Bump Ubuntu base image to 18.04Jeffrey Zhang1-11/+4
Ubuntu 18.04 has been released. We need upgrade to it this cycle. Changes made in this patch - Bump ubuntu repo from xenial to bionic. Some repos do not have bionic packages, so still using xenial repos. - Drop mariadb, percona and nfs-ganesha repo, because these packages are already provided by Ubuntu official repo. - Since qdrouterd does not have bionic repo and xenial packages does not work on Ubuntu bionic, just add it into ignore image list. - Use python-rtslib-fb and targetcli-fb rather than python-rtslib and targetcli - use xen-utils package name rather than with package version one. - Seems unsigned repo won't work on Ubuntu bionic, stop using infra mirrored unsigned repo in gate building job. Needed-By: https://review.openstack.org/568728 Implement blueprint: ubuntu-bionic Change-Id: I4e3b0ca669cfbf6316bf591f2d8428fa1a0d6182
2018-02-26mariadb: create /var/run/mysqld under Debian distrosMarcin Juszkiewicz1-3/+0
Change-Id: I4fdab197e18b25f6af7275da6ecbdb9c516ba0a5
2018-02-14Add socat to base imageMartin Mágr1-3/+1
We would need socat tool to perform healthchecks on the various containers. Closes-Bug: #1749227 Change-Id: Ibda77a8d041d894f5efac6578e52b11651bca97f
2018-01-23Merge "Consume RDO packaged mariadb version"Zuul1-15/+2
2018-01-22Add --wsrep-new-cluster option back in the bootstrap_db functionJeffrey Zhang1-1/+1
Ia2acb09e877a586243fc1acb49d8d140cf27d7b5 removed the "--wsrep-new-cluster" option and left "--wsrep-on=OFF". But it seems "--wsrep-on=OFF" won't work with mariadb 10.0. and In Ubuntu, we are still using mariadb 10.0. Try to add --wsrep-new-cluster back Change-Id: I4d382d1b9c83def62dc85a773580c8c6b2500f68
2018-01-21Consume RDO packaged mariadb versionSteven Dake1-15/+2
RDO packaged mariadb recieves far more testing and qualification than any other mariadb package on CentOS. Lets use that instead of a hard-pinned old version of mariadb from mariadb.org. This patch also upgrade MariaDB from 10.0 to 10.1.20 for RHEL/CentOS/Oracle Linux. Depends-On: I8374ac2219ad7880970cd789727d01af7cac1077 Depends-On: Ia2acb09e877a586243fc1acb49d8d140cf27d7b5 Co-Authored-By: Xinliang Liu <xinliang.liu@linaro.org> Change-Id: I071362fc1b8d60199a77e2fe0475d2b4c3b5341b
2018-01-04Fix MariaDB bootstrap for 10.1 versionXinliang Liu1-16/+2
Option "wsrep_on" behaves differently between 10.0 and 10.1 [1]: "Before MariaDB 10.1, even though this variable is ON by default, its value get automatically adjusted based on whether mandatory configurations to turn on Galera replication have been specified. Since MariaDB 10.1, it is set to OFF by default and must be turned on to enable Galera replication." So on MariaDB 10.0 although wsrep_on set to OFF, its value will automatically adjusted to ON because wsrep mandatory configurations are set. Whereas on MariaDB 10.1, it will failed at galera provider 'wsrep_ready' checking because wsrep_on is set to OFF. We can set wsrep_on to ON to handle both 10.0 and 10.1. But, the point is that the cluster bits, which are creating a cluster and wsrep_ready checking, are no need at bootstrap stage. At bootstrap stage it mainly do two things: Creating required system DBs (by mysql_install_db) and securing the mariadb (by bootstrap_db). After the bootstrap stage, it will create a cluster when starting the first node. [1] https://mariadb.com/kb/en/library/galera-cluster-status-variables/#wsrep_ready Partial-Bug: 1740060 Co-Authored-By: Steven Dake <stdake@cisco.com> Change-Id: Ia2acb09e877a586243fc1acb49d8d140cf27d7b5
2017-12-05Creates directory /var/run/mysqld on aarch64 when building MariaDB docker imageKevin Zhao1-0/+7
Closes-bug: #1733262 Change-Id: I2d0a3422ba6a077a309c1fe967a2a62ef5ce6a36 Signed-off-by: Kevin Zhao <kevin.zhao@arm.com>
2017-07-16Fixing mariadb bootstrap failure in kolla-kubernetesSerguei Bezverkhi1-1/+1
With latest master, mariadb is failing to bootstrap in kolla-kubernetes cluster. The issue is with the name of mysql pid file. When it is not forced in the command line, in kolla kubernetes it gets created in the form of mariadb-init-element-xqg4b.pid where mariadb-init-element-xqg3b is pod name, but bootstrap scripts explicitely checks for mysql.pid. Change-Id: Ic0ee577d73d196ef40354efa51ca3ba60bf4e125 Closes-Bug: #1704671
2017-05-26Remove sudo operations that are no longer necessarySteven Dake2-6/+1
set_configs.py has logic to handle chown of directories. Simplify the codebase by removing these unnessary chowns. Further the chowns cause some forms of NFS backed storage to not work properly. Change-Id: I8df95d06b1010778deb3e2a3065aaab26ed2eb6a Closes-Bug: #1693973
2017-05-10Merge "handle mariadb for aarch64/ubuntu/source"Jenkins1-4/+11
2017-05-04handle mariadb for aarch64/ubuntu/sourceMarcin Juszkiewicz1-4/+11
Ubuntu builds use external MariaDB repository on x86-64 and ppc64le. But that repo does not provide packages for AArch64 so I use mariadb/mysql packages from distribution instead. Partially-Implements: blueprint multiarch-and-arm64-containers Change-Id: Ia3c3d3858082613718626670f9ff11b69d913c40
2017-05-03Override image's meta info.Jawon Choo1-1/+1
centos based images have wrong label info, these changes fix own image's name and build-date. Change-Id: I1d13f8f386c8db12b5fbe5f8ecbbf9e3fbb4ba1c Closes-Bug: #1680341
2017-04-24Merge "mariadb: handle lack of external repos on non x86"Jenkins1-2/+16
2017-04-20Merge "Use LABEL instead of MAINTAINER (deprecated) in all Dockerfile.j2"Jenkins1-1/+1
2017-04-20Use LABEL instead of MAINTAINER (deprecated) in all Dockerfile.j2Chen1-1/+1
Use LABEL instruction instead of MAINTAINER (deprecated) instruc- tion as suggested by Docker's official dockerfile guide. docs.docker.com/engine/reference/builder/#maintainer-deprecated Closes-Bug: #1683652 Change-Id: Ie87a1ddf31aefcd0b623fd2837d78de420e76898
2017-04-13debian: move to stretchMarcin Juszkiewicz1-2/+10
Debian 'jessie' even with backports lacks some packages Kolla expects. Due to this we (Linaro) move to Debian 'stretch' release with our OpenStack work. Stretch is now frozen so there should not be many changes. Partially-Implements: blueprint multiarch-and-arm64-containers Change-Id: Iab7232cbe6f8fc3e3de10c67f3d89f134b185f05
2017-04-12Merge "check mariadb galera status in every loop."Jenkins1-0/+1
2017-04-10mariadb: handle lack of external repos on non x86Marcin Juszkiewicz1-2/+16
MariaDB-* packages are from external 'x86_64 only' repository. Other architectures use CentOS packages. Split needs to be done as 'mariadb-devel' is provided by three different packages on x86-64. Partially-Implements: blueprint multiarch-and-arm64-containers Depends-On: I71ddb7ef57c64d2505cac96724b1ab6772a57d6a Change-Id: I9f3394eb35723f2bbf3205c6af6101b5a9daed38
2017-04-04debian: enable all images enabled for UbuntuMarcin Juszkiewicz1-1/+1
Debian support is not maintained in Kolla so it got a bit behind Ubuntu one. This changeset enables Debian for all images. Jessie (even with backports) may be too old for some images though. Also unify distro check to ['debian', 'ubuntu'] to keep alphabetical order like it is done for RPM distributions. Partially-Implements: blueprint multiarch-and-arm64-containers Change-Id: I056233fbfa277e0e2360c07c3f80d9558c554357
2017-03-28Alphabetize packagesEduardo Gonzalez1-8/+8
Some images have packages sorted alphabetically and some not. Unify common style between all images. Change-Id: I906ed89c10b12886665618752f525ba71d83d991
2017-03-27check mariadb galera status in every loop.huweihua1-0/+1
in extend_start.sh, if Mariadb galera is not ready at first time, it will sleep 60s and then exit 1. we should check it`s status every time in the loop. Change-Id: I89174969687eecbf467ca3cad9aad1bfbfb8c4fe Closes-Bug: #1676316
2017-02-05Remove include_header and include_footer in all DockerfilesJeffrey Zhang1-1/+0
include_header and include_footer parameter is already removed, remove them in all Dockerfiles. Add missing footer block. Change-Id: I90da03eb9f95a3827361d5f5ede65fde7d6be2b3
2017-01-17use static uid/gid in imagesSam Yaple1-1/+2
This centralizes all user and group creation into a single source. This will fix any current and furture uid/gid mismatches (such as with nova-libvirt). In the process, we also unify users between the distros in a standard way. The users in the following containers change from thier defaults: Ubuntu: _chrony user is now chrony Ubuntu: memcache user is now memcached All: qemu user is used for ownership and socket permissions All uid and gid numbers are customizable via kolla-build.conf Co-Authored-By: Kris Lindgren <klindgren@godaddy.com> Change-Id: I120f26ab0683dc87d69727c3df8d4707e52a4543 Partially-Implements: blueprint static-uid-gid
2016-12-31Disable networking during bootstrappingSam Yaple1-1/+1
There is no reason to have networking active while bootstrapping the initial mysql folder structure. It is an additional attack vector that serves no purpose. Change-Id: Ia636ba9f563dbfb969dbfb613198c98748ee8a3c
2016-11-07Wait the wsrep_ready to be ON in mariadbJeffrey Zhang1-1/+1
Mariadb galera will be ready only when wsrep_ready to be ON, rather then wsrep_cluster_status is equal to Primary. Closes-Bug: #1639838 Change-Id: I9ef60a39a195057eeee0404a39b174cc8feed793
2016-11-03Remove Fedora supportChristian Berendt1-1/+1
Closes-bug: #1616387 Change-Id: Id97f88b9baa3d48d33ce120962450a374282d044
2016-09-14Mariadb bootstrap - no need to check for cluster ready in KubeSerguei Bezverkhi1-29/+14
The change c7c87909 has introduced an unconditional check for wsrep cluster during bootstrap process whether is ready or not and if it is not, bootstrap fails. In kubernetes environment wsrep driver is set to none, cluster will NEVER reach ready state hence causing kubernetes mariadb bootstrap job failure. Closes-Bug: #1623662 Change-Id: I0e6fc098861b7eeab544229d0b04a78fa498ddb9
2016-09-13Add header blocks to all DockerfilesPaul Bourke1-0/+2
Change needed to add header blocks to all Dockerfiles, similar to the base. Use case is to easily run something before packages are installed, e.g. to COPY a local rpm in that can be added to the package list. Change-Id: I1bbfdf0b762da0a392aa8bf47781315b45377bee Closes-Bug: 1618969
2016-09-13Fix mariadb bootstrap errorHui Kang1-1/+16
Wait until the mariadb cluster is fully functional - check existence of mariadb.pid is insufficient because the cluster may not be fully prepared Change-Id: I611b38f7dbc8032c42aee2a040fb1210b4bee7eb closes-bug: #1614363
2016-08-27Customizations for MariaDBShaun Smekel1-25/+25
This patchset contains customization of Dockerfile of the MariaDB container. Change-Id: Id234f549376ec68c7f6120d058692aa64dc97de0 Partially-implements: blueprint third-party-plugin-support
2016-07-05Fix the overwrite sudoers file issueJeffrey Zhang1-2/+2
Change-Id: I4b109f7fdc3b8e49defed26979b04ca158842e98 Closes-Bug: #1598423
2016-06-05Add kolla-kubernetes bootstrap capability to mariadbRyan Hallisey1-0/+18
Kolla-kubernetes requires there be an alternative way to bootstrap the container. Kolla-kubernetes uses the Kubernetes API endpoint to read information about the cluster so that the bootstrap process runs serially. Partially-implements: blueprint kolla-kubernetes-extended-dockerfiles Change-Id: I6185f2522b1151c934871a1ad2387f0001c0a320 Co-authored-by: Ken Wronkiewicz <wh-openstack@wirewd.com>
2016-05-26Update ubuntu dockerfiles for formattingSwapnil Kulkarni (coolsvap)1-1/+1
Change-Id: If4be00b937e14ec93443dcb7249cf17099d57cbe Closes-Bug: #1569417
2016-04-12Update Mariadb dockerfile for formattingSwapnil Kulkarni (coolsvap)1-1/+1
Change-Id: I6f5b28dc6520e3d31f413b0da708d9b14c9e9671 Partial-Bug:#1569417
2016-03-21Fix mysql bootstrapSamYaple1-2/+6
The lightsout recover patch broke multinode mysql. Also the lightsout recovery didnt probably pass the --wsrep-new-cluster flag. This updates the mariadb bootstrap to work with multinode again. Closes-Bug: #1559480 Related-Id: I903c3bcd069af39814bcabcef37684b1f043391f Change-Id: I1ec91a8b2144930ea8f04cc1c201b53712352e4e
2016-03-16MariaDB lights out recoverySamYaple1-1/+0
This playbook only matters for multinode since AIO can recover from power outage without additional configuration. DocImpact Implements: blueprint mariadb-lights-out Change-Id: I903c3bcd069af39814bcabcef37684b1f043391f
2016-03-10Add missing 'yum clean all' to mariadbPaul Bourke1-0/+1
Found another missing clean in mariadb, halves the size of the image. TrivalFix Change-Id: Idcbb925a6f232bd1172710456662a52784e025b6
2016-02-19Make Heka collect MariaDB logsÉric Lemoine1-0/+8
Partially implements: blueprint heka Change-Id: Ib5e740683cee296bcac69228f525594850d62a27
2016-01-28Cleanup mariadb and make compatiable with mesosSamYaple1-2/+5
There is no reason to have a hostname-unique pidfile in the container as we currently have. This posed problems with kolla-mesos reusing the same script. Since there is no reason for this pidfile to be configurable in path _at_ _all_, we hardcode the path. Additionally, we adjust the file perm change to only update the perms on the folder if it is not already properly set. This also incorperates a kolla-ansible file in the bootstrap process which follows our other container techniques of using the idempotent creation of a volume in the bootstrap process (see nova) TrivialFix Related-Bug: #1538136 Change-Id: I2380529fc7146a9603145cdc31e649cb8841f7dd
2016-01-04Make galeradb bootstraping robustSidharth Surana2-13/+56
Currently, there are arbitrary wait for mariadb service startup. However, this leads to nondeterministic results in the current workflow. This patch tries to make the workflow more deterministic. Change-Id: I3c6245cce93c7ff0d3d57cb2ae065a1ed1487769 Closes-Bug: #1491782
2015-11-23Remove hardcoded MAINTAINER in DockerfilesSwapnil Kulkarni (coolsvap)1-1/+1
Added new option in kolla-build.conf Change-Id: I45fe51966bcb59ea19d112281ba3d5a1ba091a56 Closes-Bug:#1514304