Skip to content

Conversation

@bharatviswa504
Copy link
Contributor

@bharatviswa504 bharatviswa504 commented May 20, 2021

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.

@bharatviswa504 bharatviswa504 requested review from adoroszlai, bshashikant and xiaoyuyao and removed request for bshashikant May 20, 2021 10:30
waitDuration);
} else {
caCertPemList = certClient.listCA();
List<String> x509Certificates = new ArrayList<>();
Copy link
Contributor

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?

Copy link
Contributor Author

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

Comment on lines 391 to 398
if (certClient.getRootCACertificate() != null) {
x509Certificates.add(CertificateCodec.getPEMEncodedString(
certClient.getRootCACertificate()));
}
if (certClient.getCACertificate() != null) {
x509Certificates.add(CertificateCodec.getPEMEncodedString(
certClient.getCACertificate()));
}
Copy link
Contributor

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?

Copy link
Contributor Author

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

@bharatviswa504 bharatviswa504 requested a review from adoroszlai May 20, 2021 10:59
@adoroszlai adoroszlai dismissed their stale review May 20, 2021 13:45

Thanks for updating the patch

Copy link
Contributor

@xiaoyuyao xiaoyuyao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, +1.

@bharatviswa504 bharatviswa504 merged commit 09c2278 into apache:master May 21, 2021
@bharatviswa504
Copy link
Contributor Author

Thank You @bshashikant @xiaoyuyao and @adoroszlai for the review.

bharatviswa504 added a commit to bharatviswa504/hadoop-ozone that referenced this pull request Jul 25, 2021
…2273)

(cherry picked from commit 09c2278)
Change-Id: I5385f4c7f8428f0ceed2dca57a5b623f6d3a9f12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants