devmadhuu opened a new pull request, #5188:
URL: https://github.com/apache/ozone/pull/5188
## What changes were proposed in this pull request?
While creating a bucket link , there is no check to validate volume / bucket
exist or path is valid .
But a dummy orphan link is getting created .
IMO its good to have a check on the source volume/bucket and path being
passed in the command.
```
[root@quasar-rsyvvc-1 ~]# ozone sh bucket link --help
Usage: ozone sh bucket link [-hV] <source> <target>
creates a symlink to another bucket
<source> The bucket which the link should point to.
<target> Address of the link bucket
-h, --help Show this help message and exit.
-V, --version Print version information and exit.
[root@quasar-rsyvvc-1 ~]# ozone sh bucket link imaginaryvol1/imaginarybuck
vol111111/bucketlink
23/08/09 19:41:22 INFO rpc.RpcClient: Creating Bucket: vol111111/bucketlink,
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 volume info imaginaryvol1
VOLUME_NOT_FOUND Volume imaginaryvol1 is not found
[root@quasar-rsyvvc-1 ~]# ozone sh bucket list vol111111
[ {
"metadata" : { },
"volumeName" : "vol111111",
"name" : "buck1111",
"storageType" : "DISK",
"versioning" : false,
"usedBytes" : 3000000000,
"usedNamespace" : 1,
"creationTime" : "2023-08-09T17:23:11.534Z",
"modificationTime" : "2023-08-09T17:23:35.523Z",
"sourcePathExist" : true,
"quotaInBytes" : 8053063680,
"quotaInNamespace" : 2,
"bucketLayout" : "FILE_SYSTEM_OPTIMIZED",
"link" : false
}, {
"volumeName" : "vol111111",
"bucketName" : "bucketlink",
"sourceVolume" : "imaginaryvol1",
"sourceBucket" : "imaginarybuck",
"creationTime" : "2023-08-09T19:41:22.350Z",
"modificationTime" : "2023-08-09T19:41:22.350Z",
"owner" : "hdfs"
}
```
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-9144
## How was this patch tested?
This patch was tested using Junit test case as well as tested manually on
local docker cluster.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]