Issue #20479 has been updated by Yoann Le Touche.

Category set to reports
Status changed from Unreviewed to Needs Decision
Keywords set to Dashboard, Reports

Needs decision.

Should Dahsboard be able to process such report by changing the db schema like 
in #18411#note-8.

or

Should Puppet sanitize the message string in some way to make it valid for 
Dashboard as it is.

----------------------------------------
Bug #20479: Puppet reports can contain invalid data that break puppet-dashboard.
https://projects.puppetlabs.com/issues/20479#change-98255

* Author: Alexander Fisher
* Status: Needs Decision
* Priority: Normal
* Assignee: 
* Category: reports
* Target version: 
* Affected Puppet version: 
* Keywords: Dashboard, Reports
* Branch: 
----------------------------------------
Hi

http://docs.puppetlabs.com/puppet/3/reference/format_report.html#puppetutillog 
defines the 'message' field as a string.

However, in some situations, the yaml report generated by puppet has the field 
encoded as base64 binary data.
To reproduce this, introduce a syntax error into a puppet manifest file by, (as 
if by accident[1]), inserting a non printable character using vim.
http://wills-tech-notes.blogspot.co.uk/2011/01/insert-non-printable-characters-in-vi.html

As expected, a puppet run, will complain about the syntax error.
The report generated will not conform to the published spec.  The message field 
in the yaml will contain binary base64 encoded data.

I discovered this issue after installing puppet dashboard and importing 
historic reports.
Puppet dashboard will choke on the report, in much the same way as it does in 
https://projects.puppetlabs.com/issues/18411
This is because it tries to store the data in a MySQL TEXT field.

I discussed this issue on IRC, and the feeling was that it was the invalid 
report to blame and not dashboard.
I suggested that perhaps dashboard should use a BLOB field, but was told that I 
should stop trying to get dashboard to process invalid reports.

Many thanks to all those who took part on IRC.

Kind Regards,
Alex

[1] - Accidents happen.  Messed up manifests do occasionally get committed and 
then later fixed.


-- 
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 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.

Reply via email to