hemantk-12 opened a new pull request, #5814:
URL: https://github.com/apache/ozone/pull/5814

   ## What changes were proposed in this pull request?
   Snapshots are readable only and don't support deletion of key from 
snapshots. Currently exception is thrown but exception message is not clear. It 
says `Key not found .snapshot/snap1` for ozone shell and `Unable to get file 
status: volume: vol1 bucket: buck1 key: .snapshot/snap1` for ozone fs command.
   This change is to correct exception message and properly return it to client.
   
   ## What is the link to the Apache JIRA
   HDDS-9423
   
   ## How was this patch tested?
   1. Added/updated unit tests.
   1. Tested in docker:
   ```
   sh-4.2$ ozone sh key delete vol1/bucket1/.snapshot/snap1
   Operation not permitted Cannot delete key under path reserved for snapshot: 
.snapshot/ 
   sh-4.2$ ozone sh key delete vol1/bucket1/.snapshot/snap1/key1
   Operation not permitted Cannot delete key under path reserved for snapshot: 
.snapshot/ 
   sh-4.2$ ozone sh key delete vol1/bucket1/.snapshot/snap1/key1
   Operation not permitted Cannot delete key under path reserved for snapshot: 
.snapshot/ 
   sh-4.2$ ozone fs -rm -r -f -skipTrash ofs://om/vol1/bucket1/.snapshot/snap1
   rm: `Cannot delete key under path reserved for snapshot: .snapshot/': 
Operation not permitted
   sh-4.2$ ozone fs -rm -r -f -skipTrash 
ofs://om/vol1/bucket1/.snapshot/snap1/key1
   rm: `Cannot delete key under path reserved for snapshot: .snapshot/': 
Operation not permitted
   ```
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to