Skip to content

Upgrade 16.0.0 -> 16.2.0 on Debian 11 fails because of double declared File ressource #1662

Open
@lbdemv

Description

@lbdemv

Describe the Bug

After upgrading from module 16.0.0 the already installed server fails during the puppet agent run with the following Duplicate declaration Error:

~# puppet agent -t --noop --environment renovate_puppetlabs_mysql_16_x
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Resource Statement, Duplicate declaration: File[/var/log/mysql] is already declared at (file: /etc/puppetlabs/code/environments/renovate_puppetlabs_mysql_16_x/.modules/mysql/manifests/server/managed_dirs.pp, line: 37); cannot redeclare (file: /etc/puppetlabs/code/environments/renovate_puppetlabs_mysql_16_x/.modules/mysql/manifests/server/installdb.pp, line: 34) (file: /etc/puppetlabs/code/environments/renovate_puppetlabs_mysql_16_x/.modules/mysql/manifests/server/installdb.pp, line: 34, column: 5) on node XXX

Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

The change introduced in 074067a in the file manifests/server/installdb.pp to create the folder /var/log/mysql seem to break with the (debian specific) automatically managed dir permissions in the manifests/server/managed_dirs.pp file.

Expected Behavior

A clean puppet run with no changes, since the module had only a minor update 16.0.0 -> 16.2.0

The folder (creation and permissions) should be handled by the managed_dirs.pp manifest.

Steps to Reproduce

Steps to reproduce the behavior:

  1. Install debian 11 server
  2. Setup a mariadb server with the module in version 16.0.0
  3. Upgrade the module version to 16.2.0
  4. Initiate a Puppet agent run

Environment

  • Version 16.2.0
  • Platform Debian GNU/Linux 11 (bullseye)

Additional Context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions