Foreman did not delete Puppet signing request on re-build or host delete

We struck a strange problem trying to reinstall a server where the Puppet install in the finished template would not complain but the installed Puppet reported its certificate did not match the key. Turns out there was no cert on the host in the Puppet ssl dir, only the key.

Root cause was finally found to be an orphaned certificate signing request for that name on the Puppet server. Deleting that solved the problem.

Expected outcome:
When Foreman deletes a host’s cert from Puppet (when deleting the host or re-building it) it should also delete any signing requests.

Foreman and Proxy versions:

Foreman and Proxy plugin versions:
foreman_bootdisk: 21.2.3
foreman_puppet: 6.3.0
foreman_setup: 8.0.1

Distribution and version:
Ubuntu 22.04.4

Other relevant data:
Checking the Puppet proxy logs showed Foreman did send a delete request to the proxy. So the delete was attempted, it just appears that delete does not delete a signing request.