[ 
https://issues.apache.org/jira/browse/HDDS-11348?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17876914#comment-17876914
 ] 

Tanvi Penumudy commented on HDDS-11348:
---------------------------------------

The patch causing the regression skips the getBucket() check when we already 
know that the bucket exists, but this also results in skipping of the 
validation check on the client-side. The only way we can restrict the operation 
from the client-side is to make the getBucket() call (an additional round trip 
to OM to obtain this layout information - that the patch skips).

Therefore, I think the only way to go about this is to revert this patch.

On the server-side, we do not throw any exception as such (if we did, we might 
have been able to handle it on the client-side for OBS buckets accordingly). 
So, I do not think it's possible to address this situation without having to 
change the server-side behaviour, especially if we want to avoid the additional 
getBucket() call on the client side.

> 'fs -mkdir' is creating directories for OBS type bucket
> -------------------------------------------------------
>
>                 Key: HDDS-11348
>                 URL: https://issues.apache.org/jira/browse/HDDS-11348
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: Ozone Filesystem
>            Reporter: Jyotirmoy Sinha
>            Assignee: Tanvi Penumudy
>            Priority: Major
>
> 'fs -mkdir' is creating directories for OBS type bucket
> Other fs operations such as _ls_ and _copyfromLocal_ are throwing unsupported 
> file semantics error -
> {code:java}
> -copyFromLocal: Bucket: buck1 has layout: OBJECT_STORE, which does not 
> support file system semantics. Bucket Layout must be FILE_SYSTEM_OPTIMIZED or 
> LEGACY. {code}
> {code:java}
> -ls: Bucket: buck1 has layout: OBJECT_STORE, which does not support file 
> system semantics. Bucket Layout must be FILE_SYSTEM_OPTIMIZED or LEGACY. 
> {code}
> Its working correctly with _mkdir_ operation -
> {code:java}
> # ozone sh volume create vol1
> 24/08/21 04:57:58 INFO rpc.RpcClient: Creating Volume: vol1, with om as owner 
> and space quota set to -1 bytes, counts quota set to -1
> # ozone sh bucket create vol1/buck1 -l OBJECT_STORE
> 24/08/21 04:58:19 INFO rpc.RpcClient: Creating Bucket: vol1/buck1, with 
> bucket layout OBJECT_STORE, om as owner, Versioning false, Storage Type set 
> to DISK and Encryption set to false, Replication Type set to server-side 
> default replication type, Namespace Quota set to -1, Space Quota set to -1
> # ozone sh bucket info vol1/buck1
> {
>   "metadata" : { },
>   "volumeName" : "vol1",
>   "name" : "buck1",
>   "storageType" : "DISK",
>   "versioning" : false,
>   "listCacheSize" : 1000,
>   "usedBytes" : 0,
>   "usedNamespace" : 0,
>   "creationTime" : "2024-08-21T04:58:19.184Z",
>   "modificationTime" : "2024-08-21T04:58:19.184Z",
>   "sourcePathExist" : true,
>   "quotaInBytes" : -1,
>   "quotaInNamespace" : -1,
>   "bucketLayout" : "OBJECT_STORE",
>   "owner" : "om",
>   "link" : false
> }
> # ozone fs -mkdir -p ofs://ozone1724175935/vol1/buck1/dir1
> # ozone fs -mkdir ofs://ozone1724175935/vol1/buck1/dir2
> # ozone sh key ls vol1/buck1
> [ {
>   "volumeName" : "vol1",
>   "bucketName" : "buck1",
>   "name" : "dir1/",
>   "owner" : "om",
>   "dataSize" : 0,
>   "creationTime" : "2024-08-21T04:59:05.563Z",
>   "modificationTime" : "2024-08-21T04:59:05.563Z",
>   "replicationConfig" : {
>     "replicationFactor" : "THREE",
>     "requiredNodes" : 3,
>     "replicationType" : "RATIS"
>   },
>   "metadata" : { },
>   "tags" : { },
>   "file" : false
> }, {
>   "volumeName" : "vol1",
>   "bucketName" : "buck1",
>   "name" : "dir2/",
>   "owner" : "om",
>   "dataSize" : 0,
>   "creationTime" : "2024-08-21T05:03:40.704Z",
>   "modificationTime" : "2024-08-21T05:03:40.704Z",
>   "replicationConfig" : {
>     "replicationFactor" : "THREE",
>     "requiredNodes" : 3,
>     "replicationType" : "RATIS"
>   },
>   "metadata" : { },
>   "tags" : { },
>   "file" : false
> } ] {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to