Bug 1610258

Summary: Moving multiple temporary files to the same destination concurrently throws EEXIST error
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Prasad Desala <tdesala>
Component: distributeAssignee: Susant Kumar Palai <spalai>
Status: CLOSED DEFERRED QA Contact: Prasad Desala <tdesala>
Severity: medium Docs Contact:
Priority: medium    
Version: rhgs-3.4CC: rhs-bugs, sabose, storage-qa-internal, vdas
Target Milestone: ---Keywords: 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-16 07:28:11 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:

Description Prasad Desala 2018-07-31 10:19:35 UTC
Description of problem:
=======================
Was moving multiple temporary files to the same destination concurrently from 8 clients. The script ran for almost 3 hrs without any issues. After that started seeing continuous EEXIST errors from all the client mount points. 
When stopped the script from all the clients, there are many temp file because of the rename failures and also we are seeing two files with same name.

-rw-r--r--. 1 root root 10 Jul 31 15:23 test
-rw-r--r--. 1 root root 10 Jul 31 15:23 test
-rw-r--r--. 1 root root 10 Jul 31 15:21 test00264710-74c8-4d1b-b446-b4ee51a6b89f
-rw-r--r--. 1 root root 10 Jul 31 15:23 test00743e28-e816-4dde-a80b-0ffa50d6ab86
-rw-r--r--. 1 root root 10 Jul 31 15:21 test00dcbe58-12ee-4e6f-8c73-ecbd84798e72
-rw-r--r--. 1 root root 10 Jul 31 15:22 test010dd93c-29b0-4a70-bb87-e88ed519105d
-rw-r--r--. 1 root root 10 Jul 31 15:23 test012a6482-825e-471b-b27a-5ecc7c77a971
.... many

Version-Release number of selected component (if applicable):
3.12.2-14.el7rhgs.x86_64

How reproducible:
always

Steps to Reproduce:
====================
1) Create a distributed-replicated volume and start it.
2) FUSE mount it on multiple clients.
3) From all clients execute,

"while true; do uuid="`uuidgen`"; echo "some data" > "test$uuid"; mv "test$uuid" "test" -f; done"

4) Wait until you hit EEXIST errors. (I hit it after running for almost 3 hrs)

Actual results:
================
Moving multiple temporary files to the same destination concurrently throws EEXIST error 

Expected results:
==================
Moving multiple temporary files to the same destination concurrently should not throw any error. 

Additional info:
================
Sos and gluster-health-check reports will be shared.

Comment 3 Vivek Das 2018-08-12 15:30:20 UTC
Moving this bug out of 3.4.0 as it doesn't qualify blocker criteria. Please re-propose it for 3.4.0, if required.