ozone
ozone copied to clipboard
HDDS-10984. Tool to restore SCM certificates from RocksDB.
What changes were proposed in this pull request?
Add a tool to restore SCM certs from RocksDB. See jira description for context
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-10984
How was this patch tested?
Manually deleted and restored certs using this command, verified the integrity of the certs using the md5sum of the deleted and regenerated certs
[~]# ozone debug -conf ozone-conf/ozone-site.xml cert-recover --db=/var/lib/hadoop-ozone/scm/data/scm.db
24/06/06 09:50:08 INFO codec.RepeatedOmKeyInfoCodec: RepeatedOmKeyInfoCodec ignorePipeline = true
24/06/06 09:50:08 INFO codec.OmKeyInfoCodec: OmKeyInfoCodec ignorePipeline = true
24/06/06 09:50:08 INFO codec.OmKeyInfoCodec: OmKeyInfoCodec ignorePipeline = true
24/06/06 09:50:08 INFO codec.OmKeyInfoCodec: OmKeyInfoCodec ignorePipeline = true
24/06/06 09:50:08 INFO codec.OmKeyInfoCodec: OmKeyInfoCodec ignorePipeline = true
24/06/06 09:50:08 INFO codec.OmKeyInfoCodec: OmKeyInfoCodec ignorePipeline = true
All Certs in DB : [8372456399380787, 1, 8370741018375358, 8372457017676890]
Host: xxxx.xxxx.xxxx.site
Sub cert serialID for this host: 8370741018375358
Root cert serialID: 1
Writing certs to path : /var/lib/hadoop-ozone/scm/ozone-metadata/scm/sub-ca/certs
Writing root certs to path : /var/lib/hadoop-ozone/scm/ozone-metadata/scm/ca/certs