Skip to content

Commit

Permalink
MDEV-31714 Debian 50-mariadb_safe.cnf has syslog enabled
Browse files Browse the repository at this point in the history
50-mariadb_safe.cnf was only ever intended to be a reference file.
With mariadbd-safe falling into disuse in Debian since systemd became
a service it was assumed this files wasn't used except on a few old
legacy init systems. Its assumed these users will have a configuration
already set.

It is however read by the mariabackup galera-sst script. This forks
off the logger process to write the output to /dev/log, which on a
systemd service the journalctl is reading anyway.

The real harm is on containers where there is now a MariaDB operator
that runs Galera based containers. In containers there is no /dev/log,
so information gets lost.

It would be much more direct just to go straight to stdout/error
like what would happen without this configuration.

Rather than risk the galera-sst scripts moving to the [mariadbd-safe]
group name introduced in a1211a4, we
remove the file for cleanness.
  • Loading branch information
grooverdan committed Jul 24, 2023
1 parent 2992d53 commit 2e09258
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 32 deletions.
28 changes: 0 additions & 28 deletions debian/additions/mariadb.conf.d/50-mariadb_safe.cnf

This file was deleted.

5 changes: 2 additions & 3 deletions debian/additions/mariadb.conf.d/50-server.cnf
Expand Up @@ -50,9 +50,8 @@ bind-address = 127.0.0.1
#general_log_file = /var/log/mysql/mysql.log
#general_log = 1

# When running under systemd, error logging goes via stdout/stderr to journald
# and when running legacy init error logging goes to syslog due to
# /etc/mysql/conf.d/mariadb.conf.d/50-mariadb_safe.cnf
# Error logging goes via stdout/stderr, which on systemd systems goes to
# journald.
# Enable this if you want to have error logging into a separate file
#log_error = /var/log/mysql/error.log
# Enable the slow query log to see queries with especially long duration
Expand Down
1 change: 0 additions & 1 deletion debian/mariadb-server.install
@@ -1,7 +1,6 @@
debian/additions/debian-start etc/mysql
debian/additions/debian-start.inc.sh usr/share/mariadb
debian/additions/echo_stderr usr/share/mariadb
debian/additions/mariadb.conf.d/50-mariadb_safe.cnf etc/mysql/mariadb.conf.d
debian/additions/mariadb.conf.d/50-server.cnf etc/mysql/mariadb.conf.d
debian/additions/source_mariadb.py usr/share/apport/package-hooks
etc/apparmor.d/usr.sbin.mariadbd
Expand Down

0 comments on commit 2e09258

Please sign in to comment.