Hi, On Fri, Mar 08, 2019 at 03:47:02PM +0200, Apollon Oikonomopoulos wrote: > Hi, > > Thanks for the report! > > On 14:54 Thu 07 Mar , Kienan wrote: > > When running puppet 5.x with reports enabled and sent to PuppetDB 6.x, > > PuppetDB fails to store the report with the following error: > > > > 2019-03-01T17:06:01.396-05:00 ERROR [p.p.command] [100] [store report] > > Fatal error on attempt 0 for pm-buster.test > > clojure.lang.ExceptionInfo: throw+: {:fatal true, :cause #error { > > :cause "Value does not match schema: {:metrics [nil nil nil nil nil nil > > nil nil nil nil nil nil {:value (not (instance? java.lang.Number > > a-java.lang.String))} {:value (not (instance? java.lang.Number > > a-java.lang.String))} nil {:value (not (instance? java.lang.Number > > a-java.lang.String))} nil {:value (not (instance? java.lang.Number > > a-java.lang.String))} nil {:value (not (instance? java.lang.Number > > a-java.lang.String))} {:value (not (instance? java.lang.Number > > a-java.lang.String))} {:value (not (instance? java.lang.Number > > a-java.lang.String))} nil nil {:value (not (instance? java.lang.Number > > a-java.lang.String))} nil {:value (not (instance? java.lang.Number > > a-java.lang.String))} nil {:value (not (instance? java.lang.Number > > a-java.lang.String))} nil nil nil nil nil nil nil nil nil {:value (not > > (instance? java.lang.Number a-java.lang.String))} nil nil nil nil nil > > nil]}" > > > > A copy of the Puppet DB log file is attached with the complete > > backtrace. > > > > I'm filing this bug against the puppet package for the following reasons > > > > * hosts running puppet 4.x (stretch) are able to submit reports to same > > version of Puppet DB. > > So, this sounds like a regression. I would not be surprised if Puppet 4 > nodes failed to work with PuppetDB 6, but this is clearly a bug. > > > * I am able to "solve" the problem by modifying a number of places in > > the puppet agent files where report information is returned and calling > > "to_i" or "to_f" to force casting into a numeric value instead of a > > string. > > > > The metrics keys affected include: convert_catalog and > > transaction_evaluation. The keys affected may change depending on the > > manifest used for the node. > > > > This being said, it may be appropriate to move this bug to the PuppetDB > > package. I haven't been able to find any upstream bugs regarding this > > behaviour. > > > > To reproduce: > > > > 1. Install puppet, puppet-master-passenger, and puppetdb on the same > > host. > > 2. Configure the puppet master to storeconfigs with the PuppetDB and the > > agent to submit reports: > > > > (snippet from /etc/puppet.conf) > > > > [main] > > reports = puppetdb > > Note to self: let's add report storage to the puppet/puppetdb > autopkgtests. > > > [master] > > storeconfigs = true > > storeconfig_backend = true > > [agent] > > report = true > > > > 3. Run puppet using a minimal node manifest: > > > > node 'pm-buster.test' { > > > > } > > > > 4. The puppet run should complete successfully with no additional > > output. > > 5. Check the PuppetDB log at /var/log/puppetdb/puppetdb.log there should > > be an error submitting the report present. > > > > Note: this affects hosts running puppet 5.x which submit their reports > > to the puppet master as well. > > Does this mean that storing reports on the Puppet master is also broken? >
Do you mean storing reports as a file in addition to sending them to PuppetDB, or something else? I can do a test with storing reports as files as well if that would be useful. What I meant here is that: with the configuration I'm using all reports for nodes are stored in PuppetDB and a 5.x client connected to the puppet master will have the reports fail to be stored in the same way. So this affects more than just a node running the puppet master itself. > > > > I would expect normally that reports are able to be stored without > > error. > > Agreed. This is definitely worth fixing for Buster, I'll look into it. > > Thanks, > Apollon Thanks for taking to time to look into it! Kienan
signature.asc
Description: PGP signature