From e3ce0711ee00d830962402ca5746f76ba82fd08e Mon Sep 17 00:00:00 2001 From: Michal Arbet Date: Wed, 18 Sep 2024 18:49:37 +0200 Subject: [PATCH] Fix mariadb backup unable to create history table The backup user was missing the necessary CREATE privilege for the mariadb_backup_history table within the mysql schema, causing backups to fail when attempting to create this table. This patch addresses the issue by granting the backup user the required CREATE permission specifically for the mariadb_backup_history table. With this change, the backup process can now complete successfully without manual intervention for user permissions. Closes-Bug: #2061889 Change-Id: Ic92c8959972329adbd4b89c521aa87678f25b4e4 --- ansible/roles/mariadb/tasks/register.yml | 2 +- releasenotes/notes/bug-2061889-f54e356f43c0fae3.yaml | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 releasenotes/notes/bug-2061889-f54e356f43c0fae3.yaml diff --git a/ansible/roles/mariadb/tasks/register.yml b/ansible/roles/mariadb/tasks/register.yml index eb5757edac..08edfd074e 100644 --- a/ansible/roles/mariadb/tasks/register.yml +++ b/ansible/roles/mariadb/tasks/register.yml @@ -46,7 +46,7 @@ name: "{{ mariadb_backup_database_user }}" password: "{{ mariadb_backup_database_password }}" host: "%" - priv: "*.*:CREATE TABLESPACE,RELOAD,PROCESS,SUPER,LOCK TABLES,BINLOG MONITOR" + priv: "*.*:CREATE TABLESPACE,RELOAD,PROCESS,SUPER,LOCK TABLES,BINLOG MONITOR/{{ mariadb_backup_database_schema }}.mariadb_backup_history:CREATE" append_privs: True when: - enable_mariabackup | bool diff --git a/releasenotes/notes/bug-2061889-f54e356f43c0fae3.yaml b/releasenotes/notes/bug-2061889-f54e356f43c0fae3.yaml new file mode 100644 index 0000000000..b148344d5c --- /dev/null +++ b/releasenotes/notes/bug-2061889-f54e356f43c0fae3.yaml @@ -0,0 +1,6 @@ +--- +fixes: + - | + Fixes mariadb's backup failure due to missing `CREATE` privileges + on the `mariadb_backup_history` table. `LP#2061889 + `__