This message was deleted.
# puppet-enterprise
s
This message was deleted.
t
How do you deploy the png files? are you using puppet:///modules syntax? It is recommended to use file() function if you want to deploy binary files.
r
The file() function would help code manager?
but yeah, I am using puppet:///modules syntax. It's Code Manager thats getting the incorrect file hash, the servers having the files deployed to from it match the incorrect hash.
m
so the md5 sum of the png file is different in /etc/puppetlabs/code? than it is on GIT?
r
Correct
t
do you have a .gitattributes file in your control-repo so that png files will be stored as binaries?
r
I do not have png set to be stored as binaries, I did however try that and it had no effect.
m
So to get from git to the code directory, under the hood this is just a git pull, the only thing i can think of would be that that perhaps and git operation failed and left them in a bad state in the cache? All i could think to do would be delete those files from the git repo, do a code deploy, and then add them back into the git repo and do the same
or clear out some of the caches on PE side, but thats a potentially more impactful operation
I cant imagine there would be some fundamental issue with what PE is doing, given the mechanism to which the files are cloned onto the primary, if they where corrupt between the final application node, and the primary server there may be other things to look into
c
Don't use
file()
for this. Content like PNG images doesn't need to be embedded in the catalog and stored in PuppetDB. Also, using
file()
instead of
binary_file()
on binary content causes Puppet to fall back to PSON serialization, which is memory and CPU intensive and will break when Puppet 8 drops PSON support. This sort of application content should be offloaded to a file server or artifact server and pulled in using
source => "https://..."
.
t
pay attention if the webserver uses a self signed ca. you either must tell puppet openssl (/opt/puppetlabs/puppet/bin/openssl) about the ca chain. or you can use archive from puppet-archive module.