summaryrefslogtreecommitdiffstats
path: root/tests/afr.rc
Commit message (Collapse)AuthorAgeFilesLines
* tests: Fix entry-self-heal.tKrutika Dhananjay2015-05-261-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | Because both bricks in the replica pair of patchy are in the same node, both full healer threads within the same shd try and fail to acquire non-blocking locks when each one gets lock on one of the bricks, causing heal to fail occasionally. Now heals are triggered from the mount as part of inode refresh. And because the AFR on the mount graph a. does not treat presence of dirty xattrs as something that needs a heal (this is true for dirs fool_heal and fool_me) and b. does not recursively heal the entire hierarchy of subdirs and their entries in one shot (this is true with source_creations_heal/dir1), index heal is used to heal fool_heal, fool_me and source_creations_heal/dir1 wherein only one brick (which is the brick that contains the good copy of source_creations_heal/dir_1: brick-1) has all the gfids to be healed copied into its indices/xattrop directory. Change-Id: I46df4188f16d1623f20cc0d7266b3afaeca6c31f BUG: 1163543 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/10916 Tested-by: NetBSD Build System Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* afr: remove stale index entriesRavishankar N2015-03-171-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: During pre-op phase, the index xlator 1. Creates the entry inside .glusterfs/indices/xattrop 2. Winds the xattrop fop to posix to mark dirty/pending changelogs. If the brick crashes after 1, the xattrop entry becomes stale and never gets removed by shd during subsequent crawls because there is nothing to heal (changelogs are zero). Though the stale entry does not get displayed in the output of 'heal info' command, it nevertheless stays there forever unless a new write transaction is performed on the file. Fix: During index self-heal if afr xattrs are found to be clean (indicated by ret value of 2 on a call to afr_shd_selfheal(), send a dummy post-op with all 0s for the xattr values, which makes the index xlator to unlink the stale entry. Change-Id: I02cb2bc937f2e3f3f3cb35d67b006664dc7ef919 BUG: 1190069 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/9714 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anuradha Talur <atalur@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* porting: Provide setfattr/getfattr implementationHarshavardhana2014-09-051-2/+2
| | | | | | | | | | | | | | | | - Use 'getfattr' properly avoid redundant options during xattr query - Untabify certain parts of tests (remove tabs) - Avoid backtick evaluation for certain values to make code more portable. - Use awk on FreeBSD/Darwin, since 'wc' implementation is broken and adds spurious spaces in its output. Change-Id: I7dcc0b70874e43b4cda8c306ed18a31b7a3f990a BUG: 1131713 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/8520 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Tested-by: Emmanuel Dreyfus <manu@netbsd.org>
* cluster/afr : Mark pending changelog xattrs for new creationsAnuradha2014-09-031-0/+68
| | | | | | | | | | | | | Based on type of file, set appropriate pending changelogs for new entries. Change-Id: Ifd124bf9bc54b996ce83ab9f39d03b3ccca7eb3c BUG: 1130892 Signed-off-by: Anuradha <atalur@redhat.com> Reviewed-on: http://review.gluster.org/8555 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* cluster/afr: Avoid self-healing extended attribute used by SELinux.Vijay Bellur2013-04-301-0/+15
Since removexattr() fails to remove "security.selinux" in a system where SELinux is enforcing, xattr self-healing fails. As a consequence of this, user extended attributes are not being healed. Added a check in afr to prune SELinux xattr from the dictionary used for removing xattrs from the sink. Minor changes in tests and md-cache as well. Signed-off-by: Vijay Bellur <vbellur@redhat.com> Change-Id: I854bfc0098dde812ce2afe64b125ee40c04bdeb1 BUG: 957877 Reviewed-on: http://review.gluster.org/4905 Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>