Correct v4 checking to include future versions of the API

The v4? check was only pinning on :v4 versions of the API. This patch now
allows for future versions to match also, and so I've renamed it to v4-and-newer?

Also, remove-status was pinned to :v4, and is now future compatible.

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-707) Fix bonecp 57P01 handling

This patch adds retry handling for 57P01 failures, which result in an
PSQLException with a status code of 08003. The patch has been made
forward compatible by catching all SQLExceptions with this status code.

Version 0.8.0-RELEASE of Bonecp does not throw the correct sql state code
today, however a patch has been raised to make this happen so we can
upgrade to this version in the future.

Signed-off-by: Ken Barber <ken@bob.sh>
Add thread names to logging

This patch adds thread names to the various logback.xml configuration files
in this project. This provides us with better traceability when attempting
to understand where a log message came from.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #1074 from kbarber/maint/master/add-thread-names-to-logging

Add thread names to logging
Merge pull request #1071 from kbarber/maint/master/make-status-version-logic-forward-compatible

Correct v4 checking to include future versions of the API
Merge pull request #1073 from kbarber/ticket/stable/pdb-707-bonecp-last-conn-after-pg-restart

(PDB-707) Fix bonecp 57P01 handling
(PDB-707) Fix bonecp 57P01 handling

This patch adds retry handling for 57P01 failures, which result in an
PSQLException with a status code of 08003. The patch has been made
forward compatible by catching all SQLExceptions with this status code.

Version 0.8.0-RELEASE of Bonecp does not throw the correct sql state code
today, however a patch has been raised to make this happen so we can
upgrade to this version in the future.

Signed-off-by: Ken Barber <ken@bob.sh>
(cherry picked from commit 6d58dbfc8873166704ff60411bfa77f4dedf9f55)
Merge branch 'stable'

* stable:
  (PDB-707) Fix bonecp 57P01 handling
(DOCUMENT-18) Mention DLO cleanup in docs
Merge pull request #1075 from holguinj/DOCUMENT-18

(DOCUMENT-18) Mention DLO cleanup in docs
(PDB-812) Consolidate produce-body

This patch consolidates produce-body functions for all streaming endpoints to a
new function in http/produce-body.
Merge pull request #1068 from wkalt/ticket/master/pdb-812-consolidate-produce-body

(PDB-812) Consolidate produce-body
(maint) fix commands API examples

This includes an environment key in the replace-facts example so it works when copy pasted.
Merge pull request #1076 from wkalt/maint/fix-commands-examples

(maint) fix commands API examples
(maint) fix commands API examples

This includes an environment key in the replace-facts example so it works when copy pasted.

(cherry picked from commit 06e42200444b5e1e5f9171cdb7f69c2577ded625)
(PDB-843) Squash puppetlabs.http and puppetdb.http

These two files are a source of confusion as we develop, and the pending
namespace change requires us to do something with them. This patch simply
squashes the functions into one library for now, and removes any reference
in other libraries. The pl-http short name is also dropped now.

Signed-off-by: Ken Barber <ken@bob.sh>
(PDB-843) Namespace changes for source and test code

Our engineering org has decided to use puppetlabs.<library_name> as a standard
across our Clojure projects, this patch lines us up with that standard.

This also moves the libraries in com.puppetlabs.* into puppetlabs.puppetdb also,
to avoid collisions with any other project. These files were designed to be
pulled out of PuppetDB one day, but for now we've moved them all into the same
namespace.

We also have re-aligned our tests to be more standard, adopting the namespace-test
convention. This aids with editors also, as now we can switch easily between src
and test.

All the various places that care about this change have been changed, including
SysV scripts, systemd definitions and the command line utilies that are responsible
for launching PuppetDB, since we now have puppetlabs.puppetdb.core as the main
entry point. boostrap.cfg, and logback.xml have been changed also.

Since we were changing a lot of the (ns ..) blocks across all files we took the
opportunity to clean them up. :use is now now longer used (excuse the pun).
Comments at the top of libraries are now in the ns doctstring also.

The test-resources directory has also been aligned with the new namespaces and
tests are now pointing at the new layout.

For backwards compatibility, we've kept the old namespace pinned for JMX & ActiveMQ
queues, since these are still required for our stable API commitments. In the future
we'll have to fix this.

The concurrent.clj code has been removed, I found it wasn't used so removed it.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #1078 from kbarber/ticket/master/pdb-843-rationalize-clojure-namespaces

(PDB-843) rationalize clojure namespaces
(PDB-653) metrics update on PDB start

Previously the DLO metrics only updated on a failed command submission, which
meant restarting PDB would blank the metrics until the next failure. This patch
initializes DLO metrics on PDB startup if the DLO directory, which is created
on first failure, already exists.
Changed our acceptance test setup to pin on facter 2.1.0

Facter 2.2.0 changed the value returned from the 'lsbmajdistrelease'
fact that causes the postgresql module to break on Ubuntu 10.04. Pinning
facter to 2.1.0 avoids the problem until the module can be released.