Bug 1122886

Summary: DHT :- If mkdir is in progress (completed only on hashed) and lookup from another mount point race with it, due to selfhealing mkdir will give 'I/IO error' even though Directory is creation is done
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Rachana Patel <racpatel>
Component: distributeAssignee: Susant Kumar Palai <spalai>
Status: CLOSED ERRATA QA Contact: amainkar
Severity: high Docs Contact:
Priority: high    
Version: rhgs-3.0CC: amainkar, divya, nbalacha, spalai, surs, vagarwal
Target Milestone: ---Keywords: ZStream
Target Release: RHGS 3.0.3   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.6.0.33-1 Doc Type: Bug Fix
Doc Text:
Previously, if a mkdir sees EEXIST [as a result of lookup and mkdir race] on a non-hashed subvolume, it reports I/O error to the application. With this fix, if the mkdir is successful on the hashed subvolume, then no error is propagated to the client.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-01-15 13:38:55 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: 1114010, 1114557    
Bug Blocks: 1162694    

Description Rachana Patel 2014-07-24 10:03:03 UTC
Description of problem:
=======================
Create Directory from mount point and while creation is in progress (Directory created only on hashed sub-volume), execute lookup from another mount point 

i.e. from one mout point :- 

[root@OVM1 nfs]# mkdir 3

from another mount point:- ls

Directory creation gives error "mkdir: cannot create directory `3': Input/output error" eventhough Directory is created on all up sub-volumes.


Version-Release number :
=========================
3.6.0.24-1.el6rhs.x86_64


How reproducible:
=================
always


Steps to Reproduce:
====================
1. create and mount distributed volume. (mount on multiple client)
2. from one mount point give mkdir and make sure when Directory is create donly on hashed issue lookup

[root@OVM3 ~]# tree /brick*
/brick0
/brick1
/brick2
├── r1
│   ├── 1
│   ├── 2
│   └── 3
├── r2
│   ├── 1
│   └── 2
└── r3
    ├── 1
    └── 2
/brick3

10 directories, 0 files

now lookup should come

3. Directory creation fails with 'I/O error' but Directory is present on all up sub-volume

[root@OVM1 nfs]# mkdir 3
mkdir: cannot create directory `3': Input/output error

[root@OVM3 ~]# tree /brick*
/brick0
/brick1
/brick2
├── r1
│   ├── 1
│   ├── 2
│   └── 3
├── r2
│   ├── 1
│   ├── 2
│   └── 3
└── r3
    ├── 1
    ├── 2
    └── 3
/brick3

12 directories, 0 files



Actual results:
===============
- mkdir fails with error 'mkdir: cannot create directory `3': Input/output error'

Expected results:
=================
- If Directory is created on all upp sub-volumes with same gfid, mkdir should nto give error

Comment 4 Amit Chaurasia 2014-12-17 07:50:37 UTC
I verified by tracing the calls in dht_mkdir and dht_mkdir_hashed_cbk functions while creating folders and performing ls from the mount points.

ls is able to perform healing without any errors or races.
mkdir is complete without any issues.

Marking the bug verified.

Comment 5 Divya 2014-12-30 08:44:44 UTC
Susant,

Please review the edited doc text and sign-off.

Comment 6 Susant Kumar Palai 2014-12-30 09:21:32 UTC
Doc looks good to me.

Comment 8 errata-xmlrpc 2015-01-15 13:38:55 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-0038.html