Bug 1228173

Summary: [geo-rep]: RENAME are not synced to slave when quota is enabled.
Product: [Red Hat Storage] Red Hat Gluster Storage Reporter: Rahul Hinduja <rhinduja>
Component: geo-replicationAssignee: Kotresh HR <khiremat>
Status: CLOSED ERRATA QA Contact: storage-qa-internal <storage-qa-internal>
Severity: urgent Docs Contact:
Priority: high    
Version: rhgs-3.1CC: aavati, asrivast, avishwan, csaba, nlevinki, nsathyan, vagarwal
Target Milestone: ---Keywords: Regression
Target Release: RHGS 3.1.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: glusterfs-3.7.1-2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1228492 1230693 (view as bug list) Environment:
Last Closed: 2015-07-29 04:56:47 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: 1202842, 1223636, 1228492, 1230693    

Description Rahul Hinduja 2015-06-04 10:55:03 UTC
Description of problem:
=======================

Use Case: Perform renames on master volume when quota is enabled for the volume.

Problem: If the quota is enabled, and renames are performed on the master volume. They get missed in changelog and eventually they never sync to slave. 

Master volume:
==============

[root@wingo test]# pwd
/mnt/master/test
[root@wingo test]# ls
556e0c09%%0UT4GLL2QF  file2
[root@wingo test]# 


Slave Volume:
=============

[root@wingo test]# pwd
/mnt/slave/test
[root@wingo test]# ls
556e077d%%XAV5INQFQO  file1
[root@wingo test]# 


556e0c09%%0UT4GLL2QF & file2 are rename files of 556e077d%%XAV5INQFQO respectively file1

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

glusterfs-3.7.0-3.el6rhs.x86_64


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

Always


Steps Carried:
==============

1. Create a master cluster
2. Create and Start the master volume 
3. Create a slave cluster
4. Create ans Start the slave volume
5. Create and start gluster_shared_storage volume
6. Mount gluster_shared_storage at /var/run/gluster/shared_storage on all the master nodes participating in master volume.
7. Create the geo-rep session
8. Set the config option use_meta_volume to true
9. Start the geo-rep session
10. Enable quota using "gluster volume quota master enable"
11. Stop the geo-rep session
12. Mount the master volume to client and create a data{file/directories}
13. Start the geo-rep session
14. Mount the slave volume
15. Check the files on master and slave volume. They should sync properly 
16. Rename the files on master
17. Verify whether the files are renamed on slave volume

Actual results:
===============

Files do not get rename at slave volume


Expected results:
=================

Files should get sync to slave volume

Comment 6 Sachin Pandit 2015-06-11 11:47:48 UTC
http://review.gluster.org/#/c/11089/ has been merged upstream.
https://code.engineering.redhat.com/gerrit/#/c/50532/1 has been posted downstream

Comment 7 Rahul Hinduja 2015-06-19 09:47:54 UTC
Verified with build: glusterfs-3.7.1-4.el6rhs.x86_64

After enabling the Quota, ran the automated cases which does create, chmod, chown, chgrp, symlink, hardlink, truncate , rename . 

All were successful, moving this bug to verified state. 

bash-4.3$ python main.py -t "$testcases"
test_0_history-test-create (__main__.gluster_tests) ... ok
test_1_history-test-chmod (__main__.gluster_tests) ... ok
test_2_history-test-chown (__main__.gluster_tests) ... ok
test_3_history-test-chgrp (__main__.gluster_tests) ... ok
test_4_history-test-symlink (__main__.gluster_tests) ... ok
test_5_history-test-hardlink (__main__.gluster_tests) ... ok
test_6_history-test-truncate (__main__.gluster_tests) ... ok
test_7_history-test-rename (__main__.gluster_tests) ... ok
test_8_history-dynamic-create (__main__.gluster_tests) ... ok
test_9_history-dynamic-chmod (__main__.gluster_tests) ... ok
test_10_history-dynamic-chown (__main__.gluster_tests) ... ok
test_11_history-dynamic-chgrp (__main__.gluster_tests) ... ok
test_12_history-dynamic-symlink (__main__.gluster_tests) ... ok
test_13_history-dynamic-hardlink (__main__.gluster_tests) ... ok
test_14_history-dynamic-truncate (__main__.gluster_tests) ... ok
test_15_history-dynamic-rename (__main__.gluster_tests) ... ok

----------------------------------------------------------------------
Ran 16 tests in 3266.497s

OK
bash-4.3$ 

[root@georep1 ~]# gluster volume info master | grep features.quota
features.quota-deem-statfs: on
features.quota: on
[root@georep1 ~]#

Comment 8 errata-xmlrpc 2015-07-29 04:56:47 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/RHSA-2015-1495.html