You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/05/20 10:29:09 UTC
[GitHub] [ozone] bharatviswa504 opened a new pull request #2273: HDDS-5257. Avoid SCM call to get CA certs in non-HA from OM.
bharatviswa504 opened a new pull request #2273:
URL: https://github.com/apache/ozone/pull/2273
## 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-ha tests should test this code path.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2273: HDDS-5257. Avoid SCM call to get CA certs in non-HA from OM.
Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #2273:
URL: https://github.com/apache/ozone/pull/2273#discussion_r635995910
##########
File path: hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HAUtils.java
##########
@@ -387,7 +387,16 @@ public static File getMetaDir(DBDefinition definition,
waitForCACerts(certClient::updateCAList, expectedCount),
waitDuration);
} else {
- caCertPemList = certClient.listCA();
+ List<String> x509Certificates = new ArrayList<>();
Review comment:
Did little refactor, have a look at latest change
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] bharatviswa504 commented on pull request #2273: HDDS-5257. Avoid SCM call to get CA certs in non-HA from OM.
Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on pull request #2273:
URL: https://github.com/apache/ozone/pull/2273#issuecomment-845635368
Thank You @bshashikant @xiaoyuyao and @adoroszlai for the review.
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2273: HDDS-5257. Avoid SCM call to get CA certs in non-HA from OM.
Posted by GitBox <gi...@apache.org>.
bharatviswa504 commented on a change in pull request #2273:
URL: https://github.com/apache/ozone/pull/2273#discussion_r635995716
##########
File path: hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HAUtils.java
##########
@@ -387,7 +387,16 @@ public static File getMetaDir(DBDefinition definition,
waitForCACerts(certClient::updateCAList, expectedCount),
waitDuration);
} else {
- caCertPemList = certClient.listCA();
+ List<String> x509Certificates = new ArrayList<>();
+ if (certClient.getRootCACertificate() != null) {
+ x509Certificates.add(CertificateCodec.getPEMEncodedString(
+ certClient.getRootCACertificate()));
+ }
+ if (certClient.getCACertificate() != null) {
+ x509Certificates.add(CertificateCodec.getPEMEncodedString(
+ certClient.getCACertificate()));
+ }
Review comment:
Ya just found out, and did that
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] bharatviswa504 merged pull request #2273: HDDS-5257. Avoid SCM call to get CA certs in non-HA from OM.
Posted by GitBox <gi...@apache.org>.
bharatviswa504 merged pull request #2273:
URL: https://github.com/apache/ozone/pull/2273
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org
[GitHub] [ozone] adoroszlai commented on a change in pull request #2273: HDDS-5257. Avoid SCM call to get CA certs in non-HA from OM.
Posted by GitBox <gi...@apache.org>.
adoroszlai commented on a change in pull request #2273:
URL: https://github.com/apache/ozone/pull/2273#discussion_r635986066
##########
File path: hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HAUtils.java
##########
@@ -387,7 +387,16 @@ public static File getMetaDir(DBDefinition definition,
waitForCACerts(certClient::updateCAList, expectedCount),
waitDuration);
} else {
- caCertPemList = certClient.listCA();
+ List<String> x509Certificates = new ArrayList<>();
+ if (certClient.getRootCACertificate() != null) {
+ x509Certificates.add(CertificateCodec.getPEMEncodedString(
+ certClient.getRootCACertificate()));
+ }
+ if (certClient.getCACertificate() != null) {
+ x509Certificates.add(CertificateCodec.getPEMEncodedString(
+ certClient.getCACertificate()));
+ }
Review comment:
Can we extract a method and reuse it here in and `!SCMHAUtils.isSCMHAEnabled` case?
##########
File path: hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/HAUtils.java
##########
@@ -387,7 +387,16 @@ public static File getMetaDir(DBDefinition definition,
waitForCACerts(certClient::updateCAList, expectedCount),
waitDuration);
} else {
- caCertPemList = certClient.listCA();
+ List<String> x509Certificates = new ArrayList<>();
Review comment:
Why define a separate list instead of using `caCertPemList`, like other `if` branches?
--
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.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org