summaryrefslogtreecommitdiffstats
path: root/tests
Commit message (Collapse)AuthorAgeFilesLines
* nfs: allow hostnames with dashes in exports/netgroups filesNiels de Vos2016-08-252-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Hostnames with dashes (like "vagrant-testVM") are not correctly parsed when reading the exports/netgroups files. This bacomes obvious when running ./run-tests-in-vagrant.sh because it causes tests/basic/mount-nfs-auth.t and tests/basic/netgroup_parsing.t to fail. The regex for hostname (in exports) and the entry and hostname (netgroups) parsing does not include the "-" sign, and hence the hostnames are splitted at it. Cherry picked from commit e5221d288e41d29d89d52f8deab657d2285a852c: > BUG: 1350237 > Change-Id: I38146a283561e1fa386cc841c43fd3b1e30a87ad > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: http://review.gluster.org/14809 > Smoke: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Change-Id: I38146a283561e1fa386cc841c43fd3b1e30a87ad BUG: 1357835 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/14956 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: jiffin tony Thottan <jthottan@redhat.com>
* gfapi: Fix IO error caused when there is consecutive graph switchesPoornima G2016-08-244-0/+185
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: Consider a simple situation, where glfs_init() is done, i.e. initial graph is up. Now perform 2 volume sets that results in 2 client side graph changes. After this perform some IO, the IO fails with ENOTCON. The only way to recover this client is i guess another graph switch or restart. What actually is happening from code perspective: Initial graph lets say A, followed by 2 consecutive graph switches to B and C without any IO those two switches. - graph_setup (A) as a result of GF_EVENT_CHILD_UP, and fs->next_subvol = A - glfs_init() results in fs->active_subvol = A, fs->next_subvol = NULL - graph_setup (B) as a result of GF_EVENT_CHILD_UP, and fs->next_subvol = B - graph_setup (C) as a result of GF_EVENT_CHILD_UP, and fs->next_subvol = C. It also sees that the previous graph B was never set as fs->active_subvol, i.e. no IO or anything happened on B, so can safely send GF_EVENT_PARENT_DOWN (by calling glfs_subvol_done(B)). This parent down on B, results in child_down(B), which is fine. But child_down also triggers graph_setup(B). - graph_setup(B) as a result of GF_EVENT_CHILD_DOWN, and fs->next_subvol = B, and GF_EVENT_PARENT_DOWN on C as explained above. This again leads to GF_EVENT_CHILD_DOWN on C. - graph_setup(C) as a result of GF_EVENT_CHILD_DOWN, and fs->next_subvol = C, and GF_EVENT_PARENT_DOWN on B as explained above. Thus both the graphs B and C are disconnected, and hence the ENOTCON Solution: Remove the call to graph_setup() when the event is GF_EVENT_CHILD_DOWN. It don't see any reason why graph_setup should be called when there is child_down. Not sure what the original reason was, to have graph_setup in child_down. git hostory shows the first patch itself had this call. > Reviewed-on: http://review.gluster.org/14656 > Smoke: Gluster Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> BUG: 1367294 Change-Id: I9de86555f66cc94a05649ac863b40ed3426ffd4b Signed-off-by: Poornima G <pgurusid@redhat.com> Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-on: http://review.gluster.org/14835 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaushal M <kaushal@redhat.com>
* cluster/afr: Prevent split-brain when bricks are brought off and on in ↵Krutika Dhananjay2016-08-221-0/+112
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | cyclic order Backport of: http://review.gluster.org/15080 When the bricks are brought offline and then online in cyclic order while writes are in progress on a file, thanks to inode refresh in write txns, AFR will mostly fail the write attempt when the only good copy is offline. However, there is still a remote possibility that the file will run into split-brain if the brick that has the lone good copy goes offline *after* the inode refresh but *before* the write txn completes (I call it in-flight split-brain in the patch for ease of reference), requiring intervention from admin to resolve the split-brain before the IO can resume normally on the file. To get around this, the patch does the following things: i) retains the dirty xattrs on the file ii) avoids marking the last of the good copies as bad (or accused) in case it is the one to go down during the course of a write. iii) fails that particular write with the appropriate errno. This way, we still have one good copy left despite the split-brain situation which when it is back online, will be chosen as source to do the heal. Change-Id: I7c13c6ddd5b8fe88b0f2684e8ce5f4a9c3a24a08 BUG: 1367270 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/15222 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* snapshot/snapd: Don't display pid when snapd is offlineAvra Sengupta2016-08-221-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14981/ We were previously reading the pidfile, and displaying the pid even if snapd daemon is not running. Now to fix it, we re-assign pid value to -1, if snapd is offline. > Reviewed-on: http://review.gluster.org/14981 > Tested-by: Vijay Bellur <vbellur@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Smoke: Gluster Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> (cherry picked from commit ec6925a379c7bee071df1638bc2751b266cee346) Change-Id: I4baff8d489fe9380061c52aea006db90fa421cd7 BUG: 1360979 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/15032 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* glusterd: Convert volume to replica after adding brick self heal is not ↵Mohit Agrawal2016-08-181-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | triggered Problem: After add brick to a distribute volume to convert to replica is not triggering self heal. Solution: Modify the condition in brick_graph_add_index to set trusted.afr.dirty attribute in xlator. Test : To verify the patch followd below steps 1) Create a single node volume gluster volume create <DIS> <IP:/dist1/brick1> 2) Start volume and create mount point mount -t glusterfs <IP>:/DIS /mnt 3) Touch some file and write some data on file 4) Add another brick along with replica 2 gluster volume add-brick DIS replica 2 <IP>:/dist2/brick2 5) Before apply the patch file size is 0 bytes in mount point. Backport of commit 87bb8d0400d4ed18dd3954b1d9e5ca6ee0fb9742 BUG: 1366444 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> > Change-Id: Ief0ccbf98ea21b53d0e27edef177db6cabb3397f > Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> > Reviewed-on: http://review.gluster.org/15118 > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Ravishankar N <ravishankar@redhat.com> > Reviewed-by: Anuradha Talur <atalur@redhat.com> > Smoke: Gluster Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> > (cherry picked from commit 87bb8d0400d4ed18dd3954b1d9e5ca6ee0fb9742) Change-Id: I9c21ba4d7b1a2d7c5c79a6bb86cc05831b0cd120 Reviewed-on: http://review.gluster.org/15152 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Tested-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* xlator/trash : append '/' at the end in trash_notify_lookup_cbkJiffin Tony Thottan2016-08-151-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the notify function in trash xlator, a lookup is performed to obtain path of old trash directory. The result usually contains path without '/' at the end. The trash xlator maintains expects '/' at the end for the values such as 'old trash dir' and 'new trash dir'. Otherwise certian checks in the code will fail. Upstream reference: >Change-Id: I89e02e4b249314fb6536297f959865feee182c83 >BUG: 1357397 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/14938 >Smoke: Gluster Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Anoop C S <anoopcs@redhat.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> >(cherry picked from commit d90307c1b0245e0e6a39044a28819cde520a100c) Change-Id: I89e02e4b249314fb6536297f959865feee182c83 BUG: 1358268 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-on: http://review.gluster.org/14966 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* gfapi: add missing glfs_truncateJeff Darcy2016-08-122-0/+119
| | | | | | | | | | | | | | | | | | | > Reviewed-on: http://review.gluster.org/13927 > Smoke: Gluster Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> BUG: 1366286 Change-Id: I80b016090a4d9d86278a0a5144dd58c0cbfe9bb2 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Signed-off-by: Oleksandr Natalenko <oleksandr@natalenko.name> Reviewed-on: http://review.gluster.org/15150 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com>
* Mark tests/basic/quota.t as a bad testSusant Palai2016-08-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is the single most failed netbsd7 test in the last couple of weeks. (cherry picked from commit f1f6a0e2b09884151c37434bd512cb1482608218) > quota: mark tests/basic/quota.t as bad_test > > tests/basic/quota.t regularly leaves a core behind. > Some of the failed tests: > * https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/16439/consoleFull > * https://build.gluster.org/job/rackspace-netbsd7-regression-triggered/16440/console > > Change-Id: Iacf42c40f768dd2939994bbb87cc7ef366ee495f > BUG: 1332045 > Signed-off-by: Susant Palai <spalai@redhat.com> > Reviewed-on: http://review.gluster.org/14136 > Reviewed-by: Niels de Vos <ndevos@redhat.com> > Smoke: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Change-Id: Iacf42c40f768dd2939994bbb87cc7ef366ee495f BUG: 1366472 Signed-off-by: Nigel Babu <nigelb@redhat.com> Reviewed-on: http://review.gluster.org/15154 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Oleksandr Natalenko <oleksandr@natalenko.name> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kaushal M <kaushal@redhat.com>
* posix: Do not move and recreate .glusterfs/unlink directoryAshish Pandey2016-08-101-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: At the time of start of a volume, it is checked if .glusterfs/unlink exist or not. If it does, move it to landfill and recreate unlink directory. If a volume is mounted and we write data on it till we face ENOSPC, restart of that volume fails as it will not be able to create unlink dir. mkdir will fail with ENOSPC. This will not allow volume to restart. Solution: If .glusterfs/unlink directory exist, don't move it to landfill. Delete all the entries inside it. master - http://review.gluster.org/#/c/15030/ Change-Id: Icde3fb36012f2f01aeb119a2da042f761203c11f BUG: 1364354 Signed-off-by: Ashish Pandey <aspandey@redhat.com> Reviewed-on: http://review.gluster.org/15092 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* tests: Fix tests/bitrot/bug-1244613.tKotresh HR2016-08-091-0/+3
| | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/15028 Wait for gluster nfs to initialize before attempting the nfs mount. Change-Id: I4bd9579ad5368935cf62632a5d612f89fce5979f BUG: 1362059 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit ae4f59f929be36b40c9f8e20804b6bc4564cc7a3) Reviewed-on: http://review.gluster.org/15059 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* tests: fix spurious failure in tests/bugs/glusterd/bug-1089668.tAtin Mukherjee2016-08-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/15085 Instead of rebalance stop, its always better to wait for rebalance to complete as the former doesn't have any purpose. >Reviewed-on: http://review.gluster.org/15085 >Smoke: Gluster Build System <jenkins@build.gluster.org> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Change-Id: Ia1bc2a34d937a0a96543bebd257dcda619f12474 BUG: 1364327 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/15090 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* tests: Fix spurious failure of tests/bugs/glusterd/bug-1111041.tAvra Sengupta2016-08-011-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | On a faster machine the ps check was returning two pids, including the glusterfsd process's pid, right after that, process forked. Hence removing that ps, as for the scope of this test, verifying the snapd pid from the status command itself is enough. > Reviewed-on: http://review.gluster.org/14963 > Smoke: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> (cherry picked from commit be69510e670cb5ee893399ca1d7e7d2a60a9483c) Change-Id: I8bd8fc4ea406d96e3a47f952cfe44560b615dbe6 BUG: 1358590 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/14968 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
* afr: some coverity fixesRavishankar N2016-07-284-7/+6
| | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14895/ Thanks to Krutika for a cleaner way to track inode refs in afr_set_split_brain_choice(). Change-Id: I2d968d05b815ad764b7e3f8aa9ad95a792b3c1df BUG: 1360549 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/15017 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* tests: Fix spurious failure of br-stub.tKotresh HR2016-07-271-0/+3
| | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14960 The nfs mount fails occasionally in ./tests/bitrot/br-stub.t. The reason being nfs mount is attempted before the gluster nfs has come up. It is a race and hence happens occasionally. The patch fixes it by waiting for nfs server to come up before mount. Thanks skoduri@redhat.com for root causing it. Change-Id: I3adbf2363514635785c02b1478733095ad0b74cf BUG: 1360578 Signed-off-by: Kotresh HR <khiremat@redhat.com> (cherry picked from commit f4bbe515097e0149c78c1fc1bae9fb90928e7cd8) Reviewed-on: http://review.gluster.org/15020 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Talur <rtalur@redhat.com>
* tests: Remove hard coding in get_auxPranith Kumar K2016-07-231-4/+12
| | | | | | | | | | | | | | | | | | | | | >Change-Id: Ie007d8006a2f2be0187f0c73d46ec6dda2a68a6b >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14988 >Smoke: Gluster Build System <jenkins@build.gluster.org> >Tested-by: Jeff Darcy <jdarcy@redhat.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> >(cherry picked from commit dac9ec0c015e748c0e7909496cdc636831975e0e) BUG: 1359369 Change-Id: I56e633244a2154a3565a17fd8e4853cf9045c4f3 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14991 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: fail volume delete if one of the node is downAtin Mukherjee2016-07-041-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/14681 Deleting a volume on a cluster where one of the node in the cluster is down is buggy since once that node comes back the resync of the same volume will happen. Till we bring in the soft delete feature tracked in http://review.gluster.org/12963 this is a safe guard to block the volume deletion. Please note the test file which is backported from this commit has an issue where we start the volume and then try to delete it which is anyway going to fail. So the test actually doesn't validate the fix. http://review.gluster.org/#/c/14693/ in master fixed the problem and the same is ported as part of this commit as well. Change-Id: I9c13869c4a7e7a947f88842c6dc6f231c0eeda6c BUG: 1344634 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/14681 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-on: http://review.gluster.org/14692 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com>
* nfs: build exportlist with multiple groupnodesBipin Kunal2016-07-031-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The EXPORT procedure of the MOUNT protocol does not correctly create structures for the 'groupnodes' in the reply. Each 'groupnode' should be a single entry in the 'nfs.rpc-auth-allow' volume option. Because the value is handled as a single string, the encoding of the groupnode->gr_name fails when the value of the volume option is longer than 255 characters. In the error case, encoding the EXPORTS reply fails, and the waiting 'showmount' command will not receive a reply and times out. Splitting the allowed entries and creating a groupnode for each one prevents the too long ->gr_name. This is following the structures for the EXPORTS reply in the MOUNT protocol more correctly as well. Note that the contents of ->gr_name is expected to be server dependent. This is backport of below mainline fix - http://review.gluster.org/#/c/14667/ Change-Id: Ibbabad581cc9aa00feb80fbbc851a1b10b28383d BUG: 1343290 Signed-off-by: Niels de Vos <ndevos@redhat.com> Signed-off-by: Bipin Kunal <bkunal@redhat.com> Reviewed-on: http://review.gluster.org/14698 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* cli: fix crash in arbiter keyword parsingRavishankar N2016-06-271-0/+25
| | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14738/ A negative case like `gluster volume create volname arbiter 3 /bricks{1..3}` must not crash. 'arbiter' keyword is valid only for (3 way) replica volumes. The .t that is added will crash and create a core *without* the fix when run but will still pass all TESTs. Since the regression framework fails the .t if it creates a core, we can consider it a valid test 'that fails without the fix'. Change-Id: Ie2d7ced66025ea3617d30f6f823b22401e6d2fde BUG: 1348056 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit b5c492dfea2d2e2075aa88d7153fba57b06e739d) Reviewed-on: http://review.gluster.org/14765 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* afr:Don't wind reads for files in metadata split-brainRavishankar N2016-06-272-1/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13389/ Problem: For a read on a file in metadata split-brain: 1.lookup_done resets event_generation to zero. 2. readv is issued, goes to inode refresh due to mismatching event_gen. 3. After refresh is successful, we update event_generation, data and metdata readable. 3. We then call afr_read_txn_refresh_done() which in turn calls afr_inode_get_readable() but doesn't check for EIO. So afr_readv_wind is called with local->readable (which is populated with data_readable), thus winding the read to a brick. 4. Also, further parallel reads that come directly go to the wind path because there is no inode_refresh needed. Fix: 1.For any afr_read_txn(), readable must be an intersection of data and metadata readable. 2.Check for EIO in afr_read_txn_refresh_done(). Change-Id: I22dd221fdfaf96d7aced2f474e28ed1337d69f0e BUG: 1349881 Signed-off-by: Ravishankar N <ravishankar@redhat.com> (cherry picked from commit 7a1c1e2904701496968ed14b6d7479fb706c3188) Reviewed-on: http://review.gluster.org/14791 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* cluster/distribute: heal layout in discover codepath tooRaghavendra G2016-06-221-1/+13
| | | | | | | | | | Change-Id: Ic559c220a1f0051e531314d13940604e2dead08c BUG: 1336284 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/14349 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* features/shard: Don't modify readv sizePranith Kumar K2016-06-151-0/+23
| | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/14623 For o-direct reads application sends aligned size which needs to be sent as is, otherwise o-direct writes where the file-size is not aligned fails. Change-Id: I66afcba41f3484da11e9a12fe2671d2051fafc8a BUG: 1342903 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14658 Tested-by: Krutika Dhananjay <kdhananj@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* afr: Consider ENOSPC and EDQUOT as symmetric errorsRavishankar N2016-06-121-0/+63
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/14604/ Problem: Since commit 8eaa3506ead4f11b81b146a9e56575c79f3aad7b, in replica 3, if a brick is down and a create fails on the other 2 brick with EDQUOT, we consider it an unsymmetric error and hence do not do post-op. So the dirty xattr remains set on the parent dir, leading to conservative merges during heal when all bricks are up. i.e. a file deleted on the source might re-appear after heal. Fix: Consider ENOSPC and EDQUOT as symmetric errors since there is no possibility of partial inode or entry modification operations possible when quota is enabled. IOW, if quota reports EDQUOT, the no. of bytes written (or not written) will be the same on all bricks of the replica. Likewise, the entry operation (create, mkdir...) will either succeed or not succeed on all bricks. Change-Id: Iacb1108e9ef4a918e36242fb4a957455133744e9 BUG: 1344561 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/14688 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* tests: fix regression failure from bug-1322772-real-path-fix-for-snapshot.tAtin Mukherjee2016-06-021-6/+27
| | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13974 There is no need to unmount the brick as doing so we loose all the xattrs on the brick and while restarting glusterd brick doesn't come up Change-Id: Ic1fa8b72f6cfcad564c62bcef1d022b083263ecc Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13974 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/14108 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* tests/write-behind: move 1279730.t to BAD testsRaghavendra G2016-05-271-0/+4
| | | | | | | | | | | | | | There is a race condition which is causing the test to fail. For lack of bandwidth I am moving this test to BAD, though clearly there is some issue with codebase. BUG: 1337779 Change-Id: If4f3eff8a5985f37a4dee65d2df29fa7b6bda7ae Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/14444 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: Do not inode_link in afrPranith Kumar K2016-05-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Race is explained at https://bugzilla.redhat.com/show_bug.cgi?id=1337405#c0 This patch also handles performing of self-heal with shd-pid. Also performs the healing with this->itable's inode rather than main itable. >BUG: 1337405 >Change-Id: Id657a6623b71998b027b1dff6af5bbdf8cab09c9 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14422 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> BUG: 1337872 Change-Id: I6d8e79a44e4cc1c5489d81f05c82510e4e90546f Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14456 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: Do heals with shd pidPranith Kumar K2016-05-241-0/+35
| | | | | | | | | | | | | | | | | | | | | | Multi-threaded healing doesn't create synctask with shd pid, this leads to healing problems when quota exceeds. >BUG: 1332994 >Change-Id: I80f57c1923756f3298730b8820498127024e1209 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14211 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Ravishankar N <ravishankar@redhat.com> Change-Id: Id3f3ee44b27db7dbf94f3e7a9a6bfd7412d44ab8 BUG: 1335686 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14313 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* features/shard: Get hard-link-count in {unlink,rename}_cbk before deleting ↵Krutika Dhananjay2016-05-231-0/+282
| | | | | | | | | | | | | | | shards Backport of http://review.gluster.org/#/c/14334/ Change-Id: I41321d8b00a10f1bd5b0a7b008f673b1aa240d0c BUG: 1337837 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/14450 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* cluster/afr : Do post-op in case of symmetric errorsAnuradha Talur2016-05-231-0/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of: http://review.gluster.org/#/c/14310/ In afr_changelog_post_op_now(), if there was any error, meaning op_ret < 0, post-op was not being done even when the errors were symmetric and there were no "failed subvols". Fix: When the errors are symmetric, perform post-op. How was the bug found : In a 1 X 3 volume with shard and write behind on when writes were done into a file with one brick down, the trusted.afr.dirty xattr's value for .shard directory would keep increasing as post op was not done but pre-op was. This incorrectly showed .shard to be in split-brain. RCA: When WB is on, due to multiple writes being sent on offset lying in the same shard, chances are that same shard file will be created more than once with the second one failing with op_ret < 0 and op_errno = EEXIST. As op_ret was negative, afr wouldn't do post-op, leading to no decrement of trusted.afr.dirty xattr. Thus showing .shard directory to be in split-brain. >Change-Id: I711bdeaa1397244e6a7790e96f0c84501798fc59 >BUG: 1335652 >Signed-off-by: Anuradha Talur <atalur@redhat.com> Change-Id: I711bdeaa1397244e6a7790e96f0c84501798fc59 BUG: 1335836 Signed-off-by: Anuradha Talur <atalur@redhat.com> Reviewed-on: http://review.gluster.org/14332 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* tier/cli : printing a warning instead of skipping the nodehari gowtham2016-05-202-14/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | back-port of : http://review.gluster.org/#/c/14347/8 Problem: skipping the status of the nodes down creates confusion to the user as one might see the status as completed for all nodes and while performing detach commit, the operation will fail as the node is down Fix: Display a warning message Note: When the last node is down (as per the peer list) then warning message can't be displayed as the total number of peers participating in the transaction is considered to be the total count. >Change-Id: Ib7afbd1b26df3378e4d537db06f41f5c105ad86e >BUG: 1324439 >Signed-off-by: hari gowtham <hgowtham@redhat.com> Change-Id: Ie4296e932abaf163edc55b540b26dc6f5824ea85 BUG: 1328410 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/14458 Tested-by: hari gowtham <hari.gowtham005@gmail.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* tests: mark open-behind.t as bad_test on NetBSDRaghavendra Talur2016-05-121-0/+1
| | | | | | | | | | | Change-Id: I7d85efb9b1ad149ca9f3b372d3d24417562ecbfd BUG: 1334204 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/14256 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Poornima G <pgurusid@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* posix: Set correct d_type for readdirp() callsPrashanth Pai2016-05-112-0/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dirent.d_type can contain the type of the directory entry. The 'd_type' struct member in dirent is present in Linux and many BSD flavours. However, filling d_type with correct value requires support from the underlying filesystem. If not, d_type is set to DT_UNKNOWN. XFS added support for d_type as part of their newer version 5 on-disk format. However, this requires Linux >= 3.15, xfsprogs >= 3.2.0 and the bricks to be formatted using the new format. This patch enables posix xlator to set d_type to the right value even when the underlying filesystem does not support it. d_type can be set using information previously fetched by stat() on the dir entry. This will aid FUSE applications to leverage d_type to avoid the expense of calling lstat() if further actions depend on the type of the file. Refer `man 3 readdir` and `man 2 getdents` > Change-Id: Ic5a262fe4c64122726b4fae2d1bea375c559ca04 > Signed-off-by: Prashanth Pai <ppai@redhat.com> > Reviewed-on: http://review.gluster.org/14095 > Smoke: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> (cherry picked from commit 77def44d497d090ef3f393b6d9403c1a29dcf993) Change-Id: I8de1e643dbe88c57eb7a946357283f46c30ae701 BUG: 1332397 Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/14176 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* tests: run tests from the most recent commit firstJeff Darcy2016-05-061-0/+10
| | | | | | | | | | | | | | | | | | | >Signed-off-by: Jeff Darcy <jdarcy@redhat.com> >Reviewed-on: http://review.gluster.org/13439 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Raghavendra Talur <rtalur@redhat.com> (cherry picked from commit df7390c9d7db40dcd68cf1020b6248f5105ab8eb) Change-Id: If11f552543bf0f1f0e9756e9f2237b72e44b7aed BUG: 1316533 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/14220 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* Tier/glusterd: Resetting the tier status value to not startedhari2016-05-051-18/+58
| | | | | | | | | | | | | | | | | | | | | | | | back-port of : http://review.gluster.org/#/c/14106/ Problem: during a volume restart or tier start force, the value of tier status is set as started irrespective of the result. Fix: The appropriate value of status is set during the restart of rebalance function. >Change-Id: I6164f0add48542a57dee059e80fa0f9bb036dbef >BUG: 1315666 >Signed-off-by: hari <hgowtham@redhat.com> Change-Id: Ie4345bd7ce1d458574e36b70fe8994b3d758396a BUG: 1316808 Signed-off-by: hari <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/14229 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: hari gowtham <hari.gowtham005@gmail.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* performance/write-behind: guaranteed retry after a short writeRaghavendra G2016-05-042-1/+28
| | | | | | | | | | | | | | | | | | * Don't mark the request with a fake EIO after a short write. * retry the remaining buffer at least once before unwinding reply to application. This way we capture correct error from backend (ENOSPC, EDQUOT etc). Thanks to "Vijaikumar Mallikarjuna"<vmallika@redhat.com> for the test script. Change-Id: I73a18b39b661a7424db1a7855a980469a51da8f9 BUG: 1332790 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/14196 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* tests: Backport all changes to tests dirRaghavendra Talur2016-05-0470-121/+273
| | | | | | | | | | | | | | | Test framework should be the same on all the branches. This is a copy of all the files under tests dir from master branch. New tests in master have not been backported, but changes to existing tests have been. Change-Id: I75747c525aabbd9247473dd29b3a0e7a7d93c827 BUG: 1316533 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/13683 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* features/trash: wind mkdir with special pidAnoop C S2016-05-031-14/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Recent changes done w.r.t handling of mkdir calls in posix translator resulted in crashing the brick process from trash translator. This was due to the changes made in posix translator to return EPERM for every mkdir calls without 'gfid-req' set in dictionary. In order to avoid gfid mismatches during directory creation from brick side trash translator does not set 'gfid-req'. This patch is to have an exemption for trash based on a special pid set for those mkdir calls originating from trash translator and to reset it in callback. This patch also includes a small optimization to the existing test case for trash feature. > Reviewed-on: http://review.gluster.org/13776 > Smoke: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> (cherry picked from commit b5cfe948cb3569f034da80ac97b5d2f028b3b0e5) Change-Id: I59f084ac875e54342ecf2bffa6e43ebd84814153 BUG: 1332372 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-on: http://review.gluster.org/14173 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Smoke: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: Do not fsync when durability is offPranith Kumar K2016-04-291-0/+44
| | | | | | | | | | | | | | | | | | | | | | | >BUG: 1329501 >Change-Id: Id402c20f2fa19b22bc402295e03e7a0ea96b0c40 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14048 >Reviewed-by: Ravishankar N <ravishankar@redhat.com> >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Jeff Darcy <jdarcy@redhat.com> >(cherry picked from commit 302e218f68ef5edab6b369411d6f06cafea08ce1) Change-Id: Ifbf693f8de6765fca90a9ef3c11c1912c2e9885f BUG: 1331342 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14104 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* glusterd: check if glusterd is started on all nodes and allSakshi2016-04-281-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | bricks are started before performing rebalance Backport of http://review.gluster.org/#/c/10906/ > Change-Id: I458ea9cd86cf35bdb7d758be55f951ae9f3e66f0 > BUG: 1224857 > Signed-off-by: Sakshi <sabansal@redhat.com> > Reviewed-on: http://review.gluster.org/10906 > Smoke: Gluster Build System <jenkins@build.gluster.com> > CentOS-regression: Gluster Build System <jenkins@build.gluster.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> BUG: 1312722 Change-Id: Ib8e59b33e064be8301f682a4b08cb5cf10c22fc9 Signed-off-by: Sakshi <sabansal@redhat.com> Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/13537 Smoke: Gluster Build System <jenkins@build.gluster.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* glusterd: fix validation of lower op-version check in volume setAtin Mukherjee2016-04-261-0/+22
| | | | | | | | | | | | | | | | | Commit 2d87a98 introduced a validation to fail lowering down the cluster.op-version. Commit 2eb8758 actually changed the variable value from cluster's op-version to volume's op-version which resulted the logic go for a toss. Change-Id: I70df32b75c3a3fe47dc840c4a655059e5b124bca BUG: 1330545 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/14069 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/14077
* dht: add "nuke" functionality for efficient server-side deletionJeff Darcy2016-04-261-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a backport of the following two patches (of which the second is a trivial adjustment to a timeout for a test added by the first). http://review.gluster.org/13878 http://review.gluster.org/13935 This turns a special xattr into an rmdir with flags set. When that hits the posix translator on the server side, that causes the file/directory to be moved into the special "landfill" directory. From there, the posix janitor thread will take care of deleting it entirely on the server side - traversing it recursively if necessary. A couple of secondary issues were fixed to make this effective. * FUSE now ensures that setxattr values are NUL terminated. * The janitor thread now gets woken up immediately when something is placed in 'landfill' instead of only when file descriptors need to be closed. * The default landfill-emptying interval was reduced to 10s. To use the feature, issue a setxattr something like this: setfattr -n glusterfs.dht.nuke -v "" /mnt/glusterfs/vol/some_dir The value doesn't actually matter; the mere receipt of a request with this key is sufficient. Some day it might be useful to allow setting a required value as a sort of password, so that only those who know it can access the underlying special functionality. Change-Id: I4132a30d1faa53a6682399ad1d9041e2c4519951 BUG: 1330241 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/14065 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* cluster/afr: Fix inode-leak in data self-healPranith Kumar K2016-04-251-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | Thanks to Olia-Kremmyda for finding the bug on github review, https://github.com/gluster/glusterfs/commit/b8106d1127f034ffa88b5dd322c23a10e023b9b6 >Change-Id: Ib8640ed0c331a635971d5d12052f0959c24f76a2 >BUG: 1329773 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/14052 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Ravishankar N <ravishankar@redhat.com> >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> BUG: 1329779 Change-Id: I3d77f0b445fdedf2c582ea88f8d89e1da525638f Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14053 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
* cluster/distribute: detect stale layouts in entry fopsRaghavendra G2016-04-253-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dht_mkdir () { first-hashed-subvol = hashed-subvol for "bname" in in-memory layout of "parent"; inodelk (SETLKW, parent, "LAYOUT_HEAL_DOMAIN", "can be any subvol, but we choose first-hashed-subvol randomly"); { begin: hashed-subvol = hashed-subvol for "bname" in in-memory layout of "parent"; hash-range = extract hashe-range from layout of "parent"; ret = mkdir (parent/bname, hashed-subvol, hash-range); if (ret == "hash-value doesn't fall into layout stored on the brick (this error is returned by posix-mkdir)") { refresh_parent_layout (); goto begin; } } inodelk (UNLCK, parent, "LAYOUT_HEAL_DOMAIN", "first-hashed-subvol"); proceed with other parts of dht_mkdir; } posix_mkdir (parent/bname, client-hash-range) { disk-hash-range = getxattr (parent, "dht-layout-key"); if (disk-hash-range != client-hash-range) { fail-with-error ("hash-value doesn't fall into layout stored on the brick"); return 0; } continue-with-posix-mkdir; } Similar changes need to be done for dentry operations like create, symlink, link, unlink, rmdir, rename. These will be addressed in subsequent patches. This patch addresses only mkdir codepath. This change breaks stripe tests, as on some striped subvols dht layout xattrs are not set for some reason. This results in failure of mkdir. Since striped volumes are always created with dht, some tests associated with stripe also fail. So, I am making following tests changes (since stripe is out of maintainance): * modify ./tests/basic/rpc-coverage.t to not to use striped volumes * mark all (2) tests in tests/bugs/stripe/ as bad tests Change-Id: Idd1ae879f24a48303dc743c1bb4d91f89a629e25 BUG: 1329062 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/14040 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* Tier: tier command fails message when any node is downhari2016-04-221-20/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | back-port of : http://review.gluster.org/#/c/13918/ PROBLEM: the dict doesn't get set on the node if its down. so while printing the output on cli we get a ENOENT which ends in a tier command failed. FIX: this patch skips the node that wasn't available and carrys on with the next node for both tier status and tier detach status. >Change-Id: I718a034b18b109748ec67f3ace56540c50650d23 >BUG: 1324439 >Signed-off-by: hari <hgowtham@redhat.com> >Reviewed-on: http://review.gluster.org/13918 >Smoke: Gluster Build System <jenkins@build.gluster.com> >Tested-by: hari gowtham <hari.gowtham005@gmail.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Kaushal M <kaushal@redhat.com> Change-Id: Ia23df47596adb24816de4a2a1c8db875f145838e BUG: 1328410 Signed-off-by: hari <hgowtham@redhat.com> Reviewed-on: http://review.gluster.org/14030 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: hari gowtham <hari.gowtham005@gmail.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Dan Lambright <dlambrig@redhat.com>
* cluster/afr: Fix spurious entries in heal infoPranith Kumar K2016-04-201-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Locking schemes in afr-v1 were locking the directory/file completely during self-heal. Newer schemes of locking don't require Full directory, file locking. But afr-v2 still has compatibility code to work-well with older clients, where in entry-self-heal it takes a lock on a special 256 character name which can't be created on the fs. Similarly for data self-heal there used to be a lock on (LLONG_MAX-2, 1). Old locking scheme requires heal info to take sh-domain locks before examining heal-state. If it doesn't take sh-domain locks, then there is a possibility of heal-info hanging till self-heal completes because of compatibility locks. But the problem with heal-info taking sh-domain locks is that if two heal-info or shd, heal-info try to inspect heal state in parallel using trylocks on sh-domain, there is a possibility that both of them assuming a heal is in progress. This was leading to spurious entries being shown in heal-info. Fix: As long as there is afr-v1 way of locking, we can't fix this problem with simple solutions. If we know that the cluster is running newer versions of locking schemes, in those cases we can give accurate information in heal-info. So introduce a new option called 'locking-scheme' which if it is 'granular' will give correct information in heal-info. Not only that, Extra network hops for taking compatibility locks, sh-domain locks in heal info will not be necessary anymore. Thus it improves performance. >BUG: 1322850 >Change-Id: Ia563c5f096b5922009ff0ec1c42d969d55d827a3 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/13873 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Ashish Pandey <aspandey@redhat.com> >Reviewed-by: Anuradha Talur <atalur@redhat.com> >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> >(cherry picked from commit b6a0780d86e7c6afe7ae0d9a87e6fe5c62b4d792) Change-Id: If7eee18843b48bbeff4c1355c102aa572b2c155a BUG: 1294675 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14039 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* NFS: new option nfs.rdirplus addedSakshi Bansal2016-04-181-0/+13
| | | | | | | | | | | | | | | | | | | | When this option is 'disabled', NFS falls back to standard readdir instead of readdirp Backport of http://review.gluster.org/#/c/13782/ > Change-Id: Icaaf4da6533bee56160d4a81e42bb60f7d341945 > BUG: 1302948 > Signed-off-by: Sakshi Bansal <sabansal@redhat.com> Change-Id: Icaaf4da6533bee56160d4a81e42bb60f7d341945 BUG: 1312721 Signed-off-by: Sakshi Bansal <sabansal@redhat.com> Reviewed-on: http://review.gluster.org/13916 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* cluster/afr: Fix witness counting code in src/sink detectionPranith Kumar K2016-04-161-2/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: In afr-v1 pre-op, xattrop increments self xattr first then it increments the value on rest. In post-op, xattr value is decreased first on rest and at last it gets decremented on self. So for a possible operation to be witnessed i.e. a fop is seen by the brick it is important to have at least 1 pending op because without completing pre-op fop won't come. The other possibility is when fop completes but at the time of post-op after decrementing pending counts on others just before decrementing its own pending count, the brick dies. Fix: Fix witness detection code in afr_self_heal_find_direction() >BUG: 1322253 >Change-Id: Ia7e76482c0a46e775e269bb96ec1b9490a3ac18f >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/13811 >Smoke: Gluster Build System <jenkins@build.gluster.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Ravishankar N <ravishankar@redhat.com> >(cherry picked from commit e88962f8c49ea1d65fa26703e5c11be3f21af2ba) Change-Id: I5d9a6d323b35409127c26f3ce61c5e1d91395b18 BUG: 1326212 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13975 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* extras: Add namespace for options in group-virt.exampleVijay Bellur2016-04-132-2/+17
| | | | | | | | | | | | | | | | | | | | | Commit 23ccabbeb7 introduced a new key "disperse.eager-lock" which causes a conflict with key "cluster.eager-lock" when option is used without the qualifying namespace. group-virt.example which gets installed as /var/lib/glusterd/ groups/virt contains options without namespace qualifiers. This patch adds the appropriate namespace to all options in group-virt.example. Change-Id: I2c09dd10d44138410d889ddeb805f01c641c6780 BUG: 1325630 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/13929 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13958 Smoke: Gluster Build System <jenkins@build.gluster.com> Tested-by: Kaushal M <kaushal@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kaushal M <kaushal@redhat.com>
* cluster/afr: Don't delete gfid-req from lookup requestPranith Kumar K2016-04-122-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Afr does dict_ref of the xattr_req that comes to it and deletes "gfid-req" key. Dht uses same dict to send lookup to other subvolumes. So in case of directories and more than 1 dht subvolumes, second subvolume till the last subvolume won't get a lookup request with "gfid-req". So gfid reset never happens on the directories in distributed replicate subvolume for 2nd till last subvolumes. Fix: Make a copy of lookup xattr request. Also fixed replies_wipe possibly resetting gfid to NULL gfid >BUG: 1312816 >Change-Id: Ic16260e5a4664837d069c1dc05b9e96ca05bda88 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: http://review.gluster.org/13545 >Smoke: Gluster Build System <jenkins@build.gluster.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.com> >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> >(cherry picked from commit 9b022c3a3f2f774904b5b458ae065425b46cc15d) Change-Id: Ia68193b559ec1dfd841cc5a22ef1fa801b866200 BUG: 1313693 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/13574 CentOS-regression: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.com>
* quota: check inode limits only when new file/dir is createdvmallika2016-04-062-55/+30
| | | | | | | | | | | | | | | | | | | | This is a backport of http://review.gluster.org/#/c/13911/ When a inode limit is full, writes to any existing file fails with disk quota exceed even if usage limit is not set or usage limit is not full. > BUG: 1323486 > Change-Id: I9679fe26a2839ade0b1541fa7f0a2b71ac6dcc31 > Signed-off-by: vmallika <vmallika@redhat.com> Change-Id: I55ec86ebecbb8490e557c61090f6fb8c6c449ec7 BUG: 1324058 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/13912 Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
* glusterd: build realpath post recreate of brick mount for snapshotAtin Mukherjee2016-04-051-0/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/13869 Commit a60c39d introduced a new field called real_path in brickinfo to hold the realpath() conversion. However at restore path for all snapshots and snapshot restored volumes the brickpath gets recreated post restoration of bricks which means the realpath () call will fail here for all the snapshots and cloned volumes. Fix is to store the realpath for snapshots and clones post recreating the brick mounts. For normal volume it would be done during retrieving the brick details from the store. Change-Id: Ia34853acddb28bcb7f0f70ca85fabcf73276ef13 BUG: 1324014 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/13869 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> Reviewed-on: http://review.gluster.org/13905 Reviewed-by: Vijay Bellur <vbellur@redhat.com>