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

Dinesh Chitlangia updated HDDS-598:
-----------------------------------
    Summary: Volume Delete operation fails if volume name is not prefixed with 
/  (was: Volume Delete operation fails if volume name is not suffixed with /)

> Volume Delete operation fails if volume name is not prefixed with /
> -------------------------------------------------------------------
>
>                 Key: HDDS-598
>                 URL: https://issues.apache.org/jira/browse/HDDS-598
>             Project: Hadoop Distributed Data Store
>          Issue Type: Bug
>            Reporter: Hanisha Koneru
>            Priority: Blocker
>              Labels: newbie
>
> If we try to delete a volume without specifying the leading '/', then the 
> delete operation fails
> {code:java}
> $ bin/ozone sh volume create vol1 -u xyz
> $ bin/ozone sh volume delete vol1
> Delete Volume failed, error:VOLUME_NOT_FOUND
> $ bin/ozone sh volume delete /vol1
> Volume vol1 is deleted{code}
> In {{DeleteVolumeHandler.java}}, the first character in volume name is 
> skipped.
> {code:java}
> // we need to skip the slash in the URI path
> String volumeName = ozoneURI.getPath().substring(1);{code}
> We should only skip the leading /'s while interpreting the volume name. 
> Similar to how we interpret volume name in CreateVolumeHandler.
> {code:java}
> String volumeName = ozoneURI.getPath().replaceAll("^/+", "");{code}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org

Reply via email to