Jira (PUP-1038) puppet fails if template contains invalid utf-8
Title: Message Title Ethan Brown updated an issue Puppet / PUP-1038 puppet fails if template contains invalid utf-8 Change By: Ethan Brown Labels: i18n redmine utf-8 Add Comment This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe) -- You received this message because you are subscribed to the Google Groups "Puppet Bugs" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at https://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/d/optout.
Jira (PUP-1038) puppet fails if template contains invalid utf-8
Title: Message Title Charlie Sharpsteen updated an issue Puppet / PUP-1038 puppet fails if template contains invalid utf-8 Change By: Charlie Sharpsteen Ifyouattempttouseafileresourcewitha'content'parameterpointingatatemplate,andthetemplatecontainsbinarycontent,youmaygetanerrorlikethis: {code} Error:Failedtoapplycatalog:Parametercontentfailed:Mungingfailedforvalue...invalidbytesequenceinUTF-8 {code} I'vereproducedthefailurein2.7.16and3.x,thoughtheerrormessagesdifferslightlybetweenthetwo(andalsodependingonwhetheryoureprovia'apply'orviamaster/agentrun).I'mattachingthebinaryfilethatI'musingtorepro.Saveitintoadirectorystructurelikethis: {code} modules/mymod/templates/mytemplate.erb {code} Addthemodulesdirectorytoyourmodulepathandthenyoucanreprowiththefollowingmanifest: {code} file{/tmp/myfile:mode=755,content=template(mymod/mytemplate.erb),} {code} Notethatifyouusethe'source'parameterratherthanthe'content'parameter(andavoidcallingthetemplatefunction),themanifestcanbeappliedsuccessfully;sotheissueiswhenbringinginbinarydataasastring. Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
Jira (PUP-1038) puppet fails if template contains invalid utf-8
Title: Message Title Charlie Sharpsteen commented on an issue Re: puppet fails if template contains invalid utf-8 This was fixed in commit 40c67e2. The agent now treats file content as binary blobs. In most cases, a template is the wrong tool to use for transferring static content such as binary blobs. The content for these files should be synced using the source parameter. However, I suspect this use of templates may be occurring in masterless Puppet setups. Erik Daln, was this the use case you were thinking of when you migrated this ticket from Redmine? Add Comment Puppet / PUP-1038 puppet fails if template contains invalid utf-8 If you attempt to use a file resource with a 'content' parameter pointing at a template, and the template contains binary content, you may get an error like this: {code} Error: Failed to apply catalog: Parameter content failed: Munging failed for value ... invalid byte sequence in UTF-8 {code} I've reproduced the failure in 2.7.16 and 3.x... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message
Jira (PUP-1038) puppet fails if template contains invalid utf-8
Title: Message Title Mariusz Gronczewski commented on an issue Re: puppet fails if template contains invalid utf-8 Use cases: puppet manifests/modules in UTF-8 but some part of system is not using it - like legacy application still using some 8 bit coding like ISO-8859-2 or KOI8-R; and same config is used for say DB configuration and site name, in non-UTF encoding some badly designed configuration formats that use something like value=some-binary-string, example: linux top utility we used it for distributing sensitive data, as trying to secure filebucket paths so machine from project A couldn't download keys from project B was too much effort for the amount of different machines and projects we had, so we just put them into templates (as some apps for some insane reason insist on keeping parts of their configs as binary blobs) Of course, that is mostly solved by putting them into hiera, but sometimes templates are there just to add this file is managed from puppet and you can find it $here header, even if binary (or just non-utf) blob is passed from hiera. Add Comment Puppet / PUP-1038 puppet fails if template contains invalid utf-8 If you attempt to use a file resource with a 'content' parameter pointing at a template, and the template contains
Jira (PUP-1038) puppet fails if template contains invalid utf-8
Title: Message Title Michelle Johansen updated an issue Puppet / PUP-1038 puppet fails if template contains invalid utf-8 Change By: Michelle Johansen Assignee: MarkJeromin CharlieSharpsteen Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
Jira (PUP-1038) puppet fails if template contains invalid utf-8
Title: Message Title Michelle Johansen commented on an issue Re: puppet fails if template contains invalid utf-8 Charlie Sharpsteen Can you provide some info here please? Add Comment Puppet / PUP-1038 puppet fails if template contains invalid utf-8 If you attempt to use a file resource with a 'content' parameter pointing at a template, and the template contains binary content, you may get an error like this: Error: Failed to apply catalog: Parameter content failed: Munging failed for value ... invalid byte sequence in UTF-8 I've reproduced the failure in 2.7.16 and 3.x, though the err... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
Jira (PUP-1038) puppet fails if template contains invalid utf-8
Title: Message Title Mark Jeromin assigned an issue to Mark Jeromin Puppet / PUP-1038 puppet fails if template contains invalid utf-8 Change By: Mark Jeromin Assignee: MarkJeromin Add Comment This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-bugs+unsubscr...@googlegroups.com. To post to this group, send email to puppet-bugs@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-bugs. For more options, visit https://groups.google.com/groups/opt_out.
Jira (PUP-1038) puppet fails if template contains invalid utf-8
Title: Message Title Mark Jeromin commented on an issue Re: puppet fails if template contains invalid utf-8 I am unable to reproduce this problem using both puppet-apply and puppet-agent runs in Puppet 2.7.25 and Puppet 3.4.2 on CentOS 6.4. Puppet seems to process the catalog without error. Ive put this tickets status into Needs Information. If this is still a problem on some other platform, please update it with more information, or change the status to Closed if you were able to resolve the issue on your own. Add Comment Puppet / PUP-1038 puppet fails if template contains invalid utf-8 If you attempt to use a file resource with a 'content' parameter pointing at a template, and the template contains binary content, you may get an error like this: Error: Failed to apply catalog: Parameter content failed: Munging failed for value ... invalid byte sequence in UTF-8 I've reproduced the failure in 2.7.16 and 3.x, though the err... This message was sent by Atlassian JIRA (v6.1.4#6159-sha1:44eaede) -- You received this message because you are subscribed to the Google Groups Puppet Bugs group. To unsubscribe from
Jira (PUP-1038) puppet fails if template contains invalid utf-8
Title: Message Title redmine.exporter created an issue Puppet / PUP-1038 puppet fails if template contains invalid utf-8 Issue Type: Bug Assignee: Unassigned Created: 16/Dec/13 3:00 AM Labels: redmine Priority: Normal Reporter: redmine.exporter If you attempt to use a file resource with a 'content' parameter pointing at a template, and the template contains binary content, you may get an error like this: Error: Failed to apply catalog: Parameter content failed: Munging failed for value ... invalid byte sequence in UTF-8 I've reproduced the failure in 2.7.16 and 3.x, though the error messages differ slightly between the two (and also depending on whether you repro via 'apply' or via master/agent run). I'm attaching the binary file that I'm using to repro. Save it into a directory structure like this: modules/mymod/templates/mytemplate.erb Add the modules directory to your module path and then you can repro with the following manifest: file { /tmp/myfile: mode = 755, content = template(mymod/mytemplate.erb), } Note that if you use the 'source' parameter rather than the 'content' parameter (and avoid calling the template function), the manifest can be applied successfully; so the issue is when bringing in binary data as a string.