ChenSammi commented on code in PR #4429:
URL: https://github.com/apache/ozone/pull/4429#discussion_r1145613197
##########
hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/cert/ListSubcommand.java:
##########
@@ -79,17 +79,20 @@ private HddsProtos.NodeType parseCertRole(String r) {
private void printCert(X509Certificate cert) {
LOG.info(String.format(OUTPUT_FORMAT, cert.getSerialNumber(),
- cert.getNotBefore(), cert.getNotAfter(), cert.getSubjectDN()));
+ cert.getNotBefore(), cert.getNotAfter(), cert.getSubjectDN(),
+ cert.getIssuerDN()));
}
@Override
protected void execute(SCMSecurityProtocol client) throws IOException {
boolean isRevoked = type.equalsIgnoreCase("revoked");
- List<String> certPemList = client.listCertificate(
- parseCertRole(role), startSerialId, count, isRevoked);
- LOG.info("Total {} {} certificates: ", certPemList.size(), type);
+ HddsProtos.NodeType nodeType = parseCertRole(role);
+ List<String> certPemList = client.listCertificate(nodeType,
+ startSerialId, count, isRevoked);
+ LOG.info("Certificate list:(Type={}, BatchSize={}, CertCount={})",
Review Comment:
@neils-dev , thanks for the code review. TotalCertCount will be misleading.
It will make user think there is only this amount of certs in the cluster.
This case happened before.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]