Description
Describe the Bug
I've recently upgraded from v4.1.2 to v6.0.2 and ever since my server has been failing to run puppet.
A clear and concise description of what the bug is.
There are two or more profiles being applied to the host. Each of the two include a docker_compose and docker::image, but the two are unique. This configuration was working in version 4.1.2.
We are now getting the following error:
Error: Found 1 dependency cycle:
(Docker_compose[elasticsearch] => Class[Profiles::elasticsearch] => Class[Profiles::traefik] => Docker::Image[traefik] => Exec[/usr/local/bin/update_docker_image.sh traefik:latest] => Docker::Image[traefik] => Docker_compose[elasticsearch])\nCycle graph written to /opt/puppetlabs/puppet/cache/state/graphs/cycles.dot.
Error: Failed to apply catalog: One or more resource dependency cycles detected in graph
Expected Behavior
Puppet should check the image and compose and proceed with changes, but probably not do anything since no changes are required.
Steps to Reproduce
#Traefik profile
class profiles::traefik (
$traefik_image_tag = 'latest'
){
docker::image { 'traefik':
image_tag => $traefik_image_tag,
}
docker_compose { 'traefik':
ensure => present,
compose_files => ['/docker/traefik/docker-compose.yml'],
subscribe => File['/docker/traefik/docker-compose.yml'],
require => [File['/docker/traefik/docker-compose.yml'],File['/docker/traefik/traefik.yml'],File['/docker/traefik/traefik-dynamic.yml']],
}
}
#ElasticSearch Profile
class profiles::elasticsearch (
$elasticsearch_image_tag = '8.6.1',
){
docker::image { 'elasticsearch':
image_tag => $elasticsearch_image_tag,
}
docker_compose { 'elasticsearch':
ensure => present,
compose_files => ['/docker/elasticsearch/docker-compose.yml'],
subscribe => File['/docker/elasticsearch/docker-compose.yml'],
}
}
Environment
- Module Version: 6.0.2
- Puppet agent: 7.21.0
- Platform: Ubuntu 22.04.