Bug 1046211

Summary: Same error code returned for differnt errors in create volume
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Ramesh N <rnachimu>
Component: glusterfsAssignee: Bug Updates Notification Mailing List <rhs-bugs>
Status: CLOSED EOL QA Contact: storage-qa-internal <storage-qa-internal>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.1CC: vbellur
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: glusterd
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-12-03 17:13:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1046055    

Description Ramesh N 2013-12-24 05:28:43 UTC
Description of problem:

 Glusterfs returns the same error code for different errors in create volume CLI

Version-Release number of selected component (if applicable):


How reproducible:

Always
Steps to Reproduce:
1. Create a volume with bricks from root partition without using force option
2. Create a volume with invalid brick directory

Actual results:
  
  For both the cases glusterfs returns the same error code.

 For 1:

 <cliOutput>
  <opRet>-1</opRet>
  <opErrno>2</opErrno>
  <opErrstr>The brick 10.70.43.87:/bricks/v11-1 is is being created in the root partition. It is recommended that you don't use the system's root partition for storage backend. Or use 'force' at the end of the command if you want to override this behavior.</opErrstr>
</cliOutput>

For 2:

<cliOutput>
  <opRet>-1</opRet>
  <opErrno>2</opErrno>
  <opErrstr>Failed to create brick directory for brick 10.70.43.87:/brickkks/v11-1. Reason : No such file or directory </opErrstr>
</cliOutput>

  In both the cases same error code is returned though the error message is different.

Expected results:

  Glusterfs should returns different error code for different errors.

Additional info:
  Returning different error codes helps in handling the error in UI.

Comment 2 Vivek Agarwal 2015-12-03 17:13:32 UTC
Thank you for submitting this issue for consideration in Red Hat Gluster Storage. The release for which you requested us to review, is now End of Life. Please See https://access.redhat.com/support/policy/updates/rhs/

If you can reproduce this bug against a currently maintained version of Red Hat Gluster Storage, please feel free to file a new report against the current release.