Bug 1196607 - Any op on files in the root directory of the volume fails unless absolute path is specified.
Summary: Any op on files in the root directory of the volume fails unless absolute pat...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: glusterfs-devel
Version: rhgs-3.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: RHGS 3.0.4
Assignee: Poornima G
QA Contact: Nag Pavan Chilakam
URL:
Whiteboard:
Depends On: 1196019
Blocks: 1104039 1182947
TreeView+ depends on / blocked
 
Reported: 2015-02-26 11:12 UTC by rjoseph
Modified: 2015-05-13 17:53 UTC (History)
11 users (show)

Fixed In Version: glusterfs-3.6.0.48-1
Doc Type: Bug Fix
Doc Text:
Clone Of: 1196019
Environment:
Last Closed: 2015-03-26 06:36:35 UTC
Embargoed:


Attachments (Terms of Use)
Test script (10.04 KB, text/plain)
2015-03-11 09:40 UTC, Poornima G
no flags Details
QE log (2.43 MB, text/plain)
2015-03-12 08:15 UTC, Nag Pavan Chilakam
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:0682 0 normal SHIPPED_LIVE Red Hat Storage 3.0 enhancement and bug fix update #4 2015-03-26 10:32:55 UTC

Description rjoseph 2015-02-26 11:12:54 UTC
+++ This bug was initially created as a clone of Bug #1196019 +++

Description of problem:
If a test case is as follows: 
....
fs = glfs_init();
....
glfs_mkdir(fs, "dir1", 0755); /* dir1 being relative to the root of the volume*/
...
glfs_fini();

The above test case fails for the below reason:

glfs_init() does not set the cwd to be "/", Hence with this patch the expectation would be that the path should be absolute always for a file directory under "/". i.e. the below statement succeeds:
    glfs_mkdir (fs, "/dir1", 0755);
Expecting absolute patch for any file directly under "/", may break the existing users.

Two possible fixes:

In glfs_init(), set fs->cwd to "/", not sure if there can be other cases where it can be unset.
In glfs_resolve_path() even if glfs_cwd_get() returns NULL, call priv_glfs_resolve_at() as it handles that case.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Anand Avati on 2015-02-25 06:20:28 EST ---

REVIEW: http://review.gluster.org/9744 (libgfapi: In glfs_init() set the cwd to "/".) posted (#1) for review on master by Poornima G (pgurusid)

Comment 6 Poornima G 2015-03-11 09:40:25 UTC
Created attachment 1000324 [details]
Test script

To run:
gcc -lgfapi bug-1196607.c -o bug-1196607
./bug-1196607 <volume name> <log file location>

Comment 7 Nag Pavan Chilakam 2015-03-12 08:15:05 UTC
Created attachment 1000854 [details]
QE log

Comment 8 Nag Pavan Chilakam 2015-03-12 08:16:34 UTC
Verified the bug using script provided by dev and ran it successfully.
marking it as pass
ran on 3.0.4.48u

Comment 10 errata-xmlrpc 2015-03-26 06:36:35 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0682.html


Note You need to log in before you can comment on or make changes to this bug.