Bug 1403119

Summary: Linux tarball untar fails with "No such file or directory" while directory rename is in progress
Product: Red Hat Gluster Storage Reporter: Prasad Desala <tdesala>
Component: distributeAssignee: Susant Kumar Palai <spalai>
Status: CLOSED DEFERRED QA Contact: Prasad Desala <tdesala>
Severity: low Docs Contact:
Priority: low    
Version: rhgs-3.2CC: rcyriac, rhs-bugs, sheggodu, storage-qa-internal, tdesala
Target Milestone: ---Keywords: Reopened, ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-01-06 10:55:09 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:

Description Prasad Desala 2016-12-09 06:09:16 UTC
Description of problem:
=======================
Linux tarball untar is failing with "No such file or directory" while directory rename is in progress.

From two different directories start two separate untars

dir1 --> linux kernel untar
dir2 --> linux kernel untar

While both the untar are in progress, continuously rename the directories as below
mv dir1 dir2
mv dir2 dir3
mv dir3 dir4
mv dir4 dir1 

We can see ENOENT errors

tar: linux-4.6.4/Documentation/cpu-freq/boost.txt: Cannot open: No such file or directory
tar: linux-4.6.4/Documentation/cpu-freq/cpufreq-nforce2.txt: Cannot open: No such file or directory
tar: linux-4.6.4/Documentation/cpu-freq/user-guide.txt: Cannot open: No such file or directory
tar: linux-4.6.4/Documentation/debugging-modules.txt: Cannot open: No such file or directory
tar: linux-4.6.4/Documentation/devicetree/bindings/arm/altera.txt: Cannot open: No such file or directory

Version-Release number of selected component (if applicable):
3.8.4-7.el7rhgs.x86_64

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

Steps to reproduce:
===================
1) Create a distribute-replicate volume and start it. (The issue is seen with distribute as well)
2) FUSE mount the volume on mutiple clients.
3) Setup the testbed in the below way,
Client-1: On mount point, create a dir name '1'  --> copy linux tarball in it--> start untar
Client-2: On mount point, create a dir name '2' --> copy linux tarball in it --> start untar
4) While Step-3 in-progress, start renaming the directory in a loop
while true;do mv 1 2; mv 2 3; mv 3 4; mv 4 1;done

At some point, we can start seeing ENOENT errors from both untars.

Actual results:
===============
Linux tarball untar fails with "No such file or directory" 

Expected results:
================
There should not be any errors.