[
https://issues.apache.org/jira/browse/HDDS-9139?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Sumit Agrawal updated HDDS-9139:
--------------------------------
Fix Version/s: 1.4.0
> Can't set volume space quota on volume if volume has linked bucket
> ------------------------------------------------------------------
>
> Key: HDDS-9139
> URL: https://issues.apache.org/jira/browse/HDDS-9139
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone CLI
> Reporter: Arun Sarin
> Assignee: Sumit Agrawal
> Priority: Major
> Labels: pull-request-available
> Fix For: 1.4.0
>
>
> Can't set volume space quota on volume if volume has linked bucket
> {code:java}
> [root@quasar-rsyvvc-1 ~]# vol=volbase
> [root@quasar-rsyvvc-1 ~]# buck=buckbase
> [root@quasar-rsyvvc-1 ~]# linkbuck=linkdbuck
> [root@quasar-rsyvvc-1 ~]# ozone sh volume create o3://ozone1/$vol --user root
> 23/08/09 09:39:01 INFO rpc.RpcClient: Creating Volume: volbase, with root as
> owner and space quota set to -1 bytes, counts quota set to -1
> [root@quasar-rsyvvc-1 ~]# ozone sh bucket create o3://ozone1/$vol/$buck
> --user root
> 23/08/09 09:39:07 INFO rpc.RpcClient: Creating Bucket: volbase/buckbase, with
> server-side default bucket layout, root 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
> [root@quasar-rsyvvc-1 ~]# ozone sh bucket info o3://ozone1/$vol/$buck
> {
> "metadata" : { },
> "volumeName" : "volbase",
> "name" : "buckbase",
> "storageType" : "DISK",
> "versioning" : false,
> "usedBytes" : 0,
> "usedNamespace" : 0,
> "creationTime" : "2023-08-09T09:39:07.601Z",
> "modificationTime" : "2023-08-09T09:39:07.601Z",
> "sourcePathExist" : true,
> "quotaInBytes" : -1,
> "quotaInNamespace" : -1,
> "bucketLayout" : "FILE_SYSTEM_OPTIMIZED",
> "owner" : "root",
> "link" : false
> }
> [root@quasar-rsyvvc-1 ~]# ozone sh volume info o3://ozone1/$vol
> {
> "metadata" : { },
> "name" : "volbase",
> "admin" : "hdfs",
> "owner" : "root",
> "quotaInBytes" : -1,
> "quotaInNamespace" : -1,
> "usedNamespace" : 1,
> "creationTime" : "2023-08-09T09:39:01.887Z",
> "modificationTime" : "2023-08-09T09:39:01.887Z",
> "acls" : [ {
> "type" : "USER",
> "name" : "root",
> "aclScope" : "ACCESS",
> "aclList" : [ "ALL" ]
> }, {
> "type" : "GROUP",
> "name" : "root",
> "aclScope" : "ACCESS",
> "aclList" : [ "ALL" ]
> } ],
> "refCount" : 0
> }
> [root@quasar-rsyvvc-1 ~]# ozone sh bucket setquota o3://ozone1/$vol/$buck
> --space-quota 8053063680 --namespace-quota 2
> [root@quasar-rsyvvc-1 ~]# ozone sh volume setquota o3://ozone1/$vol
> --space-quota 8053063680 --namespace-quota 2
> [root@quasar-rsyvvc-1 ~]# ozone sh bucket link $vol/$buck $vol/$linkbuck
> 23/08/09 09:39:33 INFO rpc.RpcClient: Creating Bucket: volbase/linkdbuck,
> with server-side default bucket layout, hdfs 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
> [root@quasar-rsyvvc-1 ~]# ozone sh bucket list $vol
> [ {
> "metadata" : { },
> "volumeName" : "volbase",
> "name" : "buckbase",
> "storageType" : "DISK",
> "versioning" : false,
> "usedBytes" : 0,
> "usedNamespace" : 0,
> "creationTime" : "2023-08-09T09:39:07.601Z",
> "modificationTime" : "2023-08-09T09:39:22.501Z",
> "sourcePathExist" : true,
> "quotaInBytes" : 8053063680,
> "quotaInNamespace" : 2,
> "bucketLayout" : "FILE_SYSTEM_OPTIMIZED",
> "link" : false
> }, {
> "volumeName" : "volbase",
> "bucketName" : "linkdbuck",
> "sourceVolume" : "volbase",
> "sourceBucket" : "buckbase",
> "creationTime" : "2023-08-09T09:39:33.320Z",
> "modificationTime" : "2023-08-09T09:39:33.320Z",
> "owner" : "hdfs"
> } ]
> [root@quasar-rsyvvc-1 ~]# ozone sh volume setquota o3://ozone1/$vol
> --space-quota 8053063680 --namespace-quota 3
> QUOTA_ERROR Can not set volume space quota on volume as some of buckets in
> this volume have no quota set. {code}
> Steps to Repro :
> {code:java}
> vol=volbase
> buck=buckbase
> linkbuck=linkdbuck
> ozone sh volume create o3://ozone1/$vol --user root
> ozone sh bucket create o3://ozone1/$vol/$buck --user root
> ozone sh bucket info o3://ozone1/$vol/$buck
> ozone sh volume info o3://ozone1/$vol
> ozone sh bucket setquota o3://ozone1/$vol/$buck --space-quota 8053063680
> --namespace-quota 2
> ozone sh volume setquota o3://ozone1/$vol --space-quota 8053063680
> --namespace-quota 2
> ozone sh bucket link $vol/$buck $vol/$linkbuck
> ozone sh bucket list $vol
> ozone sh volume setquota o3://ozone1/$vol --space-quota 8053063680
> --namespace-quota 3 {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]