Bug 800779

Summary: clear-locks should not trigger self-heal of files
Product: [Community] GlusterFS Reporter: Shwetha Panduranga <shwetha.h.panduranga>
Component: glusterdAssignee: krishnan parthasarathi <kparthas>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: mainlineCC: gluster-bugs, nsathyan
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.4.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-24 13:53:17 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 817967    
Attachments:
Description Flags
clear-locks log file none

Description Shwetha Panduranga 2012-03-07 03:37:15 EST
Created attachment 568195 [details]
clear-locks log file

Description of problem:
when clear-locks on a file is executed it performs lookup on the file specified. if lookup detects any pending operations, it triggers self-heal along with clearing locks if any locks were head on that file. 

Ideally  clear-locks should unlock any (posix/inode/entry) locks held on a file and should not trigger self-heal. 

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

How reproducible:
often

Steps to Reproduce:
1.create a replicate volume. start the volume
2.create 2 gluster mounts from client1
3.execute 'dd if=/dev/zero of=gfsf1 bs=1M count=10240' from mount1
4.execute 'ping_pong -rw gfsf1 2' from mount2
5.execute 'gluster volume clear-locks datastore /gfsf2 kind blocked posix' from one of the server in storage pool

Actual results:
[2012-03-07 18:31:15.509693] D [afr-common.c:1137:afr_lookup_set_self_heal_params_by_xattr] 0-datastore-replicate-1: data self-heal is pending for /gfsf2.
[2012-03-07 18:31:15.509730] D [afr-common.c:1137:afr_lookup_set_self_heal_params_by_xattr] 0-datastore-replicate-1: data self-heal is pending for /gfsf2.
[2012-03-07 18:31:15.509814] I [afr-common.c:1313:afr_launch_self_heal] 0-datastore-replicate-1: background  data self-heal triggered. path: /gfsf2, reason: lookup detected pending operations
[2012-03-07 18:31:15.509889] D [afr-self-heal-metadata.c:78:afr_sh_metadata_done] 0-datastore-replicate-1: proceeding to data check on /gfsf2
[2012-03-07 18:31:15.510955] D [afr-lk-common.c:1427:afr_nonblocking_inodelk] 0-datastore-replicate-1: attempting data lock range 0 0 by 48ff7f0cff7f0000
[2012-03-07 18:31:15.512096] D [afr-self-heal-data.c:1130:afr_sh_data_post_nonblocking_inodelk_cbk] 0-datastore-replicate-1: Non Blocking data inodelks done for /gfsf2 by 48ff7f0cff7f0000. Proceeding to self-heal


Expected results:
Should not trigger self-heal

Additional info:
Comment 1 Anand Avati 2012-03-21 15:00:08 EDT
CHANGE: http://review.gluster.com/2992 (glusterd: Disabled self-heal on clear-locks internal mount) merged in master by Anand Avati (avati@redhat.com)
Comment 2 Shwetha Panduranga 2012-05-04 03:14:51 EDT
Bug is fixed . verified on 3.3.0qa39