Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Certificate cleaning fails if CA is missing the certificate #13

Closed
alexjfisher opened this issue Nov 3, 2022 · 0 comments · Fixed by #14
Closed

Certificate cleaning fails if CA is missing the certificate #13

alexjfisher opened this issue Nov 3, 2022 · 0 comments · Fixed by #14

Comments

@alexjfisher
Copy link
Member

If for some reason the CA doesn't know about the agent certificate you're trying to regenerate, clean will fail raising an exception.

eg.

Error: /Stage[main]/Profile::Puppet::Certs/Puppet_certificate[agent.example.com]: Failed to call refresh: SSL_connect returned=1 errno=0 state=error: sslv3 alert certificate unknown
Error: /Stage[main]/Profile::Puppet::Certs/Puppet_certificate[agent.example.com]: SSL_connect returned=1 errno=0 state=error: sslv3 alert certificate unknown

I suspect this can happen if something else has cleaned the cert previously, or perhaps the agent cert was originally accidentally generated on a standby CA server, (my best guess as to what happened with one of my agents).

Since there's nothing to clean, we should probably just omit a warning and continue.

@alexjfisher alexjfisher added the bug label Nov 3, 2022
alexjfisher added a commit to alexjfisher/puppet-puppet_certificate that referenced this issue Nov 3, 2022
This can happen if the CA doesn't have a copy of your signed cert.
Perhaps it was already cleaned, or perhaps it was generated on a standby
CA server by mistake, (and then overwritten).

Unfortunately, the exception isn't more specific than
`OpenSSL::SSL::SSLError` and doesn't contain a code, so checking if the
message includes `certificate unknown` is the best I can do.

Fixes voxpupuli#13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant