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 2022/06/23 22:29:56 UTC

[GitHub] [ozone] GeorgeJahad opened a new pull request, #3543: HDDS 6941. Setting Bucket Property can corrupt bucket layout.

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

   ## What changes were proposed in this pull request?
   
   
   
   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 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:26:47.091Z",
     "quotaInBytes" : -1,
     "quotaInNamespace" : -1,
     "bucketLayout" : "FILE_SYSTEM_OPTIMIZED",
     "owner" : "root",
     "link" : false
   }
   
   ozone sh bucket setquota --namespace-quota=20 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.
   
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-6941
   
   ## How was this patch tested?
   
   added unit test


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


[GitHub] [ozone] nandakumar131 merged pull request #3543: HDDS-6941. Setting Bucket Property can corrupt bucket layout.

Posted by GitBox <gi...@apache.org>.
nandakumar131 merged PR #3543:
URL: https://github.com/apache/ozone/pull/3543


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