-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-8514. Improve ozone admin cert list subcommand count limits #4646
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
HDDS-8514. Improve ozone admin cert list subcommand count limits #4646
Conversation
ashishkumar50
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Galsza , Thanks for working on this, Please find few comments.
hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/cert/ListSubcommand.java
Outdated
Show resolved
Hide resolved
hadoop-hdds/tools/src/main/java/org/apache/hadoop/hdds/scm/cli/cert/ListSubcommand.java
Outdated
Show resolved
Hide resolved
fapifta
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Via the current protocol design it is not possible to get the overall count of the certs, we should consider to extend the protocol response with the number of certs in the RocksDB column family, as it would be still useful to show the users the actual number of certs.
In order to do so, you can add an optional field in the SCMListCertificateResponseProto defined in SCMServerSecurityProtocol.proto, then change the implementation of the listCertificates, and return the overal count not just the list of fetched certs, so you can use that in line 94 as CertCount value, and you can give a more precise message at the end.
The current final log message is fine (after adding batch size to the message) for the case when the value is not present in the response (new client queries old server).
The non-plus-ultra would be to provide the command that produces the next batch using the -s and -c as the last line of the output.
Remove unused variable, add batchsize to increased text
|
As discussed in DM, the method for the number of certs in the RocksDB column family has 2 problems: it's only giving back an estimated count and for OM certs it will cause problems. It's not worth trying to use it this way. |
|
Yes, we agreed that it might cause more trouble than it solves. Thank you for updating the patch. +1, pending CI. |
… limits (apache#4646) Change-Id: Ie816fda22c94372a794fad9aa04f6246ca8ac674
What changes were proposed in this pull request?
Add a warning to the user when the list subcommand lists too few certificates that they should increase the batch size.
What is the link to the Apache JIRA
HDDS-8514
How was this patch tested?
Github actions show no test failures and tried out the command on a local cluster.