summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * glusterfsd: Continuous errors are getting in mount logs while glusterd is downMohit Agrawal2016-11-231-3/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: when glusterd is down, getting the continuous mgmt_rpc_notify errors messages in the volume mount log for every 3 seconds,it will consume disk space. Solution: To reduce the frequency of error messages use GF_LOG_OCCASIONALLY. > BUG: 1388877 > Change-Id: I6cf24c6ddd9ab380afd058bc0ecd556d664332b1 > Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> > Reviewed-on: http://review.gluster.org/15732 > 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: Raghavendra Talur <rtalur@redhat.com> > Reviewed-by: Raghavendra G <rgowdapp@redhat.com> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> > (cherry picked from commit 7874ed245bcc80658547992205f8396f4dd3c76a) Change-Id: I32c7a2271333686b27b43e54a334c58d3da60a1d BUG: 1394108 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com> Reviewed-on: http://review.gluster.org/15822 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> Reviewed-by: Prashanth Pai <ppai@redhat.com>
| * glusterd: clean up old port and allocate new one on every restartAtin Mukherjee2016-11-237-77/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/#/c/15005/9. GlusterD as of now was blindly assuming that the brick port which was already allocated would be available to be reused and that assumption is absolutely wrong. Solution : On first attempt, we thought GlusterD should check if the already allocated brick ports are free, if not allocate new port and pass it to the daemon. But with that approach there is a possibility that if PMAP_SIGNOUT is missed out, the stale port will be given back to the clients where connection will keep on failing. Now given the port allocation always start from base_port, if everytime a new port has to be allocated for the daemons, the port range will still be under control. So this fix tries to clean up old port using pmap_registry_remove () if any and then goes for pmap_registry_alloc () This patch is being ported to 3.8 branch because, the brick process blindly re-using old port, without registering with the pmap server, causes snapd daemon to not start properly, even though snapd registers with the pmap server. With this patch, all the brick processes and snapd will register with the pmap server to either get the same port, or a new port, and avoid port collision. > Reviewed-on: http://review.gluster.org/15005 > 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: Avra Sengupta <asengupt@redhat.com> (cherry picked from commit c3dee6d35326c6495591eb5bbf7f52f64031e2c4) Change-Id: If54a055d01ab0cbc06589dc1191d8fc52eb2c84f BUG: 1369766 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/15308 Tested-by: Avra Sengupta <asengupt@redhat.com> 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: Niels de Vos <ndevos@redhat.com>
| * xlators/trash : Remove upper limit for trash max file sizeJiffin Tony Thottan2016-11-232-18/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently file which size exceeds more than 1GB never moved to trash directory. This is due to the hard coded check using GF_ALLOWED_MAX_FILE_SIZE. Upstream reference : >Change-Id: I2ed707bfe1c3114818896bb27a9856b9a164be92 >BUG: 1386766 >Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> >Reviewed-on: http://review.gluster.org/15689 >Smoke: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Anoop C S <anoopcs@redhat.com> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> >Reviewed-by: Vijay Bellur <vbellur@redhat.com> >(cherry picked from commit cd9be49f6fe05d424989c0686a7e55a3f3ead27e) Change-Id: I2ed707bfe1c3114818896bb27a9856b9a164be92 BUG: 1392364 Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com> Reviewed-on: http://review.gluster.org/15785 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: Anoop C S <anoopcs@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
| * marker: Fix inode value in loc, in setxattr fopPoornima G2016-11-212-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of http://review.gluster.org/15826 On recieving a rename fop, marker_rename() stores the, oldloc and newloc in its 'local' struct, once the rename is done, the xtime marker(last updated time) is set on the file, but sending a setxattr fop. When upcall receives the setxattr fop, the loc->inode is NULL and it crashes. The loc->inode can be NULL only in one valid case, i.e. in rename case where the inode of new loc can be NULL. Hence, marker should have filled the inode of the new_loc before issuing a setxattr. > Reviewed-on: http://review.gluster.org/15826 > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Kotresh HR <khiremat@redhat.com> > Smoke: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> (cherry picked from commit 46e5466850311ee69e6ae9a11c2bba2aabadd5de) Change-Id: Id638f678c3daaf4a5c29b970b58929d377ae8977 BUG: 1396418 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/15878 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> 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>
| * upcall: Fix a log levelPoornima G2016-11-181-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In upcall_cache_invalidation(), the gfid can be NULL in certain valid test cases(eg: entry for ".." in readdirp), hence change the log level from WARNING to DEBUG. Backport of http://review.gluster.org/15777 > Reviewed-on: http://review.gluster.org/15777 > 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: Rajesh Joseph <rjoseph@redhat.com> > Reviewed-by: Jeff Darcy <jdarcy@redhat.com> (cherry picked from commit 68d1480e6056d1be91cde5129a6809642eeee857) Change-Id: Ic90167a0e2076694e9131913114460df7b939b30 BUG: 1394187 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/15828 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> Smoke: Gluster Build System <jenkins@build.gluster.org>
| * common-ha: nfs-grace-monitor timed out unknown error messagesKaleb S. KEITHLEY2016-11-161-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | grace_mon_monitor() occasionally returns OCF_ERR_GENERIC, but it ought to return OCF_NOT_RUNNING instead. Change-Id: I3d550e33cc3d0a8dce4333ced72db19b3b2f4f2e BUG: 1394226 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/15833 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: jiffin tony Thottan <jthottan@redhat.com>
| * common-ha: remove /etc/corosync/corosync.conf in teardown/cleanupKaleb S. KEITHLEY2016-11-151-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In newer versions of corosync we observe that after tearing down an existing HA cluster, when trying to set up a new cluster, `pcs cluster start --all` will fail if corosync believes the nodes are already in the cluster based on the presence of, and the contents of /etc/corosync/corosync.conf So we summarily delete it. (An alternative/work-around is to use `pcs cluster start --force --all`) Change-Id: I225f4e35e3b605e860ec4f9537c40ed94ac68625 BUG: 1394883 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/15845 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* | Another shot at stablizing halo prove testsKevin Vigor2017-01-041-5/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: This time for sure! Changeset 7a6ead5 introduced a bug which allowed halo to exceed the halo-max-replicas setting; the setting is only honored once halo-min-samples pings have been received. This is fixed by using the global halo-enabled flag when enforcing halo-max-replicas. The remainder of this changeset is enhanced debugs. Test Plan: prove tests/basic/halo* Reviewers: Subscribers: Tasks: Blame Revision: Change-Id: I8231a6c66f2c620d99e3418ed0eca757d50f085a Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16326 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
* | Make halo prove tests less racyKevin Vigor2017-01-043-5/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Halo prove tests were racy in a couple of ways. First, they raced against the self-heal daemon (e.g. write to volume with two bricks up and then assert that only two bricks have data file; but shd will properly copy file to third brick sooner or later). Fix by disabling shd in such tests. Second, tests rely on pings to complete and set halo state as expected, but do not check for this. If writing begins before initial pings complete, all bricks may be up and receive the data. Fix by adding explicit check for halo child states. Test Plan: prove tests/basic/halo*.t (prior to this changeset, would fail within ~10 iterations on my devserver and almost always on centos regression. Now runs overnight without failure on my devserver). Reviewers: Subscribers: Tasks: Blame Revision: Change-Id: If6823540dd4e23a19cc495d5d0e8b0c6fde9a3bd Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16325 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
* | cluster/afr: Hybrid mounts must honor _marked_ up/down statesRichard Wareing2016-12-291-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Qsorted latencies must also take into account that a host can be marked down yet still have a (slightly) better latency. This can happen if max-replicas is reached, and there are multiple bricks which meet the halo threshold. In such a case we must prefer the brick which is marked up albeit with a perhaps slightly higher latency. It's not worth doing any sort of swap in this case as it's going to be jarring to the cluster and introduce flapping behavior. Test Plan: - Halo prove tests @ https://phabricator.fb.com/P56251020 Reviewers: sshreyas, kvigor Reviewed By: kvigor Blame Revision: Change-Id: I858bbf44638a4978093dc56d4a98c96be4f8b45e Change-Id: Ie3b79700ec63398bc30e7bcf75fb05931dd5d0d0 FB-commit-id: deb2f35db6f8b979857b4e3779b2a41c59a2e416 Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16307 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
* | cluster/afr: Hybrid Halo mountsRichard Wareing2016-12-296-23/+337
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Implements "Hybrid" halo mounts which perform write FOPs synchronously to all regions and read FOPs asynchronously to those nodes within the region. - Leverages the fact that the inode cache stores "hints" as to the clean/dirty state of upto 16 replicas in the cluster; upon refresh of an inode we can do a fresh lookup to get a "wise" node if none exist in our region - Activated via the cluster.halo-hybrid-mode option Test Plan: - Run AFR prove tests - Run halo prove tests Reviewers: kvigor, sshreyas Reviewed By: kvigor, sshreyas FB-commit-id: aca760757afd45e4de2e28dc31b87a73ee52f12d Change-Id: Ic6728ce93b7b96e3151dccdebccd30e007f4750c Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16306 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: Shreyas Siravara <sshreyas@fb.com>
* | Fix Halo tests in v3.6.3 of GlusterFS + minor SHD bug fixRichard Wareing2016-12-293-25/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - SHD is now excluded from the max-replicas policy. We'd need to make an SHD specific tunable for this to make tests reliably pass, and frankly it probably makes things more intuitive having SHD excluded (i.e. SHD can always see everything). - Updated the halo-failover-enabled test, I think it's a bit more clear now, and works reliably. halo.t fixed after fixing the SHD max-replicas bug. Test Plan: - Run prove tests -> https://phabricator.fb.com/P19872728 Reviewers: dph, sshreyas Reviewed By: sshreyas FB-commit-id: e425e6651cd02691d36427831b6b8ca206d0f78f Change-Id: I57855ef99628146c32de59af475b096bd91d6012 Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16305 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: Shreyas Siravara <sshreyas@fb.com>
* | Add halo-min-samples option, better swap logic, edge case fixesRichard Wareing2016-12-288-57/+161
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Changes halo-decision to be based on the lowest halo value observed - Adds halo-min-sample option to wait until N latency samples have been gathered prior to activating halos. - Fixed 3 edge cases where halo's weren't being correctly config'd, or not configured as quickly as is possible. Namely: 1. Don't mark a child down if there's no better alternative (and you'd no longer satisfy min/max replicas); fixes unneccessary flapping. 2. If a child goes down and this causes us to fall below max_replicas, swap in a warm child immediately if it is within our halo latency (don't wait around for the next "ping"); swaps in a new child immediately helping with resiliency. 3. If the child latency is within the halo, and it's currently marked up, mark it down if it's the highest latency child and the number of children is > max_replicas; this will allow us to support the SHD use-case where we can "beam" a single copy to a geo and have it replicate within the geo after that. - More commenting Test Plan: - Run halo prove tests - Pointed compiled code at gfsglobal.prn2, tested out an NFS daemon and FUSE mounts to ensure they worked as expected on a large scale cluster. Reviewers: dph, jackl, cjh, mmckeen Reviewed By: mmckeen FB-commit-id: 7e2e8ae6b8ec62a5e0b31c9fd6100c81795b3424 Change-Id: Iba2b2f1bc848b4546cb96117ff1895f83953a4f8 Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16304 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: Shreyas Siravara <sshreyas@fb.com>
* | Make Halo calculate & use average latencies, not realtimeRichard Wareing2016-12-274-10/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Realtime latencies in practice have far too much jitter under real loading conditions, instead let's use a running average which will get very "heavy" over time such that temp spikes in brick latency will not affect halo decisions. Test Plan: - Run prove tests Reviewed By: mmckeen Change-Id: I5ebf9bc93c67d9a226287796dd7ca5eeb7b1cfa5 Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16301 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: Shreyas Siravara <sshreyas@fb.com>
* | Add option to toggle x-halo fail-overRichard Wareing2016-12-277-19/+132
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Adds "halo-failover-enabled" option to enable/disable failing over to a brick outside of the defined halo to satisfy min-replicas - There are some use-cases where failing over to a brick which is out of region will be undesirable. I such cases we will more than likely opt to have more replicas within the region to tolerate the loss of a single replica in that region without losing quorum. - Fixed quorum accounting problem as well, now correctly goes RO in case where we lose a brick and aren't able to swap one in for some reason (fail-over not enabled or otherwise) Test Plan: - run prove -v tests/basic/halo.t - run prove -v tests/basic/halo-disable.t - run prove -v tests/basic/halo-failover-enabled.t - run prove -v tests/basic/halo-failover-disabled.t Reviewers: dph, cjh, jackl, mmckeen Reviewed By: mmckeen Conflicts: xlators/cluster/afr/src/afr.h xlators/mount/fuse/utils/mount.glusterfs.in Change-Id: Ia3ebf83f34b53118ca4491a3c4b66a178cc9795e Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16275 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
* | Fix halo-enabled optionRichard Wareing2016-12-211-8/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - This option was broken (or shall we say....not fully implemented? :) ), it needs to set the halo-latency to FLT_MAX to gaurentee no bricks will be marked down, and all those presently marked down @ runtime shall be marked back up upon the transition from true to false - Also fixes tests/bugs/fb2518260.t Test Plan: Prove tests (paste coming) Reviewers: cjh, dph, mmckeen Reviewed By: mmckeen Differential Revision: https://phabricator.fb.com/D1435264 Conflicts: xlators/cluster/afr/src/afr-common.c Change-Id: I81209d6f2cc9ea7e562eedf44bf3efbe87e01bf7 Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16227 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
* | Repair cluster prove tests for FB environmentKevin Vigor2016-12-217-15/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Several prove tests use the 'launch_cluster' function to set up a clustered volume. This replies on using multiple local IP addresses, one for each server. Since IPV6 provides only ::1 as a local address, as opposed to IPv4's complete 127.x.x.x subnet, this cannot work in a pure IPv6 environment. However, FB systems do at least have enough IPv4 stack to talk locally, so fix launch_cluster to work properly when default transport is IPv6. To do this: 1) explicitly set transport.address-family volume option to inet in launch_cluster(). 2) teach glusterd to honor transport.address-family when connecting to peer glusterds in glusterd_friend_rpc_create(). Previously transport.address-family was used only for binding local socket, not for communicating with peers. Test Plan: prove -f --timer ./tests/basic/glusterd/arbiter-volume-probe.t Reviewers: Subscribers: Tasks: Blame Revision: Change-Id: I077d8549dcdbe4919ac7df34856a4b2d1428cdb6 Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16225 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
* | nfs: [FB-ONLY] Disable rmtabShreyas Siravara2016-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - We have disabled the use of rmtab in our environment due to the its impact on performance in NFS. Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: I6c2db19e49791aa4938f38a55dbb8ee3e17661e9 Reviewed-on: http://review.gluster.org/16220 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Shreyas Siravara <sshreyas@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kevin Vigor <kvigor@fb.com>
* | client: Increase default ping-timeout to 180 secondsShreyas Siravara2016-12-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - We've seen lots of issues when the ping timeout is too low @ 60 seconds. - This diff defaults the value to 180 seconds. - This is a cherry-pick of D3753765 to 3.8. Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: I70b96b027ac024df63af4ca1aa768f973295b7e4 Reviewed-on: http://review.gluster.org/16219 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Shreyas Siravara <sshreyas@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kevin Vigor <kvigor@fb.com>
* | cluster/dht: Bug fixes to cluster.min-free-diskRichard Wareing2016-12-2013-37/+233
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Enforces FUSE/gNFSd/SHD/rebalance rejection of writes when all subvolumes are beyond the value set in "cluster.min-free-disk" - Fixes existing code paths to be more intuitive & straightforward - Write path now honors min-free-disk - Adds test to ensure feature doesn't break in future - This is a port of D2981282 to 3.8 Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: I76923bf76178fe589aa1a26bd1970cf8d009642a Reviewed-on: http://review.gluster.org/16153 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> Tested-by: Shreyas Siravara <sshreyas@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* | Fixes halo multi-region fail-over regressionRichard Wareing2016-12-202-4/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - After the afr-common.c refactor the quorum accounting broke, this diff fixes things so when an alternate brick is swapped in to provide the min-replicas quorum accounting works correctly and the FS doesn't go RO. In short, the magic which makes halo clusters seamlessly fail-over to a remote region for writes broke :). Test Plan: prove -v tests/basic/halo-failover.t -> https://phabricator.fb.com/P12179467 Reviewers: dph, jackl, cjh Reviewed By: cjh Subscribers: meyering Differential Revision: https://phabricator.fb.com/D1390670 Tasks: 4117827 Change-Id: I2d7fb8ca1e80cd1b21cc12b11b0a3db812321080 Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16203 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: Shreyas Siravara <sshreyas@fb.com>
* | Add TESTER_CFLAGS config option; use to fix proves tests in FB environmentKevin Vigor2016-12-203-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When building tests using build_tester in FB environment, we need to pass additional library flags. Plumb up to the --with-fbextras option. Test Plan: prove -f --timer ./tests/basic/gfapi/anonymous_fd.t Reviewers: Subscribers: Tasks: Blame Revision: Change-Id: Ibd04851234f9367d6a3192ba2d4440ce3fa4a45b Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16204 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: Shreyas Siravara <sshreyas@fb.com>
* | gfproxy: Add fops-sanity test for GFProxyShreyas Siravara2016-12-191-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Adds the fops-sanity test for GFProxy so we have more coverage for both regular FUSE mounts and GFProxy FUSE mounts. Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: I0f17315098a48b7295d6eb5f92616e9c7dfc278a Reviewed-on: http://review.gluster.org/16189 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: Kevin Vigor <kvigor@fb.com>
* | storage/posix: Add free space limits to bricksKevin Vigor2016-12-197-16/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Add a configurable minimum free space for bricks, using the new options storage.min-free-disk (analagous to cluster.min-free-disk, and using the same units: either a percentage or an absolute number of bytes) and storage.freespace-check-interval (how frequently to check free space, in seconds). - This is a cherry-pick of D2920210 to 3.8 Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: I4b87e421aad023e49b5972c6e61539670a818411 Reviewed-on: http://review.gluster.org/16176 Tested-by: Shreyas Siravara <sshreyas@fb.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kevin Vigor <kvigor@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* | debug/io-stats: Add errors to FOP samplesShreyas Siravara2016-12-182-51/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Captures the error of an operation in the FOP sample. - Cherry-pick of D3306106 to io-stats Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: Ia32a5b34bbd36981ac693a8829c70fa74b02d38d Reviewed-on: http://review.gluster.org/16175 Tested-by: Shreyas Siravara <sshreyas@fb.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: Kevin Vigor <kvigor@fb.com>
* | Repair EC tests for FB environment (/mnt/gvfs is teh sux00r)Kevin Vigor2016-12-182-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Don't blindly 'df', target the volume in question. Test Plan: runtests.sh Reviewers: Subscribers: Tasks: Blame Revision: Change-Id: Ic2c5883dd102835db64be9594657257e20711ba0 Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16182 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> Tested-by: Shreyas Siravara <sshreyas@fb.com> Reviewed-by: Shreyas Siravara <sshreyas@fb.com>
* | nfs: Fix compiler warning when calling svc_getcallerKevin Vigor2016-12-181-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - The result needs to be cast to (struct sockaddr_in *) - This diff is a cherry-pick of D3111554 to 3.8 Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: If4c27dbe6c032f9e278ea08cd3c96a4d07bcc5f9 Reviewed-on: http://review.gluster.org/16179 Tested-by: Shreyas Siravara <sshreyas@fb.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kevin Vigor <kvigor@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* | nfs: Fill in pargfid in NFS requestsKevin Vigor2016-12-171-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - The NFS server would occasionally send requests to the bricks which contained a null parent gfid and a name, even though a proper parent inode was available. This caused name resolution to fail on the brick. When this occurred while trying to obtain a lock on a file, it could lead to the NFS server concluding there was a lack of consensus, and hence returning EROFS. - This is a cherry-pick of D3064740 into 3.8 Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: Iae63c1f39abe74d4101058f494d1e14fda1c1912 Reviewed-on: http://review.gluster.org/16180 Tested-by: Shreyas Siravara <sshreyas@fb.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kevin Vigor <kvigor@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* | Adding halo-enable optionRichard Wareing2016-12-174-7/+76
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Master option for halo geo-replication - Added prove test for halo mode - Updated options do values which should work "out of the box" for most use-cases, just run "enable" halo mode and you are done, the options can be tweaked as needed from there. Test Plan: - Enabled option, verified halo works, disabled option verified async behavior is disabled - Ran "prove -v tests/basic/halo.t" -> https://phabricator.fb.com/P12074204 Reviewers: jackl, dph, cjh Reviewed By: cjh Subscribers: meyering Differential Revision: https://phabricator.fb.com/D1386675 Tasks: 4117827 Conflicts: xlators/cluster/afr/src/afr-self-heal-common.c xlators/cluster/afr/src/afr.h Change-Id: Ib704528d438c3a42150e30974eb6bb01d9e795ae Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16172 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* | debug/io-stats: [FB-Only] Update JSON key name to 'storage.gluster'Shreyas Siravara2016-12-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Our keys are prefixed by storage.gluster, not gluster. - This is a cherry-pick of D1184318. Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: Iaf3d3b4ccd285853c7750759db20404607941c0e Reviewed-on: http://review.gluster.org/16151 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kevin Vigor <kvigor@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* | protocol/client: Fix race in brick reconnectionKevin Vigor2016-12-161-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - A race condition exists when reconnecting to a brick after connection has been lost; it is possible for the client translator to believe the connection is down while the socket layer believes the connection is up. This situation is permanent and eventually leads to loss of quorum and EROFS errors. - This is a cherry-pick of D3490020 to 3.8 Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: Ida7afbafd3dceadf9ca7ea8b350aa88db382dd88 Reviewed-on: http://review.gluster.org/16174 Reviewed-by: Kevin Vigor <kvigor@fb.com> Tested-by: Shreyas Siravara <sshreyas@fb.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>
* | Fix deadlock observed in T13390459Kevin Vigor2016-12-161-6/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Fix deadlock in ping timer callback. Test Plan: run, mount volume. Reviewers: rwareing Reviewed By: rwareing Differential Revision: https://phabricator.intern.facebook.com/D3744945 Signature: t1:3744945:1474061471:3e3d1a5cefc541d26973535887c1f08c017fc049 Change-Id: Iaf94eb4c3acaa8b3ceeeb6a273db4109eea29a7c Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16168 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* | nfs: Tear down transports for requests that arrive before the volume isShreyas Siravara2016-12-161-0/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | initialized Summary: - Disconnects RPC transports for requests that cannot be serviced because volumes are not ready. - This is a cherry-pick of D2991403 Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: I07ff0795b81d25624541ff981b5f2586d078e9a6 Reviewed-on: http://review.gluster.org/16154 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Kevin Vigor <kvigor@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* | Allow OS to assign us a portKevin Vigor2016-12-163-0/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Replace complex and slow port selection code with bind(0). Test Plan: runtests.sh Reviewers: sshreyas Subscribers: Tasks: Blame Revision: Change-Id: I408a8528e58e1aafcd32eba6a8f1a759e0bf274e Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16150 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
* | debug/io-stats: Track path of operations in FOP samplesShreyas Siravara2016-12-162-129/+520
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - This diff adds the ability to track paths in our FOP samples. - It adds a function called `attach_iosstat_to_inode()` which attaches a special struct containing the filename, to the inode. - This diff attaches a struct, `ios_local` to each frame, and tracks paths, locs, fds, and inodes depending on the fop that it is executing. - Operations done on this inode can then reference this path. Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: Ie43b2193f66d8c7f59b5d07293e07d6120e3b20a Reviewed-on: http://review.gluster.org/16149 Tested-by: Shreyas Siravara <sshreyas@fb.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kevin Vigor <kvigor@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* | socket: Keepalives should happen on IPv6 as well as IPv4Shreyas Siravara2016-12-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Check for AF_INET *and* AF_INET6. - This is a cherry-pick of D3057373 to 3.8 Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: I53eb79284eddfee6e13821c6570809f575b96769 Reviewed-on: http://review.gluster.org/16155 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kevin Vigor <kvigor@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* | nfs: Check for null buf, and set op_errno to EIO not 0Richard Wareing2016-12-161-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Prevent crashes for the case where "getattr" actually failed and returned with a NULL buf, but the op_errno was set to 0. - This is a cherry-pick of D1571184 Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: Ia2d6ad7539df714f9420dcf063c7c14e727bb7e3 Reviewed-on: http://review.gluster.org/16152 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: Kevin Vigor <kvigor@fb.com>
* | gfproxy: Introduce new server-side daemon called GFProxyShreyas Siravara2016-12-1621-21/+2806
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summmary: - Adds a new server-side daemon called gfproxyd & a new FUSE client called gfproxy-client - Adds a new translator called AHA (Advanced High-Availability) that manages failover between gfproxy servers & FOP replay for failed FOPS. Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: Iba0bd54e6b4035b8d7914aab64bcac9e93089dd7 Reviewed-on: http://review.gluster.org/16136 Tested-by: Shreyas Siravara <sshreyas@fb.com> 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: Kevin Vigor <kvigor@fb.com>
* | core: Disable the memory pooler in Gluster via a build flagShreyas Siravara2016-12-152-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Passing --disable-mempool to configure will disable the mempool. Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: I748d5afd67811ba9fdee6d651dbdb9d57e9d9123 Reviewed-on: http://review.gluster.org/16145 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kevin Vigor <kvigor@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* | Halo Replication feature for AFR translatorRichard Wareing2016-12-1520-112/+622
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Halo Geo-replication is a feature which allows Gluster or NFS clients to write locally to their region (as defined by a latency "halo" or threshold if you like), and have their writes asynchronously propagate from their origin to the rest of the cluster. Clients can also write synchronously to the cluster simply by specifying a halo-latency which is very large (e.g. 10seconds) which will include all bricks. In other words, it allows clients to decide at mount time if they desire synchronous or asynchronous IO into a cluster and the cluster can support both of these modes to any number of clients simultaneously. There are a few new volume options due to this feature: halo-shd-latency: The threshold below which self-heal daemons will consider children (bricks) connected. halo-nfsd-latency: The threshold below which NFS daemons will consider children (bricks) connected. halo-latency: The threshold below which all other clients will consider children (bricks) connected. halo-min-replicas: The minimum number of replicas which are to be enforced regardless of latency specified in the above 3 options. If the number of children falls below this threshold the next best (chosen by latency) shall be swapped in. New FUSE mount options: halo-latency & halo-min-replicas: As descripted above. This feature combined with multi-threaded SHD support (D1271745) results in some pretty cool geo-replication possibilities. Operational Notes: - Global consistency is gaurenteed for synchronous clients, this is provided by the existing entry-locking mechanism. - Asynchronous clients on the other hand and merely consistent to their region. Writes & deletes will be protected via entry-locks as usual preventing concurrent writes into files which are undergoing replication. Read operations on the other hand should never block. - Writes are allowed from _any_ region and propagated from the origin to all other regions. The take away from this is care should be taken to ensure multiple writers do not write the same files resulting in a gfid split-brain which will require resolution via split-brain policies (majority, mtime & size). Recommended method for preventing this is using the nfs-auth feature to define which region for each share has RW permissions, tiers not in the origin region should have RO perms. TODO: - Synchronous clients (including the SHD) should choose clients from their own region as preferred sources for reads. Most of the plumbing is in place for this via the child_latency array. - Better GFID split brain handling & better dent type split brain handling (i.e. create a trash can and move the offending files into it). - Tagging in addition to latency as a means of defining which children you wish to synchronously write to Test Plan: - The usual suspects, clang, gcc w/ address sanitizer & valgrind - Prove tests Reviewers: jackl, dph, cjh, meyering Reviewed By: meyering Subscribers: ethanr Differential Revision: https://phabricator.fb.com/D1272053 Tasks: 4117827 Change-Id: I694a9ab429722da538da171ec528406e77b5e6d1 Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: http://review.gluster.org/16099 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: Shreyas Siravara <sshreyas@fb.com>
* | write-behind: Allow trickling-writes to be configurable, fix usage of ↵Shreyas Siravara2016-12-144-6/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | page_size and window_size Summary: - It adds a configurable option for "trickling-writes". - Makes `__wb_preprocess_winds()` use `wb_inode->window_conf` rather than `page_size`, so that the window-size option is actually respected. - This is a port of D3576122 & D3738605 to 3.8. Test Plan: - Prove test which looks @ brick-level FOPs and ensures that they fall in the right write-size bucket. Reviewed By: rwareing Signature: t1:3576122:1468892648:6923a6a19b18888577ce5173b5c9cb9531f941e7 Change-Id: I379a9f2f0c4768c9052b7e9dd71c5f0469cb2d68 Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Reviewed-on: http://review.gluster.org/16079 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kevin Vigor <kvigor@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* | performance/md-cache: Add an option to cache all xattrs for an inodeShreyas Siravara2016-12-141-11/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - We add an option to cache all extended attributes for an inode - This is an option to bypass the whitelisted xattrs to cache Test Plan: - Prove tests Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: Ia52bed22aa8d84f953fe1d022df929674d716e9e Reviewed-by: Kevin Vigor <kvigor@fb.com> Tested-by: Shreyas Siravara <sshreyas@fb.com> Reviewed-on: http://review.gluster.org/16126 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>
* | tests: Fix tests/bugs/distribute/bug-1161311.tShreyas Siravara2016-12-141-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - http://review.gluster.org/#/c/16078/ made rebalance faster and broke the test. - We made the file bigger so rebalance takes longer. Change-Id: I86f08d3d53bbff8373e954b8ae57a3a9a5942b74 Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Reviewed-on: http://review.gluster.org/16133 Reviewed-by: Kevin Vigor <kvigor@fb.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>
* | afr/cluster: Restore data-self-heal-window optionRichard Wareing2016-12-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Fixes a bug where data-self-heal-window was ignored and instead hard-coded to 128k - Cherry-pick of D2752781 Test Plan: - Prove tests Reviewed By: sshreyas Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: Ie38456ce9ad90921f7456fe02aaace88393433a9 Reviewed-on: http://review.gluster.org/16083 Tested-by: Shreyas Siravara <sshreyas@fb.com> 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: Kevin Vigor <kvigor@fb.com>
* | performance/io-threads: Reduce the number of timing calls in iot_workerMax Rijevski2016-12-092-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Reduce the amount of unnecessary timing calls in iot_worker servicing. - The current logic is unnecessarily accurate and hurts performance for many small FOPS. - This is a cherry-pick of D3156588 for 3.8 Test Plan: - Prove tests Change-Id: I6db4f1ad9a48d9d474bb251a2204969061021954 Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Reviewed-on: http://review.gluster.org/16081 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: Kevin Vigor <kvigor@fb.com>
* | dht/rebalance: Increase maximum read block size from 128 KB to 1 MBShreyas Siravara2016-12-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - The maximum block size, `DHT_REBALANCE_BLKSIZE`, is set to 128 KB. - As a result, migrating files in the megabytes to gigabytes can take much longer than necessary. - Some preliminary results by bumping the blocksize: With 128 KB: [2016-08-04 11:40:19.251167] I [MSGID: 109028] [dht-rebalance.c:2196:gf_defrag_status_get] 0-glusterfs: Rebalance is completed. Time taken is 15.00 secs [2016-08-04 11:40:19.251189] I [MSGID: 109028] [dht-rebalance.c:2200:gf_defrag_status_get] 0-glusterfs: Files migrated: 49, size: 2569011200, lookups: 149, failures: 0, skipped: 0 With 1 MB: [2016-08-04 11:41:21.093662] I [MSGID: 109028] [dht-rebalance.c:2196:gf_defrag_status_get] 0-glusterfs: Rebalance is completed. Time taken is 7.00 secs [2016-08-04 11:41:21.093687] I [MSGID: 109028] [dht-rebalance.c:2200:gf_defrag_status_get] 0-glusterfs: Files migrated: 49, size: 2569011200, lookups: 149, failures: 0, skipped: 0 - This is a cherry-pick of D3670927 to 3.8. Test Plan: Tested rebalance on devserver. Reviewed By: dph, rwareing Change-Id: Ide2edbf87ef9ae2b32a03f189c57b63e2f233fc8 Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Reviewed-on: http://review.gluster.org/16078 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: Kevin Vigor <kvigor@fb.com>
* | glusterd: Retry volfile server multiple timesShreyas Siravara2016-12-095-29/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Retry the volfile server when the initial connection fails. The default connect attempts is currently 200. - This is a port D2174716 & D3792748 to 3.8. Test Plan: Tested retry functionality on devserver. Reviewed By: rwareing Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: I22810d52b43107cc156483649fc160612677858a Reviewed-on: http://review.gluster.org/16077 Tested-by: Shreyas Siravara <sshreyas@fb.com> 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: Kevin Vigor <kvigor@fb.com>
* | features/locks: Add lock revocation functionality to posix locks translatorRichard Wareing2016-12-099-9/+395
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Motivation: Prevents cluster instability by mis-behaving clients causing bricks to OOM due to inode/entry lock pile-ups. - Adds option to strip clients of entry/inode locks after N seconds - Adds option to clear ALL locks should the revocation threshold get hit - Adds option to clear all or granted locks should the max-blocked threshold get hit (can be used in combination w/ revocation-clear-all). - Options are: features.locks-revocation-secs <integer; 0 to disable> features.locks-revocation-clear-all [on/off] features.locks-revocation-max-blocked <integer> - Adds monkey-locking option to ignore 1% of unlock requests (dev only) features.locks-monkey-unlocking [on/off] - Adds logging to indicate revocation event & reason Test Plan: First you will need TWO fuse mounts for this repro. Call them /mnt/patchy1 & /mnt/patchy2. 1. Enable monkey unlocking on the volume: gluster vol set patchy features.locks-monkey-unlocking on 2. From the "patchy1", use DD or some other utility to begin writing to a file, eventually the dd will hang due to the dropped unlocked requests. This now simulates the broken client. Run: for i in {1..1000};do dd if=/dev/zero of=/mnt/patchy1/testfile bs=1k count=10;done' ...this will eventually hang as the unlock request has been lost. 3. Goto another window and setup the mount "patchy2" @ /mnt/patchy2, and observe that 'echo "hello" >> /mnt/patchy2/testfile" will hang due to the inability of the client to take out the required lock. 4. Next, re-start the test this time enabling lock revocation; use a timeout of 2-5 seconds for testing: 'gluster vol set patchy features.locks-revocation-secs <2-5>' 5. Wait 2-5 seconds before executing step 3 above this time. Observe that this time the access to the file will succeed, and the writes on patchy1 will unblock until they hit another failed unlock request due to "monkey-unlocking". Change-Id: I814b9f635fec53834a26db634d1300d9a61057d8 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/14816 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-on: http://review.gluster.org/16086 Tested-by: Shreyas Siravara <sshreyas@fb.com> Reviewed-by: Kevin Vigor <kvigor@fb.com>
* | performance/io-threads: Eliminate spinlock contention via fops-per-thread-ratioRichard Wareing2016-12-093-5/+44
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Background: Frequently spinlock is observed on busy GFS clusters, which wastes CPU and destroys the performance of the cluster. Current solutions to this problem involve under-provisioning the thread pool, but this is problematic as during busy periods there may not be enough threads to service the queue. - This patch introduces a technique to avoid the stampeding herd problem with the io-threads workers. This is done by dynamically tuning the threads by a ratio of threads to queue depth, there-by keeping already running threads sufficiently busy by a tunable FOP to thread ratio. Ratio is controllable by the performanace.io-threads-fops-per-threads-ratio option. - More detailed reading on this approach can be found here: https://h21007.www2.hp.com/portal/download/files/unprot/hpux/MakingConditionVariablesPerform.pdf - Cherry-pick of D2530504 for 3.8 Test Plan: - Stress teston my dev server - shadow testing Reviewed By: moox, sshreyas Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: I771ae783aa4ca5a6fd0449db64e07d1f4bff0d04 Reviewed-on: http://review.gluster.org/16080 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Tested-by: Shreyas Siravara <sshreyas@fb.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kevin Vigor <kvigor@fb.com>
* | run-tests.sh: Disable NetBSD regression tests for FBShreyas Siravara2016-12-081-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Disable testing on NetBSD for FB Signed-off-by: Shreyas Siravara <sshreyas@fb.com> Change-Id: I3d7d3f9c8f002dcc029c49c1855dfad2eb494d00 Reviewed-on: http://review.gluster.org/16082 Tested-by: Shreyas Siravara <sshreyas@fb.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> Reviewed-by: David Hasson <dph@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>