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/10/22 05:12:22 UTC

[GitHub] [ozone] bharatviswa504 commented on a change in pull request #2752: HDDS-5863. Error message having null fields on volume creation

bharatviswa504 commented on a change in pull request #2752:
URL: https://github.com/apache/ozone/pull/2752#discussion_r734239059



##########
File path: hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/OzoneManager.java
##########
@@ -2113,16 +2113,20 @@ public boolean checkAcls(OzoneObj obj, RequestContext context,
 
     if (!accessAuthorizer.checkAccess(obj, context)) {
       if (throwIfPermissionDenied) {
+        String volumeName = obj.getVolumeName() != null?
+                "Volume:" + obj.getVolumeName() + " ": "";
+        String bucketName = obj.getBucketName() != null?
+                "Bucket:" + obj.getBucketName() + " ": "";
+        String keyName = obj.getKeyName() != null?
+                "Key:" + obj.getKeyName() : "";
         LOG.warn("User {} doesn't have {} permission to access {} /{}/{}/{}",

Review comment:
       Minor NIT: Do we need similar thing in logging? As now log will show /vol// when bucket and key is null.




-- 
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: issues-unsubscribe@ozone.apache.org

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