-
Notifications
You must be signed in to change notification settings - Fork 594
HDDS-5257. Avoid SCM call to get CA certs in non-HA from OM. #2273
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
Conversation
| waitDuration); | ||
| } else { | ||
| caCertPemList = certClient.listCA(); | ||
| List<String> x509Certificates = new ArrayList<>(); |
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.
Why define a separate list instead of using caCertPemList, like other if branches?
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.
Did little refactor, have a look at latest change
| if (certClient.getRootCACertificate() != null) { | ||
| x509Certificates.add(CertificateCodec.getPEMEncodedString( | ||
| certClient.getRootCACertificate())); | ||
| } | ||
| if (certClient.getCACertificate() != null) { | ||
| x509Certificates.add(CertificateCodec.getPEMEncodedString( | ||
| certClient.getCACertificate())); | ||
| } |
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.
Can we extract a method and reuse it here in and !SCMHAUtils.isSCMHAEnabled case?
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.
Ya just found out, and did that
xiaoyuyao
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.
LGTM, +1.
|
Thank You @bshashikant @xiaoyuyao and @adoroszlai for the review. |
What changes were proposed in this pull request?
Avoid calls to SCM during OM startup to obtain the CA list.
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-5257
How was this patch tested?
Existing docker secure tests should test this code path.