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
This commit is contained in:
Michal Arbet 2024-09-18 18:49:37 +02:00
parent 7aea1d3ee4
commit e3ce0711ee
2 changed files with 7 additions and 1 deletions

View File

@ -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

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixes mariadb's backup failure due to missing `CREATE` privileges
on the `mariadb_backup_history` table. `LP#2061889
<https://bugs.launchpad.net/kolla-ansible/+bug/2061889>`__