[
https://issues.apache.org/jira/browse/HDDS-13074?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tanvi Penumudy resolved HDDS-13074.
-----------------------------------
Resolution: Won't Fix
As discussed in PR [#8481|https://github.com/apache/ozone/pull/8481], we can
think of linked buckets as analogous to symbolic links in a traditional
filesystem, where a symlink may point to a non-existent source (i.e., a
dangling link).
With this change, we also need to prevent deletion of a bucket if any links
reference it. However, implementing this is challenging since we currently lack
a reverse mapping for it.
> Prevent linked buckets creation when source volume and/or bucket is missing
> ---------------------------------------------------------------------------
>
> Key: HDDS-13074
> URL: https://issues.apache.org/jira/browse/HDDS-13074
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone CLI
> Affects Versions: 2.0.0
> Reporter: Tanvi Penumudy
> Assignee: Tanvi Penumudy
> Priority: Major
> Labels: pull-request-available
>
> Currently, we allow the creation of linked buckets even if the source volume
> and/or bucket is missing. This should be prevented, and an appropriate
> IOException must be thrown to indicate the missing source volume or bucket.
> Current behaviour:
> {code}
> // source volume does not exist
> bash-4.4$ ozone sh volume info vol2
> VOLUME_NOT_FOUND Volume vol2 is not found
> // link bucket creation succeeds
> bash-4.4$ ozone sh bucket link vol2/buck1 vol1/buck2
> bash-4.4$ ozone sh bucket info vol1/buck2
> {
> "volumeName" : "vol1",
> "name" : "buck2",
> "sourceVolume" : "vol2",
> "sourceBucket" : "buck1",
> "creationTime" : "2025-05-19T16:01:36.891Z",
> "modificationTime" : "2025-05-19T16:01:36.891Z",
> "owner" : "hadoop",
> "link" : true
> }
> // create source volume
> bash-4.4$ ozone sh volume create vol2
> // source volume exists but source bucket does not exist
> bash-4.4$ ozone sh bucket info vol2/buck1
> BUCKET_NOT_FOUND Bucket not found: vol2/buck1
> // link bucket creation succeeds
> bash-4.4$ ozone sh bucket link vol2/buck1 vol1/buck3
> bash-4.4$ ozone sh bucket info vol1/buck3
> {
> "volumeName" : "vol1",
> "name" : "buck3",
> "sourceVolume" : "vol2",
> "sourceBucket" : "buck1",
> "creationTime" : "2025-05-19T16:03:18.932Z",
> "modificationTime" : "2025-05-19T16:03:18.932Z",
> "owner" : "hadoop",
> "link" : true
> }
> {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]