Missing check for fact_values_string_trgm

The code for index handling was only checking one index, but not the other.
This corrects the logic, and drops and extra INFO when creating the new index.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #1097 from kbarber/maint/stable/missing-check-for-fact_values_string_trgm

Missing check for fact_values_string_trgm
Try reverting to c1.medium

After the change to c3.large we started to see intermitent issues with tests,
this patch is to just test the theory that it might be the box change
somehow changing the timing characteristics or some such. We're not 100%
so we might need to revert this also.

Signed-off-by: Ken Barber <ken@bob.sh>
(cherry picked from commit 3aa02cfb5c132b968cc20610061bb65d53411d62)
Merge pull request #1102 from kbarber/maint/stable/revert-to-c1-medium

Try reverting to c1.medium
Drain queues where appropriate to avoid race conditions

We have a theory that these two places require checks to ensure the queue is
drained/processed before continuing, to avoid a potential race.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #1104 from kbarber/maint/stable/drain-queues-to-avoid-races

Drain queues where appropriate to avoid race conditions
(bug)(packaging) Refresh service configuration on upgrades

Previously, upgrades were not properly refreshing the service
information. This adds a conditional restart on upgrades.
Merge pull request #1105 from shrug/maint/master/systemd

(bug)(packaging) Refresh service configuration on upgrades
Revert "Try reverting to c1.medium"

This reverts commit 3aa02cfb5c132b968cc20610061bb65d53411d62.
Merge pull request #1107 from kbarber/maint/stable/c3-large-instances-again

Revert "Try reverting to c1.medium"
Fix for acceptance test issue related to fact path -> fact value
constraint violation
More clarification around using an IP address for ssl-host and host

Setting `ssl-host` and `host` to a hostname often causes problems due to
resolution failing, pointing at the wrong thing or sometimes even resolving
first to an IPv6 address instead of an IPv4.

This patch fixes some documentation and the comment in the configuration
file to forewarn users of this scenario, so they can avoid it.

Signed-off-by: Ken Barber <ken@bob.sh>
Return a PuppetDB version with `puppetdb -v`

This is a cheap way of getting the version of PuppetDB from the current system
without having to make an API call, which is just complex anyway.

Signed-off-by: Ken Barber <ken@bob.sh>
Fixed big when updating the values for an exsting certname's factset
Merge pull request #1109 from kbarber/maint/stable/avoid-hostnames-in-host-entries

More clarification around using an IP address for ssl-host and host
Merge pull request #1108 from senior/maint/stable/fact-path-constraint-violation-fix

Fix for acceptance test issue related to fact path -> fact value constraint violation
Merge branch 'stable'

* stable:
  Fixed big when updating the values for an exsting certname's factset
  More clarification around using an IP address for ssl-host and host
  Fix for acceptance test issue related to fact path -> fact value constraint violation
  Revert "Try reverting to c1.medium"
  Drain queues where appropriate to avoid race conditions
  Try reverting to c1.medium
  Missing check for fact_values_string_trgm
Merge pull request #1110 from kbarber/maint/master/return-version-with-puppetdb-v

Return a PuppetDB version with `puppetdb -v`
(PDB-882) Setup basic facts performance testing

This introduces our first pass at performance testing, in particular we have
targetted loading structured facts.

The benchmark tool is now capable of using a series of provided fact JSON files,
so we can use that tool for this purpose. We've also provided a set of basic
seed files for these tests.

The tooling: `rake test:beaker` has now become `rake beaker:acceptance` and
performance tests are started using `rake beaker:performance` instead.

The testing introduces a new host configuration specific to this work, in particular
we are using a single c3.xlarge instance. This is isolated from the acceptance testing
one so we can tune this on its own.

This also fixs a number of side issues:

* benchmark -h was broken, now fixed
* The -rp switch no longer worked, this has no become -r
* Some of the client based stuff was strewn around our code base, its now
  centralized in puppetlabs.puppetdb.client

Signed-off-by: Ken Barber <ken@bob.sh>