[
https://issues.apache.org/jira/browse/HDDS-598?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Anu Engineer resolved HDDS-598.
-------------------------------
Resolution: Duplicate
[~hanishakoneru] Thanks for filing this issue. I believe that this is possibly
a duplicate of HDDS-568. My apologies that the title of 568 is not as clear as
it should be.
> Volume Delete operation fails if volume name is not suffixed 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: [email protected]
For additional commands, e-mail: [email protected]