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

   ## What changes were proposed in this pull request?
   Currently `ozone fs -mkdir` command doesn't throw an error message is key 
path starts with `.snapshot` and create `.snapshot` dir. `.snapshot` dir under 
bucket is reserved for snapshot and should not be allowed to be created using 
`ozone fs -mkdir` and `ozone sh`.
   `ozone sh` throws an exception is key starts with `.snapshot` dir but `ozone 
fs` doesn't because it doesn't share the same code path to create key and file 
and dir can be create independently.
   This change is to check dir name similar to key and file creation.
   
   ## What is the link to the Apache JIRA
   HDDS-9422
   
   ## How was this patch tested?
   Tested it on docker
   ```
   sh-4.2$ ozone fs -mkdir -p ofs://om/vol1/bucket1/.snapshot/key1
   mkdir: Cannot create key under path reserved for snapshot: .snapshot/
   sh-4.2$
   ```
   


-- 
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