Skip to content

Puppetlabs-docker misdetecting parameter change #1021

Open
@miklosakos

Description

@miklosakos

Describe the Bug

Puppet Agent mis-detecting parameter change and thus containers get restarted when configuration change did not happen.

Expected Behavior

Docker container(s) not getting restarted.

Steps to Reproduce

Use the following code and run puppet agent twice:

class monitor::grafana (
  String $admin_user      = 'admin',
  String $admin_password  = 'StrongPassword123!',
  Stdlib::Absolutepath $host_data_dir = '/opt/grafana-data',
  Integer $host_port         = 3000,
){
  file { $host_data_dir:
    ensure => directory,
    owner  => '472',
    group  => '472',
    mode   => '0755',
  }
  ::docker::run { 'grafana':
    image   => 'grafana/grafana-oss:12.0.2',
    restart => 'unless-stopped',
    ports   => ["${host_port}:3000"],
    volumes => ["${host_data_dir}:/var/lib/grafana"],
    env     => [
      "GF_SECURITY_ADMIN_USER=${admin_user}",
      "GF_SECURITY_ADMIN_PASSWORD=${admin_password}",
      'GF_INSTALL_PLUGINS=grafana-clock-panel,grafana-piechart-panel',
    ]
  }
}

Environment

  • Version:
    • Puppet: 8.10.0-bookworm
    • puppetlabs-docker: v10.3.0
  • Platform: Debian 12

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions