XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.3.0
    • None

    Description

      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.

      Attachments

        Issue Links

          Activity

            People

              georgeJahad George Jahad
              georgeJahad George Jahad
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: