| Using a certname with special characters, or that is too long, will result in a duplicate node entry. You can reproduce this error with a certname such as node_0 by submitting a factset first and then submitting a catalog. Example commands are below Replace facts
curl -X POST http://localhost:8080/pdb/cmd/v1 \ |
-H 'Content-Type:application/json' \ |
-d '{"command": "replace facts", "version": 5, "payload": { "certname": "host_0", "environment": "foo", "producer_timestamp": "2019-06-03T09:17:25-0700", "producer": "foo", "values": {} } }'
|
Replace catalog
curl -X POST http://localhost:8080/pdb/cmd/v1 \ |
-H 'Content-Type:application/json' \ |
-d '{"command": "replace catalog", "version": 9, "payload": { "certname": "host_0", "producer_timestamp": "2019-06-03T09:17:25-0700", "version": "1", "environment": "foo", "edges": [], "resources": [], "transaction_uuid": "40e6215d-b5c6-4896-987c-f30f3678f608", "code_id": null, "producer": null, "job_id": null, "catalog_uuid": null} }'
|
and then check the certnames present
puppetdb=> select * from certnames; |
id | certname | latest_report_id | deactivated | expired | package_hash | latest_report_timestamp |
----+-------------------------------------------------+------------------+-------------+---------+--------------------------------------------+---------------------------- |
74 | host_0 | | | | | |
80 | host-0_8ad051ad85dfdcb632063b23fab9a0081e46178f | | | | | |
(2 rows)
|
|