jojochuang commented on code in PR #6219:
URL: https://github.com/apache/ozone/pull/6219#discussion_r1490270826
##########
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/request/file/OMFileCreateRequest.java:
##########
@@ -250,6 +251,12 @@ public OMClientResponse
validateAndUpdateCache(OzoneManager ozoneManager, TermIn
omBucketInfo.getDefaultReplicationConfig(),
ozoneManager);
+ if (omBucketInfo.getEncryptionKeyInfo() != null &&
+ !keyArgs.hasFileEncryptionInfo()) {
+ throw new OMException("Attempting to create unencrypted file " +
+ keyName + " in encrypted bucket " + bucketName, INTERNAL_ERROR);
+ }
Review Comment:
These request handlers don't have a consistent way to resolve OmBucketInfo
from bucket name. Opened
https://issues.apache.org/jira/browse/HDDS-10380 to fix it.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]