Description

The local database configuration deployed by the puppet_compiler puppet module is no longer working under puppetdb 4. According to the puppet docs the subprotocol setting used to specify hsqldb is now ignored by puppetdb and the only mentioned backend is postgres. https://puppet.com/docs/puppetdb/4.4/configure.html#subprotocol

This is probably a good opportunity to move puppet compiler over to the role/profile paradigm as well. We could create a profile::puppet_compiler separate profile for a postgres backed puppet-compiler to deploy puppetdb4 compilers in parallel.

Copy facts from prod masters to the new compiler instance. There is a script to do this in operations/puppet which is meant to be run from a workstation (so the script can have ssh access to both prod and openstack). Substitute in the name of the compiler instance in the command below.

Populate puppetdb - but there's a catch here - since the puppetdbquery module currently in production does not support puppetdb 4 a workaround is needed to populate the DB using an updated puppetdbquery. One approach is...

Finally, run the compiler. But again because puppetdbquery isn't supporting puppetdb4 yet in production I'll use patch 410050 in the example (in this case only change will compile, while prod fails on puppetdbquery as expected)

Compiler03 has been upgraded to puppetdb 4 and populate-puppetdb kicked off. The first few dozen hosts have compiled/populated successfully. Looks good. Going to leave the job running in a screen session to complete overnight and plan on picking up at step 5 (https://phabricator.wikimedia.org/T187258#4061133) in the morning.