You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "Nandakumar (Jira)" <ji...@apache.org> on 2022/06/24 07:55:00 UTC
[jira] [Commented] (HDDS-6941) Setting Bucket Property can corrupt bucket layout
[ https://issues.apache.org/jira/browse/HDDS-6941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17558374#comment-17558374 ]
Nandakumar commented on HDDS-6941:
----------------------------------
Thanks [~georgeJahad] for reporting it and working on the same.
The PR has been merged to master.
> Setting Bucket Property can corrupt bucket layout
> -------------------------------------------------
>
> Key: HDDS-6941
> URL: https://issues.apache.org/jira/browse/HDDS-6941
> Project: Apache Ozone
> Issue Type: Improvement
> Reporter: George Jahad
> Assignee: George Jahad
> Priority: Major
> Labels: pull-request-available
>
> A member of our dev ops team discovered that setting a quota on a non legacy bucket will convert it to a legacy bucket, making the data there inaccessible.
> You can reproduce the problem like so:
> {{ozone sh volume create testgbj}}
> {{ozone sh bucket create -l FILE_SYSTEM_OPTIMIZED testgbj/fsobucket4}}
> {{ozone sh bucket setquota --namespace-quota=20 testgbj/fsobucket4}}
> ozone sh bucket info testgbj/fsobucket4
> {\{{}}
> {{ "metadata" : \{ },}}
> {{ "volumeName" : "testgbj",}}
> {{ "name" : "fsobucket4",}}
> {{ "storageType" : "DISK",}}
> {{ "versioning" : false,}}
> {{ "usedBytes" : 0,}}
> {{ "usedNamespace" : 0,}}
> {{ "creationTime" : "2022-06-23T21:26:47.091Z",}}
> {{ "modificationTime" : "2022-06-23T21:27:48.255Z",}}
> {{ "quotaInBytes" : -1,}}
> {{ "quotaInNamespace" : 20,}}
> {{ "bucketLayout" : "LEGACY",}}
> {{ "replicationConfig" : {}}
> {{ "replicationFactor" : "ONE",}}
> {{ "requiredNodes" : 1,}}
> {{ "replicationType" : "RATIS"}}
> {{ },}}
> {{ "link" : false}}
> {{}}}
>
> The problem is that validateAndUpdateCache() method in OMBucketSetPropertyRequest.java creates a copy of the OmBucketInfo with the new property set, but leaves the bucket layout as the default, instead of copying it over.
> Fix appears to be just to set the layout explicitly.
--
This message was sent by Atlassian Jira
(v8.20.7#820007)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org