Hanisha Koneru created HDDS-598: ----------------------------------- Summary: 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
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-dev-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-dev-h...@hadoop.apache.org