summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* nfs: Fix crash bug when mnt3_resolve_subdir_cbk() failsShreyas Siravara2017-08-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: When mnt3_resolve_subdir_cbk() fails (this can happen when we race with gfs_stress.sh), authorized_path is sometimes NULL. We try to run strlen() on this path and as a result we crash. This diff fixes that by checking if path is NULL before dereferencing it. This bug exists in fb-release-3.6.3 & fb-release-3.6.3-stable. - This is a port of D3406533 to release-3.8-fb Test Plan: Run with patch and observe that there is no crash. Prove test for auth code. Reviewers: rwareing, kvigor Reviewed By: kvigor Subscribers: #posix_storage Change-Id: Ib24a9b640b066f72db30e9e08fccc512c0ff7bb6 Reviewed-on: https://review.gluster.org/18155 Reviewed-by: Shreyas Siravara <sshreyas@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org>
* io-stats: Expose io-thread queue depthsShreyas Siravara2017-08-309-10/+126
| | | | | | | | | | | | | | | | | | | | Summary: - This diff exposes the io-thread queue depths by sending a specialized getxattr() call down to the io-threads translator. - Port of D3086477, D3094145, D3095505 to 3.8 Test Plan: Tested on devserver, will run prove tests. Valgrind + ASAN pass as well. Reviewers: rwareing, kvigor Subscribers: dld, moox, dph Differential Revision: https://phabricator.fb.com/D3086477 Change-Id: Ia452a4fcdb9173a751c4cb48d739b25c235f6855 Reviewed-on: https://review.gluster.org/18143 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com>
* libglusterfs: Fix leak in client_t destroy structRichard Wareing2017-08-301-0/+2
| | | | | | | | | | | | | | | | | | | | | Summary: - People tell me free'ing authentication data after we are done with it is a good thing to do. - This is a port of D3071688. Test Plan: - Ran valgrind w/ looping FUSE mount requests and watches "definitely lost", it no longer goes up the more we mount/umount Reviewers: kvigor, sshreyas Subscribers: moox, dld, dph Change-Id: Ia3d4a5bdd431006bd2d39b957cfe27f1ba3ef16e Reviewed-on: https://review.gluster.org/18142 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* storage/posix: Fix crash bug in posix_make_ancestryfromgfidRichard Wareing2017-08-304-5/+28
| | | | | | | | | | | | | | | | | | | | | | | Summary: - Per title, adding OOPS logging - Clean-up quota related log spew from when older clients connect to 3.6.x quota enabled clusters Test Plan: - Spew: Tested on dev servers, one with old client against dev server w/ 3.6.3_fb - Crash: Canaried on offending node (gfsai040.prn2) and ensure crash no longer happens - Canary on gfsbudev shadow tiers once approved - This is a port of D2894799 to 3.8 Reviewers: sshreyas, dph, dld, moox Change-Id: I13e7d6915ee301b8d607d5770ef2261a9ab78493 Reviewed-on: https://review.gluster.org/18140 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> Smoke: Gluster Build System <jenkins@build.gluster.org>
* gNFSd: Auto re-register NFS/Mount programs with rpcbind periodicallyShreyas Siravara2017-08-305-9/+112
| | | | | | | | | | | | | | | | | | | | | | | | | Summary: Every once in a while rpcbind crashes and the NFS endpoints go bye-bye. This diff makes it such that we should almost never encounter the case where we have NFS up and rpcbind down causing bad endpoints and hanging mounts for our customers. Test Plan: Added prove tests + tested on dev server Reviewers: dph, moox, rwareing Reviewed By: rwareing Differential Revision: https://phabricator.fb.com/D2571724 Tasks: 8803558 Change-Id: I35acb2d731185a7b20020cb57bdd4d879e978df4 Signature: t1:2571724:1445555327:3276a4dcc4da71346b09d4aeb46c69dddcc7c5ba Reviewed-on: https://review.gluster.org/17961 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* Make a DHT subvolume go read-only when a subvolume crashesShreyas Siravara2017-08-304-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: When subvolumes crash, users get messages like "No such file or directory" or "I/O Error" when doing operations that are cluster-wide, i.e., operations that touch the subvolume that has crashed. These include operations like mkdir() and rmdir() which are cluster-wide, as well as reads/writes/creates that hash to the dead subvolume. DHT does the right thing by disallowing operations to the subvolume -- it is effectively putting the subvolume in "read-only" mode to protect data, but it does not return the correct error. As a result, users of the filesystem think that the data is gone (in the case of "No such file or directory", or worse a blanket error that means nothing in the case of EIO). DHT sets the errno to ENOENT, which while makes sense in the context of DHT (No subvolume entry, hence ENOENT), the error it should bubble up to the user is EROFS, since it is putting the system in read-only mode. This diff changes the error messages to EROFS so the users get a more clear message of what is going on. Test Plan: Tested by downing a subvolume and checking error codes. Also ran other prove tests to make sure they pass. Change-Id: I20ad6fe31dbd66536db2a69246771ffad0140db3 Reviewers: rwareing, dph, moox Reviewed-on: https://review.gluster.org/17952 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com>
* configure: add missing square bracketsKinglong Mee2017-08-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | $ sh autogen.sh ... GlusterFS autogen ... Running aclocal... configure.ac:939: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... configure.ac:939: the top level Running autoheader... configure.ac:939: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... configure.ac:939: the top level Running libtoolize... Running autoconf... configure.ac:939: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... configure.ac:939: the top level Running automake... configure.ac:939: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body ../../lib/autoconf/lang.m4:193: AC_LANG_CONFTEST is expanded from... configure.ac:939: the top level Change-Id: If5cecd75deb6a54c267eac899ca9e3c37d098193 Signed-off-by: Kinglong Mee <mijinlong@open-fs.com> Reviewed-on: https://review.gluster.org/18038 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> Tested-by: Kinglong Mee <kinglongmee@gmail.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* cluster/afr: SHD should not use did_discovery code pathsRichard Wareing2017-08-293-1/+7
| | | | | | | | | | | | | | | | | | | | | | Summary: - Exempt the SHD from the discover code path Test Plan: - prove -v tests/bugs/fb8149516.t - Make rc and canary on offending host (gfsdataswarm048.prn2) Reviewers: moox, dph, sshreyas Reviewed By: sshreyas Differential Revision: https://phabricator.fb.com/D2491694 Change-Id: I5ec3997cf26375e834c3c7c4ea6c174eef957b8b Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/18141 Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com>
* fb-smoke: Minor fixkrad2017-08-291-2/+2
| | | | | | | | | | | | | | Summary: Minor bash issues Test Plan: Run remote test Differential Revision: https://phabricator.intern.facebook.com/D5726446 Change-Id: If95d091bf53b2959a36bc89a2ba056d333833a26 Tasks: T20082902 Reviewed-on: https://review.gluster.org/18136 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* Add negative caching to nfs auth cacheShreyas Siravara2017-08-295-351/+289
| | | | | | | | | | | | | | | | | | | | | | | | Summary: This diff adds the ability to the nfs daemon to cache hosts it has deauthorized for mounts, not just the hosts it has authorized. This allows a host that has been denied to be deauthorized for ttl # of seconds, or until the nfs daemon has restarted. Test Plan: Use the prove tests to maintain the integrity of the auth code. Test manually to see if the correct code path is being hit. Reviewers: dph, rwareing Reviewed By: rwareing Differential Revision: https://phabricator.fb.com/D1947728 Change-Id: I9728e15913e0900ab34311b13b30eba0b91ce33f Reviewed-on: https://review.gluster.org/18134 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* fb-smoke: Add test_envkrad2017-08-292-23/+171
| | | | | | | | | | | | | | Summary: test_env provides test settings for 3.8 Test Plan: Run unit tests Differential Revision: https://phabricator.intern.facebook.com/D5671384 Change-Id: I1bab102b83d5fffe5ffcc568d2f82d19c78c84d5 Reviewed-on: https://review.gluster.org/18080 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* features/locks: Fix crash bug in connection (lock) clean-up flowRichard Wareing2017-08-282-12/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Fixes crash bug where bricks can crash when the "clear locks" command is run (by CLI or by revocation code) and sockets are later cleaned-up causing bricks to crash. Crash bug is due to use-after-free due to refs being left to the lock in the client-list. When this list is later traversed it triggers a crash as pointers are now pointing to garbage. Test Plan: - Ran with monkey-unlock and tested connection clean-ups after lock revocation Reviewers: sshreyas, dph, moox Reviewed By: moox Differential Revision: https://phabricator.fb.com/D2695087 Tasks: 6207062 Change-Id: Iea26efe4bfbadc26431a3c50a0a8bda218bb5219 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/18122 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* cluster/afr: Remove "compatability" code from SHD flowRichard Wareing2017-08-281-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - After examining some lock revocations, I recommend we remove this (problematic?) code which causes a lock to be held outside of the SHD locking domain. - The theory is that this lock should never conflict with anything outside of the SHD flow since the offsets are so huge. However in practice with lock revocation the lock lives a very long time, and I worry what the other implications of this might be. Test Plan: - Run tests/basic/afr/* (w/ D2706710) Reviewers: dph, moox, sshreyas Reviewed By: sshreyas Differential Revision: https://phabricator.fb.com/D2706717 Change-Id: I1f358f66810d104f28def9d1ac2a4fde3d073c92 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/18123 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* cluster/afr: Delete "special domain" AFR heal flowRichard Wareing2017-08-281-48/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Reverts code from 50998ae08c5a767468ee85cb5c53bb5554ff734a, this was originally intended for backward compat w/3.5. This isn't relevant for us, and everywhere we see stuck heals we tend to see this "aaaaaaaaa" guy show up, so let's nuke it. Test Plan: - Run heal prove tests Reviewers: moox, dph, sshreyas Reviewed By: sshreyas Differential Revision: https://phabricator.fb.com/D2689678 Tasks: 6207062 Change-Id: Ie9db3eb6c6d44f6137ebcf964e06965047763ed9 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/18121 Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* fb-smoke: Add fb-smoke, build and build_env to r-3.8krad2017-08-183-0/+285
| | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The new plan is to keep fb-smoke, build and build_env in every version of gluster. Changes in r-3.6 will be ported to r-3.8 henceforth. We reference fbcode for remote testing. Test Plan: Run unit, asan, valgrind Reviewers: junsongli, sshreyas, jdarcy Reviewed By: jdarcy Subscribers: #posix_storage Differential Revision: https://phabricator.intern.facebook.com/D5653092 Tasks: T20082902 Change-Id: Iebf4cfc1752e97d6f9efe80af88ee06c21103d83 Signature: t1:5653092:1503006640:642f075cba3a7295af42638e100d2e48f426f07a Reviewed-on: https://review.gluster.org/18055 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* cluster/dht: Fix rebalance bug + better loggingRichard Wareing2017-08-151-4/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Fixes edge case where lookup by gfid fails because it's not copied into the inode struct from the loc_t struct during the readdir loop - Improved logging for error conditions Test Plan: - Tested on dev server - Canaried build on <redacted> Reviewers: dph, moox, sshreyas Reviewed By: sshreyas Differential Revision: https://phabricator.fb.com/D2676693 Tasks: 9034954 Change-Id: I7f0160b391c43fc38e679fdb660cee59d2267932 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/18040 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* cluster/afr/shd: Fix leak in PGFID healingRichard Wareing2017-08-011-0/+4
| | | | | | | | | | | | | | | | Summary: - Fixes leak in PGFID healing flow Test Plan: - Valgrind on dev server Differential Revision: https://phabricator.fb.com/D3090661 Change-Id: Icde6c3ed868034dff77c92f01182dd1e3a4f8a57 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17948 Tested-by: Jeff Darcy <jeff@pl.atyp.us> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* cluster/afr: Fix case in PGFID healing where NOOP was not being honoredRichard Wareing2017-08-015-7/+27
| | | | | | | | | | | | | | | | | | | | | Summary: - PGFID healing should not be triggered in the case where there is nothing to do (ret = 2). Instead this return code should be returned to the heal daemon to trigger the reap of the entry. - Reworked shd-pgfid-heal.t to queue up heal naturally instead of synthetically Test Plan: - Run tests/basic/afr/shd-pgfid-heal.t Differential Revision: https://phabricator.fb.com/D2748578 Change-Id: I74300de2b4dce23867f4111548de35f58bf77453 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17936 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* features/quota: Fix brick crash in quota unlink callbackRichard Wareing2017-08-011-1/+1
| | | | | | | | | | | | | | | | | | | Summary: - Get log message to use loc.gfid not loc.inode->gfid Test Plan: - Run prove -v tests/basic/quota*.t Reviewers: dph, moox, sshreyas Reviewed By: sshreyas Signature: t1:2559107:1445311668:61ca5809fa977326d0fb503e874363a29cd31dfe Change-Id: Iad16d7b2102376380eb0f6918111249af370aaeb Reviewed-on: https://review.gluster.org/17938 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* afr/cluster: PGFID heal supportRichard Wareing2017-07-3112-32/+226
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: PGFID healing enables heals which might otherwise fail due due to the lack of a entry heal to succeed by performing the entry healing within the same heal flow. It does this by leveraging the PGFID tracking feature of the POSIX xlator, and examining lookup replies for the PGFID attribute. If detected, the pgfid will be decoded and stored for later use in case the heal fails for whatever reason. Cascading heal failures are handled through recursion. This feature is critical for a couple reasons: 1. General healing predictability - When the SHD attempts to heal a given GFID, it should be able to do so without having to wait for some other dependent heal to take place. 2. Reliability - In some cases the parent directory may require healing, but the req'd entry in the indices/xattrop directory may not exist (e.g. bugs/crashes etc). Prior to PGFID heal support some sort of external script would be required to queue up these heals by using FS specific utilities to lookup the parent directory by hardlink or worse...do a costly full heal to clean them up. 3. Performance - In combination with multi-threaded SHD this feature will make SHD healing _much_ faster as directories with large amount of files to be healed will no longer have to wait for an entry heal to come along, the first file in that directory queued for healing will trigger an entry heal for the directory and this will allow the other files in that directory to be (immediatelly) healed in parallel. Test Plan: - run prove tests/basic/afr/shd_pgfid_heal.t - run prove tests/basic/afr/shd*.t - run prove tests/basic/afr/gfid*.t Differential Revision: https://phabricator.fb.com/D2546133 Change-Id: I25f586047f8bcafa900c0cc9ee8f0e2128688c73 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17929 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* server: fix core dumps on upstream test machinesJeff Darcy2017-07-181-1/+5
| | | | | | | | | | Change-Id: I48f5340507a5fcebe874f498eba737585c1c32a7 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17818 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* [io-cache] cache statfsDavid Wolinsky2017-07-144-16/+208
| | | | | | | | | | | | | | | | | | | | | | | | Summary: cache calls to statfs - io-cache must be enabled - then enable statfs caching - also can configure an independent cache time Test Plan: unit test basic/cache.t Reviewers: rwareing, sshreyas Subscribers: rappleye Differential Revision: https://phabricator.fb.com/D2524471 Change-Id: I55e0a773f9e24c2358d6fbbabbaf58bd5bd89ffc Tasks: 8618383 Reviewed-on: https://review.gluster.org/17771 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* [nfs] exports_auth per (sub) volumeDavid Wolinsky2017-07-138-28/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - exports_auth changed to a per-volume option - parse exports_auth in nfs3.c - set nfs3_export state for exports_auth - all calls into mnt3_authenticate_request must pass in volname - volname is checked to determine if auth is enabled for that volume Test Plan: manual testing, will look into unit testing Reviewers: rwareing, sshreyas Reviewed By: sshreyas Subscribers: rappleye Differential Revision: https://phabricator.fb.com/D2519423 Tasks: 6863942 Change-Id: Ia9fd92ca5a5bd4cbb57e9ce61075f024ab7dbc27 Signature: t1:2519423:1444775772:24dc39e22684784b75899e97e9d1e294b059a077 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17762 Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* cluster/afr: Handle gfid-less directories in heal flowRichard Wareing2017-07-127-18/+251
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Updates heal flow to handle case where a directory does not have a gfid assigned. In this case we will remove _only_ empty directories in these cases such that the parent can re-gain consistency and files within can be correctly healed. - Also adds a test for the case where a file does not have a gfid, this is already handles by the metadata heal flow, but tests were lacking for this code path. Test Plan: - prove -v tests/basic/shd_autofix_nogfid.t - prove -v tests/basic/gfid_unsplit_shd.t Reviewers: dph, moox, sshreyas Reviewed By: sshreyas Differential Revision: https://phabricator.fb.com/D2502067 Tasks: 8549168 Change-Id: I8dd3e6a6d62807cb38aafe597eced3d4b402351b Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17750 Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* tests: test fix for 67279d73Jeff Darcy2017-07-111-3/+4
| | | | | | | | | | | | | Accidentally pushed this directly through the branch instead of through Gerrit. Change-Id: Ieedd2f71887cca91a6f1d31bc3cddfc489fc9fa6 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17749 Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* cluster/afr: SHD should always inspect directory healsRichard Wareing2017-07-112-2/+78
| | | | | | | | | | | | | | | | | | | | | | | | Summary: - This change ensures SHD always inspect directories which are queued for healing; i.e. it will not exclusively trust the wise-fool algorithm as there are cases where the change log simply isn't correct (bugs, crashes, etc). Failing to perform the entry heal in these cases will result in data heals failing to take place. - We made a similar change in 3.4.x for similar reasons Test Plan: - Run prove -v tests/basic/shd_force_inspect.t Reviewers: moox, dph, sshreyas Reviewed By: sshreyas Differential Revision: https://phabricator.fb.com/D2492993 Tasks: 8549168 Signature: t1:2492993:1443740894:7cf07168ca09946df9d8f96a3085fe2d3c201543 Change-Id: I2d8e1cbecbbca720cc3ee988d7aae08bea0a5453
* cluster/afr: GFID unsplit improvementsRichard Wareing2017-07-117-105/+193
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - Few improvements: handle type mis-matches (e.g. dir/file mis-matches), added in an option to control whether gfid unsplits will happen, ensured entry healing will happen in the gfid mis-match case when the option is enabled. - Added prove test to cover entry healing & type mis-match cases - Enable metadata split-brain resolution by default - Enable gfid split-brain resolution by default - Fix gfid unsplit logging bugs where it was showing null GFIDs instead of the actual chosen GFIDs Test Plan: - run prove -v test/basic/gfid_unsplit* - Ran valgrind to verify leak-free state Reviewers: moox, sshreyas Reviewed By: sshreyas Change-Id: Id67ddc728745ebbbaf7bdd3f9a5549e5a4cc4a20 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Change-Id: I4181233f9ba7f61ccd2ba91f0874eb2ac7cd40b5 Manually-merged-by: Jeff Darcy <jdarcy@fb.com> Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17739 Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* cluster/afr: Adjust gfid unsplit flow for proper correctness w/ AFR2Richard Wareing2017-07-073-8/+24
| | | | | | | | | | | | | | | | | | | | | Summary: - Prior patch did not re-run the gfid-mismatch flow after doing the unsplit. I think this is prudent to re-validate the unsplit worked as well as allow the code to continue from where it effectively left off. Test Plan: - Run prove -v tests/basic/gfid_unsplit.t Reviewers: dph, moox, sshreyas Reviewed By: sshreyas Change-Id: Ib3ed40f3db38c89090a876d7af3a1b2a303539d5 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17729 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* cluster/afr: Non-destructive GFID unsplit brain support for v3.6.xRichard Wareing2017-07-065-13/+426
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - v3.6.3 port of non-destructive GFID unsplit-brain code, almost a re-write for AFR2, but the original behavior lives on. - This feature allows the GlusterFS filesystem to automagically resolve GFID splitbrain situations by choosing the authorative file based on the last modification time. Other policies such as majority or size are also possible but not implemented just yet. - Core feature to Halo Geo-Replication, as this (gfid) form of split-brain is an everyday possibility with async mounts, so there needs to be an automated & scalable method to resolve them via the SHD or optionally in-line by FUSE clients or NFS daemons. - Operational notes: 1. Files or directory entries are supported, you can even write files into a directory and they will not be lost. 2. Streamed writes to a files are fully supported while a split-brain resolution happens, i.e. the writes will not be interrupted while the unsplit takes place. 3. Un-split (ones which are determined not to be "authoritative") files are renamed like so: ".<filename>_<random uuid>" Test Plan: - Run prove -v tests/basic/gfid_unsplit.t - Test output: https://phabricator.fb.com/P20041740 Reviewers: moox, dph, sshreyas Reviewed By: sshreyas Differential Revision: https://phabricator.fb.com/D2479409 Signature: t1:2479409:1443208319:373218aa9758a1b48db23ea5e211ec303fa92e64 Blame Revision: Change-Id: I5b3d2e79fad74b4372c02b86219e8ee98f5e29dc Change-Id: I8ef719bcccb19ab6674647e02b72e1b36155fed9 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17720 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* Build/test fixes - build_env, tirpc, mem-pool, cleanupJeff Darcy2017-07-068-5/+21
| | | | | | | | | | | Differential Revision: https://phabricator.intern.facebook.com/D5376801 Change-Id: I5bf733a395ef2b85065200fa5810ced27ee0d682 Reviewed-on: https://review.gluster.org/17719 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* tests: forward-porting test fixes from 3.6 branchJeff Darcy2017-07-059-3/+11
| | | | | | | | | | Change-Id: I4074e7cce8f6782860f849780ab6d0458e92a2ce Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17708 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* cluster/afr: Fix metadata split-brain flow (HOTFIX)Richard Wareing2017-07-051-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: - The metadata heal flow for some reason likes to tinker with the sink states prior to having the source finalized, this broke the policy based unsplit flow. This patch fixes it by simply setting those chilren who aren't the favorite as sinks. Test Plan: - Tested against some reported instances Reviewers: moox, sshreyas, dph Reviewed By: sshreyas Differential Revision: https://phabricator.fb.com/D2481527 Signature: t1:2481527:1443215555:1165d8eb5f3dec216ec3ff0795d9837712906b1d Blame Revision: Change-Id: I56f96fdcef32dd4fc5d35958148d0e56d142d5e4 Change-Id: I16aa445a22c3bcd7b589954e2da513ed53822d5b Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17682 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* Revert "cluster/afr: Fix metadata split-brain flow (HOTFIX)"Jeff Darcy2017-07-031-17/+0
| | | | This reverts commit 992a9f8494a358f828eeef34b46e9f5ccfca1d3b.
* Revert "cluster/afr: Adjust gfid unsplit flow for proper correctness w/ AFR2"Jeff Darcy2017-07-031-17/+3
| | | | This reverts commit 1d5d6ec423a21d698196cca39c7ba0e2563d9ba8.
* cluster/afr: Adjust gfid unsplit flow for proper correctness w/ AFR2Richard Wareing2017-07-031-3/+17
| | | | | | | | | | | | | | | | | | | | | Summary: - Prior patch did not re-run the gfid-mismatch flow after doing the unsplit. I think this is prudent to re-validate the unsplit worked as well as allow the code to continue from where it effectively left off. Test Plan: - Run prove -v tests/basic/gfid_unsplit.t Reviewers: dph, moox, sshreyas Reviewed By: sshreyas Differential Revision: https://phabricator.fb.com/D2483295 Signature: t1:2483295:1443237512:84baa105ddabaabdac52628121a44a98fb55ffa5 Blame Revision: Change-Id: I7b8a327be7272dd561fbf2995d781923b316ec45 Change-Id: Ib3ed40f3db38c89090a876d7af3a1b2a303539d5
* cluster/afr: Fix metadata split-brain flow (HOTFIX)Richard Wareing2017-07-031-0/+17
| | | | | | | | | | | | | | | | | | | | | | Summary: - The metadata heal flow for some reason likes to tinker with the sink states prior to having the source finalized, this broke the policy based unsplit flow. This patch fixes it by simply setting those chilren who aren't the favorite as sinks. Test Plan: - Tested against some reported instances Reviewers: moox, sshreyas, dph Reviewed By: sshreyas Differential Revision: https://phabricator.fb.com/D2481527 Signature: t1:2481527:1443215555:1165d8eb5f3dec216ec3ff0795d9837712906b1d Blame Revision: Change-Id: I56f96fdcef32dd4fc5d35958148d0e56d142d5e4 Change-Id: I16aa445a22c3bcd7b589954e2da513ed53822d5b
* Change default rsize/wsize from 2 MB to 512 KBShreyas Siravara2017-06-121-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: Per title Test Plan: Tested on devserver Reviewers: dph, moox, rwareing Reviewed By: rwareing FB-commit-id: 65e8b70 Change-Id: Ie51dab3eba0e989c81c58007f18186c8a48a2f91 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17310 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* build: add site.h as a place to put environment-specific definesJeff Darcy2017-05-153-2/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most people consume Gluster in one of two ways: * From packages provided by their OS/distribution vendor * By building themselves from source For the first group it doesn't matter whether configuration is done in a configure script, via command-line options to that configure script, or in a header file. All of these end up as edits to some file under the packager's control, which is then run through their tools and process (e.g. rpmbuild) to create the packages that users will install. For the second group, convenience matters. Such users might not even have a script wrapped around the configure process, and editing one line in a header file is a lot easier than editing several in the configure script. This also prevents a messy profusion of configure options, dozens of which might need to be added to support a single such user's preferences. This comes back around as greater simplicity for packagers as well. This patch defines site.h as the header file for options and parameters that someone building the code for themselves might want to tweak. The project can ship one version to reflect the developers' guess at the best defaults for most users, and sophisticated users with unusual needs can override many options at once just by maintaining their own version of that file. Everybody wins. Further guidelines for how to determine whether an option should go in configure.ac or site.h are explained within site.h itself. Change-Id: I2663a7dcbdf2f7066cd8eef19ad9eb30a2e72e74 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17300 Tested-by: Jeff Darcy <jeff@pl.atyp.us> 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>
* tests: use 'localhost' in exports files so NFS mount-auth will workJeff Darcy2017-05-152-10/+18
| | | | | | | | | | | Change-Id: I977f94ebc1630bdf46fd28d310f433c1c7d327f5 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17286 Tested-by: Jeff Darcy <jeff@pl.atyp.us> 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>
* tests: avoid symlink between brick and mountpointJeff Darcy2017-05-131-3/+12
| | | | | | | | | | | | | | | These were causing hung tests when the bricks were restarted, in some cases even accompanied by kernel stack traces involving fuse. They're unnecessary to the purpose of the test. Change-Id: I3c6c485324e2ee9418eb54929015b5bae436e9ea Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17284 Tested-by: Jeff Darcy <jeff@pl.atyp.us> 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: fix tiering/GFDB breakageJeff Darcy2017-05-131-0/+2
| | | | | | | | | | | | | | | | Some code that's only used for tiering was being compiled even when tiering was supposed to be disabled, and this was causing compilers to barf. Compilation is supposed to be controlled internally by USE_GFDB, ties to the "--disable-tiering" configure option. Change-Id: I41afa6ad1c50c02a9ec0f3ea420a0101d97e2960 Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17283 Tested-by: Jeff Darcy <jeff@pl.atyp.us> 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>
* tests: call cleanup if we EXIT_EARLYJeff Darcy2017-05-131-0/+1
| | | | | | | | | | | Change-Id: Ide0045f89134ef0eda1f985818c5cb93b5be969b Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17258 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Jeff Darcy <jeff@pl.atyp.us> 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>
* tests: remove sloppy hard-coding of loopback devsJeff Darcy2017-05-131-21/+12
| | | | | | | | | | | Change-Id: I163656985185c710e20ad80824e14645020522cd Signed-off-by: Jeff Darcy <jdarcy@fb.com> Reviewed-on: https://review.gluster.org/17279 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Kevin Vigor <kvigor@fb.com> Tested-by: Jeff Darcy <jeff@pl.atyp.us> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* Build/test fixesJeff Darcy2017-05-113-6/+7
| | | | | | | | | | | | | | (1) The version of gcc on my devserver doesn't seem to like plain "inline" (in AHA) so I replaced it with "extern inline" which is a better idea anyway. (2) Fixed up some stuff to do with finding env.rc (3) Added "nfsvers=3,proto=tcp" so that NFS tests run (a little bit) better on my machine. Never hurts to be explicit, I guess. Change-Id: I3357b61a950c0d1ef3dfd2c12c96d157c4d163e2 Signed-off-by: Jeff Darcy <jdarcy@fb.com>
* nfs/auth: Fix sensitivity to rw,ro ordering in the exports fileShreyas Siravara2017-03-172-4/+48
| | | | | | | | | | | | | | | | | | | | | | Summary: When a netgroup is marked as rw in the exports file, and another netgroup is marked as ro for the same share, the ro option is not honored. This diff fixes that bug Test Plan: Added a test and verifies that it passes with this patch and does not pass without this patch. Reviewers: rwareing, dph, moox Reviewed By: moox FB-commit-id: 2d36d2d Change-Id: Ia394f36472f094a62ddfedc0c8fd5d95e247b4b0 Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: https://review.gluster.org/16908 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>
* Merge remote-tracking branch 'origin/release-3.8' into merge-3.8Kevin Vigor2017-03-1618-214/+518
|\ | | | | | | Change-Id: Ib336c2ada491c2d2fcbbbe6865f9eb975a405b36
| * doc: release-notes for GlusterFS-3.8.10v3.8.10Niels de Vos2017-03-121-0/+57
| | | | | | | | | | | | | | | | | | | | BUG: 1421593 Change-Id: I026c8d3b4a401a098ccc568dad8cd51de51dc007 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/16890 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>
| * extras: Add more options to group virtKrutika Dhananjay2017-03-121-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of: https://review.gluster.org/16577 Apart from some of the option configurations already listed in the group-virt.example file, we also recommend that the users set certain other options added by this patch for VM use-case. This also helps Gluster-oVirt users in configuring virt options for new volumes at the click of a button as opposed to setting them manually through volume-set command. Change-Id: I879d779a4829d7163de4df9ff80d15296130af8a BUG: 1424934 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: https://review.gluster.org/16683 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: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
| * cluster/afr: Perform new entry mark before creating new entryPranith Kumar K2017-03-114-49/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a chance for the source brick to go down just after the new entry is created and before source brick is marked with necessary pending markers. If after this any I/O happens then new entry will become source and reverse heal will happen. To prevent this mark the pending xattrs before creating the new entry. >BUG: 1417466 >Change-Id: I233b87e694d32e5d734df5a83b4d2ca711c17503 >Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> >Reviewed-on: https://review.gluster.org/16474 >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: Ravishankar N <ravishankar@redhat.com> >Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> BUG: 1429312 Change-Id: Ia1bdaf9511acaeff72a336c8185a56a64ea0e2ba Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: https://review.gluster.org/16850 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com>
| * storage/posix: Execute syscalls in xattrop under different locksKrutika Dhananjay2017-03-114-36/+113
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport of: https://review.gluster.org/16462 and https://review.gluster.org/16792 ... and not inode->lock. This is to prevent the epoll thread from *potentially* being blocked on this lock in the worst case for extended period elsewhere in the brick stack, while the syscalls in xattrop are being performed under the same lock by a different thread. This could potentially lead to ping-timeout, if the only available epoll thread is busy waiting on the inode->lock, thereby preventing it from picking up the ping request from the client(s). Also removed some unused functions. >Change-Id: I2054a06701ecab11aed1c04e80ee57bbe2e52564 >BUG: 1421938 >Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> >Reviewed-on: https://review.gluster.org/16462 >Smoke: Gluster Build System <jenkins@build.gluster.org> >NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> >Reviewed-by: Raghavendra G <rgowdapp@redhat.com> >CentOS-regression: Gluster Build System <jenkins@build.gluster.org> (cherry picked from commit b5c26a462caf97bfc5380c81092f5c331ccaf1ae) Change-Id: I2054a06701ecab11aed1c04e80ee57bbe2e52564 BUG: 1427390 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: https://review.gluster.org/16777 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: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>