sravani-revuri opened a new pull request, #9749:
URL: https://github.com/apache/ozone/pull/9749

   
   ## What changes were proposed in this pull request?
   The current error message for ofs rename failures is generic and confusing 
when moving paths across different volumes or when moving volumes themselves.
   
   Examples:
   
   Moving across volumes
   ```
   [root@node ~]# ozone fs -mv ofs://cluster/vol1/buck1 ofs://cluster/vol2/buck2
   mv: Cannot rename a key to a different bucket
   ```
   Moving a volume
   ```
   [root@node ~]# ozone fs -mv ofs://cluster/vol1 ofs://cluster/vol2
   mv: Cannot rename a key to a different bucket
   ```
   In these scenarios, the message "Cannot rename a key to a different bucket" 
is inaccurate or misleading to the user.
   
   Proposed Change:
   Update the IOException message to be more descriptive:
   "Cannot rename across different volumes or buckets. Only supported within 
the same bucket."
   
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-14616
   
   (Please replace this section with the link to the Apache JIRA)
   
   ## How was this patch tested?
   
   Manually tested with the mv command.
   ```
   bash-5.1$ ozone fs -mv ofs://om/vol1/buck1 ofs://om/vol2/buck2
   mv: Cannot rename across different volumes or buckets. Only supported within 
the same bucket.
   bash-5.1$ ozone fs -mv ofs://om/vol1 ofs://om/vol2      
   mv: Cannot rename across different volumes or buckets. Only supported within 
the same bucket.
   ```


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