On Thursday, October 3, 2013 10:48:10 AM UTC-5, David Thompson wrote: > > On 10/3/13 9:07 AM, jcbollinger wrote: >
> So, "puppet agent --test --environment production" fails to create > resources findable via REST (and in fact removes them if they're > present), but "puppet apply foo.pp" (with foo.pp containing the > statements above) makes them findable (and they show up in > nagios_hosts.cfg on the nagios server). > With that, I'm ready to call "bug". Nevertheless, I hope to be able to help you find a viable workaround, and perhaps to characterize the issue better. > > > though I don't expect using that form will change anything. I'm more > > interested, though, in the back end. That is, is puppetdb for some > > reason failing to serve up resources that are in fact recorded in the > > back-end DB, or are the resources either not making it to the DB in the > > first place, or are they being purged from the DB between being entered > > and being queried? > > That's a very good question. I can certainly find catalog_resource and > resource_params records that *look* like they contain appropriate > Nagios_host resources, but the REST API says no, and if I run the actual > sql query out of the postgres statement log, it says no. The sql query > itself is a complex enough to be beyond my db-mojo to understand why > it's not finding any Nagios_host resources. > > If there's any way you can provide the relevant data and query, I daresay someone around here -- maybe me -- will be able to figure out why the query doesn't return any rows. But that might be better deferred, as I think there may be another avenue to pursue first. > It looks like enlightenment lies in understanding the difference between > the puppet agent and puppet apply runs. > > Indeed so. You have or can create statement logs showing what happens when you use Puppet apply to export the Nagios_host resources such that they can later be found, and also showing what happens when the same resources are exported as part of catalog compilation. There must be some difference, hopefully more than the identity of the db client machine. That seems a logical place to look for clues. John -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscr...@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.