[ 
https://issues.apache.org/jira/browse/HDDS-7885?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Hemant Kumar updated HDDS-7885:
-------------------------------
    Description: 
OFS cli fails to copy keys from source bucket to destination bucket if 
destination bucket doesn't exist with exception message {*}cp: Bucket or Volume 
name has an unsupported character : _{*}.

In actual, CLI tries to create bucket when it doesn't exist with ._ COPYING _ 
extension 
[code|https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandWithDestination.java#L425].

We need to update Ozone to be compatible with Hadoop and allow copy if bucket 
doesn't exist.

Step to reproduce: Similar to 
[test|https://github.com/apache/ozone/blob/HDDS-6517-Snapshot/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOzoneSnapshotRestore.java#L196]
 * Create a source volume: *vol1* and bucket: *bucket1*
 * Add key: *key1* to */vol1/bucket1*
 * Run -cp command using OFS CLI with source path: */vol1/bucket1/key1* and 
destination path: {*}/vol1/bucket2{*}.
 * It would fail with exception message {*}cp: Bucket or Volume name has an 
unsupported character : _{*}.

This is discovered while debugging HDDS-7861, a snapshot test. During 
debugging, we passed the wrong bucket and test failed with above exception.

  was:
OFC cli fails to copy keys from source bucket to destination bucket if 
destination bucket doesn't exist with exception message {*}cp: Bucket or Volume 
name has an unsupported character : _{*}.

In actual, CLI tries to create bucket when it doesn't exist with ._ COPYING _ 
extension 
[code|https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandWithDestination.java#L425].

We need to update Ozone to be compatible with Hadoop and allow copy if bucket 
doesn't exist.

Step to reproduce: Similar to 
[test|https://github.com/apache/ozone/blob/HDDS-6517-Snapshot/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOzoneSnapshotRestore.java#L196]
 * Create a source volume: *vol1* and bucket: *bucket1*
 * Add key: *key1* to */vol1/bucket1*
 * Run -cp command using OFS CLI with source path: */vol1/bucket1/key1* and 
destination path: {*}/vol1/bucket2{*}.
 * It would fail with exception message {*}cp: Bucket or Volume name has an 
unsupported character : _{*}.

This is discovered while debugging HDDS-7861, a snapshot test. During 
debugging, we passed the wrong bucket and test failed with above exception.


> OFS CLI fail to copy form source bucket to destination bucket if destination 
> bucket doesn't exist
> -------------------------------------------------------------------------------------------------
>
>                 Key: HDDS-7885
>                 URL: https://issues.apache.org/jira/browse/HDDS-7885
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: OM
>            Reporter: Hemant Kumar
>            Priority: Major
>
> OFS cli fails to copy keys from source bucket to destination bucket if 
> destination bucket doesn't exist with exception message {*}cp: Bucket or 
> Volume name has an unsupported character : _{*}.
> In actual, CLI tries to create bucket when it doesn't exist with ._ COPYING _ 
> extension 
> [code|https://github.com/apache/hadoop/blob/trunk/hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/shell/CommandWithDestination.java#L425].
> We need to update Ozone to be compatible with Hadoop and allow copy if bucket 
> doesn't exist.
> Step to reproduce: Similar to 
> [test|https://github.com/apache/ozone/blob/HDDS-6517-Snapshot/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/om/snapshot/TestOzoneSnapshotRestore.java#L196]
>  * Create a source volume: *vol1* and bucket: *bucket1*
>  * Add key: *key1* to */vol1/bucket1*
>  * Run -cp command using OFS CLI with source path: */vol1/bucket1/key1* and 
> destination path: {*}/vol1/bucket2{*}.
>  * It would fail with exception message {*}cp: Bucket or Volume name has an 
> unsupported character : _{*}.
> This is discovered while debugging HDDS-7861, a snapshot test. During 
> debugging, we passed the wrong bucket and test failed with above exception.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to