Details
-
Bug
-
Status: Open
-
Normal
-
Resolution: Unresolved
-
None
-
None
-
None
-
stdlib >= 4.17.0
Pupppet 4.6.1
-
Needs Assessment
-
Needs Assessment
Description
We're seeing duplicate declaration errors with a custom type that's creating a file using ensure_resource (https://github.com/puppetlabs/puppetlabs-docker/blob/master/manifests/image.pp#L58-L66 )
docker::image { $image_a: }
|
docker::image { $image_b: }
|
Duplicate declaration: File[/usr/local/bin/update_docker_image.sh] is already declared in file /etc/puppetlabs/code/modules/docker/manifests/image.pp:58; cannot redeclare at /etc/puppetlabs/code/modules/docker/manifests/image.pp:58 at /etc/puppetlabs/code/modules/docker/manifests/image.pp:58:3 |
at /etc/puppetlabs/code/environments/production/modules/profile/manifests/docker/$redacted/packer.pp:11 on node redacted |
This works fine with stdlib 4.16.0 and breaks with 4.17. and up. Puppet version 4.6.1.
I've traced this down to the following difference:
4.16 findresource(file[/usr/local/bin/update_docker_image.sh]) -> File[/usr/local/bin/update_docker_image.sh] |
4.17+ findresource(Puppet::Type::File, /usr/local/bin/update_docker_image.sh) -> not found |
It seems as puppet is not able to understand, that they should be the same type. Though, since 4.6 is still supported in stdlib, this needs to be addressed.