[
https://issues.apache.org/jira/browse/HDDS-15961?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Siyao Meng updated HDDS-15961:
------------------------------
Description:
h2. Background
HDDS-15624 (PR [#10745)|https://github.com/apache/ozone/pull/10745] introduced
shared logic that resolves the source of a linked bucket and copies its
operational properties into the returned bucket information.
Two consistency gaps remain.
h2. Problem
*Source access handling*
Source properties should only be copied after confirming that the source bucket
can be accessed by the current caller. If the source cannot be resolved or
accessed, the API should return the stored information for the link bucket
without copying properties from the source.
This behavior should be consistent between {{getBucketInfo}} and
{{{}listBuckets{}}}. A single link whose source properties cannot be retrieved
should not cause the entire bucket listing to fail.
*Encryption information*
{{OmBucketInfo.withOperationalPropertiesFrom}} copies replication, layout,
quota, usage, metadata, tags, and other source properties, but it does not copy
{{{}BucketEncryptionKeyInfo{}}}.
A link bucket cannot define its own encryption key. Therefore, a link to an
encrypted source currently retains a null encryption value. RPC clients
consequently return null from {{{}OzoneBucket.getEncryptionKeyName(){}}}, and
OFS may report the linked bucket as unencrypted even though its source is
encrypted.
h2. Expected behavior
* Check access to the resolved source bucket before copying its operational
properties.
* If the source cannot be resolved or accessed, return the stored information
for the link bucket. For {{{}listBuckets{}}}, continue processing the remaining
entries.
* When the source properties can be returned, include the source bucket
encryption information along with its other operational properties.
* Preserve the link identity fields, including its volume, bucket name, owner,
source path, ACLs, timestamps, and object/update IDs.
h2. References
* HDDS-5530
was:
h2. Background
HDDS-15624 and PR [#10745|https://github.com/apache/ozone/pull/10745]
introduced shared logic that resolves the source of a linked bucket and copies
its operational properties into the returned bucket information.
Two consistency gaps remain.
h2. Problem
*Source access handling*
Source properties should only be copied after confirming that the source bucket
can be accessed by the current caller. If the source cannot be resolved or
accessed, the API should return the stored information for the link bucket
without copying properties from the source.
This behavior should be consistent between {{getBucketInfo}} and
{{listBuckets}}. A single link whose source properties cannot be retrieved
should not cause the entire bucket listing to fail.
*Encryption information*
{{OmBucketInfo.withOperationalPropertiesFrom}} copies replication, layout,
quota, usage, metadata, tags, and other source properties, but it does not copy
{{BucketEncryptionKeyInfo}}.
A link bucket cannot define its own encryption key. Therefore, a link to an
encrypted source currently retains a null encryption value. RPC clients
consequently return null from {{OzoneBucket.getEncryptionKeyName()}}, and OFS
may report the linked bucket as unencrypted even though its source is encrypted.
h2. Expected behavior
* Check access to the resolved source bucket before copying its operational
properties.
* If the source cannot be resolved or accessed, return the stored information
for the link bucket. For {{listBuckets}}, continue processing the remaining
entries.
* When the source properties can be returned, include the source bucket
encryption information along with its other operational properties.
* Preserve the link identity fields, including its volume, bucket name, owner,
source path, ACLs, timestamps, and object/update IDs.
h2. References
* [HDDS-15624|https://issues.apache.org/jira/browse/HDDS-15624]
* [Apache Ozone PR #10745|https://github.com/apache/ozone/pull/10745]
* [HDDS-5530|https://issues.apache.org/jira/browse/HDDS-5530]
> Resolve linked bucket source properties consistently in getBucketInfo and
> listBuckets
> -------------------------------------------------------------------------------------
>
> Key: HDDS-15961
> URL: https://issues.apache.org/jira/browse/HDDS-15961
> Project: Apache Ozone
> Issue Type: Bug
> Components: Ozone Manager
> Reporter: Siyao Meng
> Priority: Blocker
>
> h2. Background
> HDDS-15624 (PR [#10745)|https://github.com/apache/ozone/pull/10745]
> introduced shared logic that resolves the source of a linked bucket and
> copies its operational properties into the returned bucket information.
> Two consistency gaps remain.
> h2. Problem
> *Source access handling*
> Source properties should only be copied after confirming that the source
> bucket can be accessed by the current caller. If the source cannot be
> resolved or accessed, the API should return the stored information for the
> link bucket without copying properties from the source.
> This behavior should be consistent between {{getBucketInfo}} and
> {{{}listBuckets{}}}. A single link whose source properties cannot be
> retrieved should not cause the entire bucket listing to fail.
> *Encryption information*
> {{OmBucketInfo.withOperationalPropertiesFrom}} copies replication, layout,
> quota, usage, metadata, tags, and other source properties, but it does not
> copy {{{}BucketEncryptionKeyInfo{}}}.
> A link bucket cannot define its own encryption key. Therefore, a link to an
> encrypted source currently retains a null encryption value. RPC clients
> consequently return null from {{{}OzoneBucket.getEncryptionKeyName(){}}}, and
> OFS may report the linked bucket as unencrypted even though its source is
> encrypted.
> h2. Expected behavior
> * Check access to the resolved source bucket before copying its operational
> properties.
> * If the source cannot be resolved or accessed, return the stored
> information for the link bucket. For {{{}listBuckets{}}}, continue processing
> the remaining entries.
> * When the source properties can be returned, include the source bucket
> encryption information along with its other operational properties.
> * Preserve the link identity fields, including its volume, bucket name,
> owner, source path, ACLs, timestamps, and object/update IDs.
> h2. References
> * HDDS-5530
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]