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

Elek, Marton updated HDDS-766:
------------------------------
    Resolution: Fixed
        Status: Resolved  (was: Patch Available)

Thanks the contribution [~candychencan].

It looks good to me.

Tested with docker based cluster and worked well:

{code}
ozone sh volume create qwe
2018-11-22 14:37:34 INFO  RpcClient:224 - Creating Volume: qwe, with hadoop as 
owner and quota set to 1152921504606846976 bytes.

ozone sh bucket create qwe/qwe
2018-11-22 14:37:43 INFO  RpcClient:353 - Creating Bucket: qwe/qwe, with 
Versioning false and Storage Type set to DISK

ozone sh bucket create /qwe/qwe
2018-11-22 14:37:48 INFO  RpcClient:353 - Creating Bucket: qwe/qwe, with 
Versioning false and Storage Type set to DISK
Bucket creation failed, error: BUCKET_ALREADY_EXISTS
{code}

Will commit it to the trunk soon... 

> Ozone shell create volume fails if volume name does not have a leading slash
> ----------------------------------------------------------------------------
>
>                 Key: HDDS-766
>                 URL: https://issues.apache.org/jira/browse/HDDS-766
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>            Reporter: Hanisha Koneru
>            Assignee: chencan
>            Priority: Major
>              Labels: newbie
>         Attachments: HDDS-766.001.patch, HDDS-766.003.patch, 
> HDDS-766.004.patch
>
>
> After HDDS-682, volume creation through shell fails if the volume name does 
> not have leading slash.
> {code:java}
> $ ./ozone sh volume create volume1
> Volume name is required
> $ ./ozone sh volume create /volume1
> 2018-10-30 14:07:58,078 INFO rpc.RpcClient: Creating Volume: volume1, with 
> hdds as owner and quota set to 1152921504606846976 bytes.{code}
> In {{OzoneAddress#stringToUri}}, when creating a new URI, the path parameter 
> is expected to have a leading slash. Otherwise, the path gets mixed with the 
> authority.
> To fix this, we should add a leading slash to the path variable, if it does 
> not exist, before constructing the URI object.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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

Reply via email to