From f450dd9779202e699a7d7858bc0ccf6946af51f0 Mon Sep 17 00:00:00 2001 From: Doug Szumski <doug@stackhpc.com> Date: Tue, 26 Jun 2018 16:06:15 +0100 Subject: [PATCH] Expire mysql binary logs out of the box As reported in the bug, these can grow to 10s to 100s of GB in a month. To reduce the chance of filling the disk and bringing down the control plane this change defines an expiry time. Closes-Bug: 1720113 Change-Id: I508aad1f515d5108a3d08c90318b70d0a918908c --- ansible/roles/mariadb/templates/galera.cnf.j2 | 1 + .../notes/expire-mariadb-bin-logs-c3df2b87460ca807.yaml | 3 +++ 2 files changed, 4 insertions(+) create mode 100644 releasenotes/notes/expire-mariadb-bin-logs-c3df2b87460ca807.yaml diff --git a/ansible/roles/mariadb/templates/galera.cnf.j2 b/ansible/roles/mariadb/templates/galera.cnf.j2 index a55064bf7..146b18625 100644 --- a/ansible/roles/mariadb/templates/galera.cnf.j2 +++ b/ansible/roles/mariadb/templates/galera.cnf.j2 @@ -15,6 +15,7 @@ log-error=/var/log/kolla/mariadb/mariadb.log log-bin=mysql-bin binlog_format=ROW +expire_logs_days=14 default-storage-engine=innodb innodb_autoinc_lock_mode=2 diff --git a/releasenotes/notes/expire-mariadb-bin-logs-c3df2b87460ca807.yaml b/releasenotes/notes/expire-mariadb-bin-logs-c3df2b87460ca807.yaml new file mode 100644 index 000000000..d373a79da --- /dev/null +++ b/releasenotes/notes/expire-mariadb-bin-logs-c3df2b87460ca807.yaml @@ -0,0 +1,3 @@ +--- +features: + - Automatically expire MariaDB binary logs after 14 days. -- GitLab