Issue #21896 has been updated by Peter Meier.
Status changed from Unreviewed to Needs More Information
Assignee set to Michael Rollins
Are you maybe able to provide a way to reproduce your problem? I'm not able to
do so:
<pre>
$ cat foo.pp
file{'/tmp/a':
content => template('/tmp/templates/a.erb')
}
$ cat /tmp/templates/a.erb
log4perl.appender.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} <%p> %m%n
$ puppet apply foo.pp
Notice: /Stage[main]//File[/tmp/a]/ensure: defined content as
'{md5}1a9c810df612c0b93f9510df40b5dd26'
Notice: Finished catalog run in 0.02 seconds
$ cat a
log4perl.appender.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} p> %m%n
$ echo bla > a
$ puppet apply foo.pp
Notice: /Stage[main]//File[/tmp/a]/content: content changed
'{md5}3cd7a0db76ff9dca48979e24c39b408c' to
'{md5}1a9c810df612c0b93f9510df40b5dd26'
Notice: Finished catalog run in 0.02 seconds
$ puppet agent --version
3.1.1
</pre>
----------------------------------------
Bug #21896: Open ERB tag in file template prevents updates and causes no error
output
https://projects.puppetlabs.com/issues/21896#change-95268
* Author: Michael Rollins
* Status: Needs More Information
* Priority: Normal
* Assignee: Michael Rollins
* Category:
* Target version:
* Affected Puppet version:
* Keywords:
* Branch:
----------------------------------------
In a file template there was the following code:
<pre>
log4perl.appender.layout.ConversionPattern = %d{yyyy-MM-dd HH:mm:ss} <%p> %m%n
</pre>
Any updates to this line were ignored by puppet agent runs, despite the file
having different MD5 sums. Updates to other lines were processed and pushed
normally.
It was determined that the open ERB tag was the culprit "<%", and after
removing this the problem went away. The code after the open tag did parse as
ERB code without errors. This is not a bug with parsing ERB code.
The reason for submitting this bug is because puppet did not throw any
exceptions, warnings, or errors when parsing the file, nor during subsequent
agent runs. Puppet did not push updates to the file when they were made
however, which caused much concern. The logs did not contain any information
that was helpful for troubleshooting this issue.
<bold>If puppet determines the checksum of a file is different, but does not
apply changes to allow the checksums to match, then it should generate a
warning or error indicating that a file was not able to be updated.</bold>
<pre>
ruby 1.8.6 (2010-02-05 patchlevel 399) [x86_64-linux]
2.6.18-238.19.1.el5 (gcc version 4.1.2 20080704 (Red Hat 4.1.2-50))
puppet = 2.7.19
</pre>
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs.
For more options, visit https://groups.google.com/groups/opt_out.