Siddhant Sangwan created HDDS-5901:
--------------------------------------

             Summary: Delete on volume/bucket throws fatal error on ofs
                 Key: HDDS-5901
                 URL: https://issues.apache.org/jira/browse/HDDS-5901
             Project: Apache Ozone
          Issue Type: Bug
          Components: Ozone Filesystem
            Reporter: Siddhant Sangwan
            Assignee: Siddhant Sangwan


Recursive delete
{code}
ozone fs -rm -R ofs://ozone1/absdf
{code}
on a volume or bucket gives the following fatal error as no trash is configured 
at root level.

{code}
-rm: Fatal internal error
java.lang.RuntimeException: Volume or bucket doesn't have trash root.
        at org.apache.hadoop.ozone.OFSPath.getTrashRoot(OFSPath.java:298)
        at 
org.apache.hadoop.fs.ozone.BasicRootedOzoneFileSystem.getTrashRoot(BasicRootedOzoneFileSystem.java:727)
        at 
org.apache.hadoop.fs.TrashPolicyDefault.moveToTrash(TrashPolicyDefault.java:134)
        at org.apache.hadoop.fs.Trash.moveToTrash(Trash.java:110)
        at org.apache.hadoop.fs.Trash.moveToAppropriateTrash(Trash.java:96)
        at org.apache.hadoop.fs.shell.Delete$Rm.moveToTrash(Delete.java:153)
        at org.apache.hadoop.fs.shell.Delete$Rm.processPath(Delete.java:118)
        at 
org.apache.hadoop.fs.shell.Command.processPathInternal(Command.java:367)
        at org.apache.hadoop.fs.shell.Command.processPaths(Command.java:331)
        at 
org.apache.hadoop.fs.shell.Command.processPathArgument(Command.java:304)
        at org.apache.hadoop.fs.shell.Command.processArgument(Command.java:286)
        at org.apache.hadoop.fs.shell.Command.processArguments(Command.java:270)
        at 
org.apache.hadoop.fs.shell.FsCommand.processRawArguments(FsCommand.java:120)
        at org.apache.hadoop.fs.shell.Command.run(Command.java:177)
        at org.apache.hadoop.fs.FsShell.run(FsShell.java:328)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:76)
        at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:90)
        at org.apache.hadoop.fs.ozone.OzoneFsShell.main(OzoneFsShell.java:81)
{code}

This problems has been handled when the Trash policy is {{TrashPolicyOzone}} 
(in [HDDS-5175|https://issues.apache.org/jira/browse/HDDS-5175]), but not for 
{{TrashPolicyDefault}}. A possible solution is to make {{TrashPolicyOzone}} the 
default Trash policy.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to