Closed traylenator closed 2 months ago
Some thoughts:
puppetdb_query()
(and output the query?) and compare it with the query_facts()
function?Just closing.
So the facts endpoint is slower with 8 than 4 but it is faster to write to. It will remain like that.
Migrate to inventory endpoint for all queries and avoid use of the query_facts
and query_nodes
functions.
To facilitate migration we will run puppetdb 8 but redirecting the /nodes and /facts point on to a PDB4 instance which is also being maintained via double publication - remove all our calls /nodes and /facts and drop the PDB4 instance.
Versions:
puppet-agent
7.24.0puppetdb-termini
8.7.0puppetdb
4.4.0 and 8.7.0We have been stuck on PuppetDB 4 for a long time due to https://puppet.atlassian.net/browse/PDB-4830
To recap taking one of our more complicated queries we have in production:
On PuppetDB 4
time puppet apply query.pp
is 5.73sOn PuppetDB 8
time puppet apply query.pp
times out at 35s for us on the haproxy in front of puppetdb.Recently we have again been looking at trying to upgrade PuppetDB since we know we must.
PuppetDB 4 is of course totally unsupported and we are already patching it to keep it working in today's world.
It was previously suggested to use the inventory endpoint instead and indeed rewriting the above query.
time puppet apply inventory.pp
is 5.3 seconds so very comparable to facts endpoint of PDB4.So to the questions:
The pain of migrating is major - we have > 100 calls to
query_facts
in our manifests and also a load of external infrastructure that calls the facts end point to populate help desk information for instance. Given of course PDB4 does not have a inventory endpoint to the required functionality this of course makes any migration super hard.For info: