-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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-1946. CertificateClient should not persist keys/certs to ozone.m… #1311
Conversation
/label ozone |
@anuengineer @avijayanhwx @swagle @xiaoyuyao Please review when you find time |
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
...c/main/java/org/apache/hadoop/hdds/security/x509/certificate/client/DNCertificateClient.java
Outdated
Show resolved
Hide resolved
...c/main/java/org/apache/hadoop/hdds/security/x509/certificate/client/OMCertificateClient.java
Outdated
Show resolved
Hide resolved
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.
Do we need to do something for the key location also?
@bharatviswa504 Thanks for the review! I have updated the patch to include component name in the key location as well. |
💔 -1 overall
This message was automatically generated. |
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.
Over all LGTM.
Can we remove the KeyCodec constructor with only configs? I see this is being used only in tests. With this, we can eliminate the chances of not passing the component name to codec and face the issue provided in Jira. If you feel there is a need for this, we can leave it for now.
💔 -1 overall
This message was automatically generated. |
Thanks @vivekratnavel for working on this. The changes look good to me overall with two issues:
|
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
The test failure in TestSecureContainerServer seems related. Can you take a look @vivekratnavel |
Hi @xiaoyuyao I checked the cause of failure for this integration test
|
Created https://issues.apache.org/jira/browse/HDDS-2040 to track the integration test failure. |
💔 -1 overall
This message was automatically generated. |
hadoop-hdds/client/src/main/java/org/apache/hadoop/hdds/scm/XceiverClientGrpc.java
Show resolved
Hide resolved
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 overall. Just have one question comment inline.
…etadata.dir
The issue was that when OM and SCM are deployed on the same host with ozone.metadata.dir defined. SCM can start successfully but OM can not because the key/cert from OM will collide with SCM.
The solution implemented in this patch is to store certs in a sub directory inside ozone.metadata.dir based on the component. Ozone Manager will store its certs in
${ozone.metadata.dir}/om/certs
and Datanode will store in${ozone.metadata.dir}/dn/certs
to avoid conflicts. This solution was discussed with @anuengineer and I thank him for his guidance.Testing done:
I tested the patch in docker containers and verified that certs are now stored in
${ozone.metadata.dir}/${component}/certs
path. I modified the unit tests and verified that all unit tests pass.