puppetlabs / puppetlabs-mysql

MySQL Puppet Module / Manifests + Types & Providers
Apache License 2.0
380 stars 792 forks source link

Manage /var/log/mysql on Debian #1566

Open jcharaoui opened 1 year ago

jcharaoui commented 1 year ago

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.

CamZie commented 11 months ago

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',
      }