puppetlabs/puppetlabs-mysql

Manage /var/log/mysql on Debian

jcharaoui opened this issue · 4 comments

Use Case

On Debian 12 (bookworm), the /var/log/mysql is not created by the package anymore.

Since this module sets log-error by default to /var/log/mysql/error.log, the absence of the parent directory is causing a failure.

Describe the Solution You Would Like

Please adjust the module to manage the /var/log/mysql directory when log-error is being used. This solution should be compatible with all supported versions of Debian.

Describe Alternatives You've Considered

A workaround is to override log-error to undef.

Same issue here.

As a workaround I added the following inside if $options['mysqld']['log-error'] { } / line 24 in the file manifests/server/installdb.pp to ensure that the directory exists:

    file { '/var/log/mysql':
       ensure => 'directory',
       mode   => '0755',
     }