> I am moving our environment from puppet 2.7.1 with puppet dashboard to
> puppet 3.5.1 with puppetdb 2.0. During testing on a separate host with the
> identical setup as our puppet CA, everything seems to be functioning
> properly: puppet agents are able to be added on the master and receive
> everything they should, and I'm able to query the pgsl db and API and view
> information and facts. However, I've noticed two concerning things in the
> logs below.
>
> I am by no means a pgsl expert, and after enabling debug logging I'm unable
> to tell why it's firing these alerts. Do I need to tune the db somehow, or
> is there something off in my configs?
>
> 1.) After inserting node information into catalog_resources, an error occurs
> in /var/log/puppetdb/puppetdb.log:
>
> 2014-05-30 08:20:15,328 ERROR [c.p.p.command] [...] [replace catalog]
> Retrying after attempt 6, due to: org.postgresql.util.PSQLException: ERROR:
> index row size 4296 exceeds maximum 2712 for index "catalog_resources_pkey"
> Hint: Values larger than 1/3 of a buffer page cannot be indexed.
> Consider a function index of an MD5 hash of the value, or use full text
> indexing.
Now this is a new one for me ... the catalog_resources_pkey is
actually a combination of, the catalog_id (bigint), the type and title
(both text fields).
Sounds like either the type or title has exceeded the index maximum
size, which is very uncommon but I can see how this might happen.
It would be very hard to create a large resource type, but not
impossible. Whats more likely is that the title of one of your
resources is excessively large. This is possible most likely with an
exec {} or something similar that uses a very large command as the
title of the exec, instead of putting it in the command parameter like
so:
http://docs.puppetlabs.com/references/latest/type.html#exec-attribute-command.
Either that, or something very similar.
Without seeing your catalog however I can only guess. However you
might be able to track this down yourself. If you go onto the node
that is seemingly throwing the error, you can analyze the catalog file
and track down any elongated titles or types that might be triggering
this. Here is an example of how I would go about it:
https://gist.github.com/kbarber/b60798cc0ba4f262ae1e. To get a
compiled catalog you may need to temporarily disable puppetdb for this
to be created, either way - if you can get a hold of the catalog I
think we can find our answers.
BTW this might be considered a bug, and might call for better
normalisation in our schema to avoid this. Having said that, a type
and title combination this excessive is very abnormal, so it might be
something we want to stop from happening in Puppet anyway :-). So
weither this is a bug for puppet or puppetdb we'll have to determine.
> 2.) Additionally, I am seeing a lot of deprecation warnings in
> /var/log/puppetdb/puppetdb.log, like below. I would think that puppet 3.5.1
> with puppetdb 2.0 wouldn't fire these? Are they safe to ignore?
>
> '2014-05-30 08:39:36,021 WARN [c.p.p.command] command 'replace catalog'
> version 3 is deprecated, use the latest version'
This looks like you haven't upgraded puppetdb-terminus to the latest
version (2.0.0) on your puppet master. We've bumped the command
version to 4 now, this looks like its just the old code. Also people
often forget to restart the Apache process when upgrading the terminus
code, don't forget to do that.
ken.