xBis7 opened a new pull request, #3750:
URL: https://github.com/apache/ozone/pull/3750

   ## What changes were proposed in this pull request?
   
   While creating a bucket without specifying the bucket layout, OM logs 
display only the ozone default bucket layout which is currently LEGACY. `bucket 
info` displays the correct bucket layout. The logs ignore the layout if it’s 
specified in the ozone configuration. If we specify a bucket layout while 
issuing the `bucket create` command or don’t declare a layout in the 
configuration then the correct layout is logged.
   
   This issue was first noticed while creating an encrypted bucket but it 
appears even with a non encrypted one.
   
   You can reproduce this issue in a docker based cluster like so
   <br/>
   while in `compose/ozone` edit `docker-config` and add 
   ```
   OZONE-SITE.XML_ozone.default.bucket.layout=FILE_SYSTEM_OPTIMIZED
   ```
   
   ```
   $ docker-compose up –scale datanode=3 -d
   $ docker exec -it ozone_om_1 bash
   bash-4.2$ ozone sh volume create /vol
   bash-4.2$ ozone sh bucket create /vol/buck
   bash-4.2$ ozone sh bucket info /vol/buck
   {
     "metadata" : { },
     "volumeName" : "vol",
     "name" : "buck",
     "storageType" : "DISK",
     "versioning" : false,
     "usedBytes" : 0,
     "usedNamespace" : 0,
     "creationTime" : "2022-09-12T17:11:15.175Z",
     "modificationTime" : "2022-09-12T17:11:15.175Z",
     "quotaInBytes" : -1,
     "quotaInNamespace" : -1,
     "bucketLayout" : "FILE_SYSTEM_OPTIMIZED",
     "owner" : "hadoop",
     "link" : false
   }
   bash-4.2$ exit
   $ docker logs ozone_om_1
   [OM StateMachine ApplyTransaction Thread - 0] INFO 
bucket.OMBucketCreateRequest: created bucket: buck of layout LEGACY in volume: 
vol
   ```
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-7217
   
   ## How was this patch tested?
   
   This patch was tested manually in a docker based cluster. Furthermore, added 
a new unit test in `TestOMBucketCreateRequestWithFSO`. The existing unit tests 
were initialized with a client version 0 and were using a layout that was 
either the system default or defined in the command request . The new one 
checks the case where we are using the latest client version and we create a 
bucket request while getting the bucket layout from the configuration file. We 
are comparing the request layout to the configuration layout and to the cache 
layout.
   


-- 
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]

Reply via email to