Hi, I’ve been having an issue with the number of leases I have with vault. I’m currently getting this warning:
expiration: lease count exceeds warning lease threshold: have=1216354 threshold=256000
After a long investigation, I found out that some of my servers were stuck in a loop generating pki certificates for a few months every minutes.
I have found a way to revoke those useless certificate but I’m currently running into the following issue.
When trying to revoke a cert (which was working for some time) I’m now getting this error message:
Error writing data to pki_int/revoke: Error making API request.
URL: PUT https://ord-vault01-001.ludia.me:8200/v1/pki_int/revoke
Code: 500. Errors:
* 1 error occurred:
* error encountered during CRL building: error storing CRL: put failed due to value being too large; got 1106063 bytes, max: 1048576 bytes
I have tried to rotate the CRL, but I get a similar error:
vault read /pki_int/crl/rotate
Error reading pki_int/crl/rotate: Error making API request.
URL: GET https://ord-vault01-001.ludia.me:8200/v1/pki_int/crl/rotate
Code: 500. Errors:
* 1 error occurred:
* error encountered during CRL building: error storing CRL: put failed due to value being too large; got 1106258 bytes, max: 1048576 bytes
Also, running a tidy doesn’t help. I use the following command:
vault write pki_int/tidy tidy_cert_store=true tidy_revoked_certs=true safety_buffer=1s
I see a lot of IO happenning for a few minutes, then it stops, and problem isn’t resolved.
Any Idea how to be able to continue my cleanup and restore crl rotation ?
Thank you
configuration:
vault version
Vault v1.8.2 (aca76f63357041a43b49f3e8c11d67358496959f)
"storage": {
"raft": {
"path": "/opt/data/vault/storage",
"node_id": "ord-vault01-001",
"retry_join": {
"leader_api_addr": "https://vault.ludia.me",
"leader_ca_cer_file": "/etc/pki/tls/private/web_ord-vault01.ludia.me.ca-bundle",
"leader_client_cert_file": "/etc/pki/tls/private/web_ord-vault01.ludia.me.crt",
"leader_client_key_file": "/etc/pki/tls/private/web_ord-vault01.ludia.me.key"
}
}
},