summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* MAINTAINERS: Add Sanju & Mohit as glusterd/cli maintainersAtin Mukherjee2019-10-311-1/+2
| | | | | | Fixes: bz#1764418 Change-Id: If14c5ce4527844df5251b4b5a720b617815fb1a1 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* afr: lock healing changesRavishankar N2019-10-3011-36/+1461
| | | | | | | | | | | | | | | | | | | Implements lock healing for gluster-block fencing use case. If mandatory lock is enabled: - Add domain lock/unlock to afr_lk fop. - Maintain a list of locks to be healed in afr_private_t. - Add lock to the list if afr_lk(F_SETLK or F_SETLKW) was sucessful. - Remove it from the list during afr_lk(F_UNLCK). - On child_down, mark lock as needing heal on that child. If lock is lost on quorum no. of bricks, remove it from the list and mark fd bad. - For fds marked as bad, fail the subsequent fd based fops. - On parent up, traverse the list and heal the locks IFF the client is the lk owner and has quorum. (shd does not heal any locks). updates: #613 Change-Id: I03c46ceaea30f5e6236d5ec13f71d843d827f1bc Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* cluster/afr: Take a copy of xattr-reqPranith Kumar K2019-10-301-2/+7
| | | | | | | | | | Afr adds its own xattrs to the req, so it should take a copy of the dictionary to prevent parent xlator re-using the modified xattr-req to another subvolume fixes: bz#1765155 Change-Id: I268e2dbd1b12323135d369e90a22a8bdde2cf7c2 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* glusterd/ganesha: fix Coverity CID 1405785Xie Changlong2019-10-301-1/+1
| | | | | | | | | To avoid double free updates: bz#789278 Change-Id: I15ae54ed696295d4cb015668722e77983b062ccb Signed-off-by: Xie Changlong <xiechanglong@cmss.chinamobile.com>
* gf-event: Handle unix volfile-serversPranith Kumar K2019-10-301-1/+10
| | | | | | | | | | | | | | | Problem: glfsheal program uses unix-socket-based volfile server. volfile server will be the path to socket in this case. gf_event expects this to be hostname in all cases. So getaddrinfo will fail on the unix-socket path, events won't be sent in this case. Fix: In case of unix sockets, default to localhost fixes: bz#1765017 Change-Id: I60d27608792c29d83fb82beb5fde5ef4754bece8 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* ssl/test: Change the rsa key length to 2048Mohammed Rafi KC2019-10-295-5/+5
| | | | | | | | | | | | On a rhel-8 machine, we need to have a key length greater than or eaual to 2048. So changing the values to 2048 to pass the test. Credits: Mohit Agrawal <moagrawal@redhat.com> Change-Id: I0f21db4d737203d0b2e44e7e61f50ae1279795ad Updates: bz#1756900 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
* extras: Cgroup(CPU/Mem) restriction are not working on gluster processMohit Agrawal2019-10-272-2/+2
| | | | | | | | | | | | | | Problem: After Configure the Cgroup(CPU/MEM) limit to a gluster processes resource(CPU/MEM) limits are not applicable to the gluster processes.Cgroup limits are not applicable because all threads are not moved into a newly created cgroup to apply restriction. Solution: To move a gluster thread to newly created cgroup change the condition in script Change-Id: I8ad81c69200e4ec43a74f6052481551cf835354c Fixes: bz#1764208 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* test: fix suspicous non-root geo-rep test failuresSunny Kumar2019-10-251-1/+1
| | | | | | | | Export of env variable is required for ssh-copy-id command. fixes: bz#1765426 Change-Id: Icaf7a848cb8f4ae9f887d885a8c5bb71f26633b4 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* Worm: xattr update on changing access time of a WORM-Retained fileVishal Pandey2019-10-232-0/+44
| | | | | | | | | Retention-period must be updated on changing the access time of a worm-retained file. Retention-period must be changed in the "trusted.reten-state" xattr Change-Id: Ieab758a4cf6da3b4bb1d6a3e4f95f400c8a11f1d Fixes: bz#1554286
* Scripts: quota_fsck script KeyError: 'contri_size'hari gowtham2019-10-221-6/+6
| | | | | | | | | | | | | Problem: In a certain code flow, we weren't handling the unavailability of the contri value in the dict. Trying to print without the value resulted in erroring out. Fix: Have printed the whole of dictionary as the values will be helpful in understanding the state of the file/dir Fixes: bz#1764129 Change-Id: I99c538adb712f281ca10e4e0088f404f515b9725 Signed-off-by: hari gowtham <hgowtham@redhat.com>
* rpc: Synchronize slot allocation codeMohit Agrawal2019-10-221-33/+41
| | | | | | | | | | | | | Problem: Current slot allocation/deallocation code path is not synchronized.There are scenario when due to race condition in slot allocation/deallocation code path brick is crashed. Solution: Synchronize slot allocation/deallocation code path to avoid the issue Change-Id: I4fb659a75234218ffa0e5e0bf9308f669f75fc25 Fixes: bz#1763036 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* geo-rep: Fix Permission denied traceback on non root setupKotresh HR2019-10-213-16/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: While syncing rename of directory in hybrid crawl, geo-rep crashes as below. Traceback (most recent call last): File "/usr/local/libexec/glusterfs/python/syncdaemon/repce.py", line 118, in worker res = getattr(self.obj, rmeth)(*in_data[2:]) File "/usr/local/libexec/glusterfs/python/syncdaemon/resource.py", line 588, in entry_ops src_entry = get_slv_dir_path(slv_host, slv_volume, gfid) File "/usr/local/libexec/glusterfs/python/syncdaemon/syncdutils.py", line 687, in get_slv_dir_path [ENOENT], [ESTALE]) File "/usr/local/libexec/glusterfs/python/syncdaemon/syncdutils.py", line 546, in errno_wrap return call(*arg) PermissionError: [Errno 13] Permission denied: '/bricks/brick1/b1/.glusterfs/8e/c0/8ec0fcd4-d50f-4a6e-b473-a7943ab66640' Cause: Conversion of gfid to path for a directory uses readlink on backend .glusterfs gfid path. But this fails for non root user with permission denied. Fix: Use gfid2path interface to get the path from gfid Change-Id: I9d40c713a1b32cea95144cbc0f384ada82972222 fixes: bz#1763439 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* posix-entry-ops: do not copy when reading xattrYaniv Kaul2019-10-211-68/+91
| | | | | | | | | | | | | | The code is simplified to avoid needless copy as well as simplified overall for readability. Such changes are needed elsewhere too (see https://github.com/gluster/glusterfs/issues/720 ) Few other minor changes here and there, nothing functional. updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I14f9dd2c32a8932bfcc80ebe92c9aa77701095ff
* posix-helper.c: fix compile warn: ‘timeout’ may be used uninitializedYaniv Kaul2019-10-181-1/+1
| | | | | | | | | | | | | | | | | https://review.gluster.org/#/c/glusterfs/+/23439/ introduced this warning: In file included from posix-helpers.c:50: posix-helpers.c: In function ‘posix_health_check_thread_proc’: ../../../../libglusterfs/src/glusterfs/events.h:31:9: warning: ‘timeout’ may be used uninitialized in this function [-Wmaybe-uninitialized] 31 | _gf_event(event, ##fmt); \ | ^~~~~~~~~ posix-helpers.c:2024:9: note: ‘timeout’ was declared here 2024 | int timeout; This patch fixes it, by re-setting the initial value to 0. Change-Id: I90aee4a1366e21a00f5e138f44247d8c42b0f5ae updates: bz#789278 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* glusterd: display correct rebalance data size after glusterd restartSanju Rakonde2019-10-181-5/+5
| | | | | | | | | | | | | | | | | | | Problem: After completion of rebalance, if glusterd is restarted, rebalance status displays wrong rebalance data size in its output. Cause: While glusterd restoring the information from /var/lib/glusterd/ into its memory, glusterd fetches rebalance_data from /var/lib/glusterd/vols/volname/node_state.info. This value is converted into an integer using atoi(), which is returning incorrect value for larger values. Solution: use sscanf() instead of atoi() to convert string to integer(in this case it is unsigned long) fixes: bz#1762438 Change-Id: Icbdb096919612b4a1d6fb0e315f09d38900abf4e Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* build: var data is saved under $prefix instead of localstatedirShwetha K Acharya2019-10-171-1/+2
| | | | | | | | | | | | | | | | | | | Problem:glusterfind saves var data under $prefix, even though the localstatedir is mentioned while installing i.e, when we install glusterfs with ./configure --prefix=/path/to/prefix --localstatedir=/path/to/var This happens because, glusterfind stores working dir as, working_dir=@GLUSTERFSD_MISCDIR@/glusterfind/ and in configure.ac, GLUSTERFSD_MISCDIR is defined as: GLUSTERFSD_MISCDIR="$(eval echo $prefix)/var/lib/misc/glusterfsd" Solution: $localstatedir is used instead of $prefix while defining, GLUSTERFSD_MISCDIR to avoid such anomaly. fixes: bz#1489610 Change-Id: I431a63c14bee23a1aac612a3dcb0431cb29ca4a2 Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
* rpc: align structsYaniv Kaul2019-10-1723-607/+611
| | | | | | | | | | | | | squash tens of warnings on padding of structs in afr structures. The warnings were found by manually added '-Wpadded' to the GCC command line. Also made relevant structs and definitions static, where it was applicable. Change-Id: Ib71a7e9c6179378f072d796d11172d086c343e53 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* geo-rep: Fix config upgrade on non-participating nodeKotresh HR2019-10-173-1/+181
| | | | | | | | | | | | | After upgrade, if the config files are of old format, it gets migrated to new format. Monitor process migrates it. Since monitor doesn't run on nodes where bricks are not hosted, it doesn't get migrated there. So this patch fixes the config upgrade on nodes which doesn't host bricks. This happens during config either on get/set/reset. Change-Id: Ibade2f2310b0f3affea21a3baa1ae0eb71162cba Signed-off-by: Kotresh HR <khiremat@redhat.com> fixes: bz#1762220
* tests: add tests for bz#1758878Ravishankar N2019-10-174-34/+67
| | | | | | | | updates: bz#1193929 Change-Id: I517fa29e57bde970c2c22ebc2de80fec1509cd2d Signed-off-by: Sanju Rakonde <srakonde@redhat.com> Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* tests: Fix spurious failurePranith Kumar K2019-10-161-2/+2
| | | | | | fixes: bz#1759002 Change-Id: I4d49e1c2ca9b3c1d74b9dd5a30f1c66983a76529 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* tests: Specify bs for ddPranith Kumar K2019-10-161-1/+1
| | | | | | | | | On some distros default bs is very slow and the test takes close to 2 minutes instead of 20 seconds. fixes: bz#1761769 Change-Id: If10d595a7ca05f053237f3c5ffbb09c5151eab35 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* tests: Remove hard-coding of lower boundPranith Kumar K2019-10-161-4/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Total blocks of XFS partition are dependent on XFS parameters used for formatting. So hardcoded lower-bound may not be the lower bound for different default parameters. Used blocks are lesser on my machine for a freshly formatted XFS partition compared to where the test fails. On my machine: Filesystem 1024-blocks Used Available Capacity Mounted on /dev/loop0 98980 5472 93508 6% /d/backends/patchy1 /dev/loop1 98980 5472 93508 6% /d/backends/patchy2 On a machine where this test fails: Filesystem 1024-blocks Used Available Capacity Mounted on /dev/loop0 96928 6112 90816 7% /d/backends/patchy1 /dev/loop1 96928 6112 90816 7% /d/backends/patchy2 Fix: Make lower bound 2% less than the brick-blocks available fixes: bz#1761759 Change-Id: I974d5e75766f7ff44780a2e4c2a19cd5d1d14a79 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* dht: Rebalance causing IO Error - File descriptor in bad stateMohit Agrawal2019-10-155-17/+116
| | | | | | | | | | | | | | | | Problem : When a file is migrated, dht attempts to re-open all open fds on the new cached subvol. Earlier, if dht had not opened the fd, the client xlator would be unable to find the remote fd and would fall back to using an anon fd for the fop. That behavior changed with https://review.gluster.org/#/c/glusterfs/+/15804, causing fops to fail with EBADFD if the fd was not available on the cached subvol. The client xlator returns EBADFD if the remote fd is not found but dht only checks for EBADF before re-opening fds on the new cached subvol. Solution: Handle EBADFD at dht code path to avoid the issue Change-Id: I43c51995cdd48d05b12e4b2889c8dbe2bb2a72d8 Fixes: bz#1758579
* posix-helpers.c: minor changes to posix_fs_health_checkYaniv Kaul2019-10-151-24/+21
| | | | | | | | | Do not sprintf the path in every invocation. Initialize parameters sooner. Change-Id: I26bfffc5dab6530937a50eee1e7fc4982e9b2a7c updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* tests: mark tests/bugs/glusterd/quorum-value-check.t as NFS testSanju Rakonde2019-10-151-0/+2
| | | | | | | Fixes: bz#1665358 Change-Id: Iea000dd839d4e4dbef45941f97ab3725a2aa1726 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterfsd: fix unused value coverity issuesyatipadia2019-10-151-11/+0
| | | | | | | | | | This patch addresses CID-1398624 and CID-1398631 removed the unused variable brick_name Change-Id: I4f40bd76cb4c94b28589c2333e29d4623da339d0 Updates: bz#789278 Signed-off-by: yati <ypadia@redhat.com>
* cluster/afr: Add afr_seek to fops tablePranith Kumar K2019-10-145-1/+61
| | | | | | fixes: bz#1760189 Change-Id: Iffbf8d6f4c50b8e2de8364658697bdbe96549f5d Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* cli: raise error in cli when replica != 2 while ta vol creationVishal Pandey2019-10-141-1/+2
| | | | | | | | | | | | When creating a thin-arbiter volume, if the replica-count provided is other than 2, the cli command fails(which is the expected behaviour) but it fails while transaction is being committed on localhost. This, ideally should be handled in cli itself. Change-Id: I52ecdaf49a7df85670505e4743cdcf3101c71c9f Signed-off-by: Vishal Pandey <vpandey@redhat.com> Fixes: bz#1754477
* glusterd-volgen.c: fix setting the key export-dirYaniv Kaul2019-10-142-108/+41
| | | | | | | | | | | | | | | | | | | | | | | | The return value of gf_asprintf() was used as the key length, and it was stored into ret. ret was re-used before the dict function was called, therefore was invalid as the real key length and contained a different value. That was masked by the fact the key length was only used in key hash, so while it was incorrect, it was harmless. The hash was consistent and the key length was re-calculated anyway in dict_set_lk(). This patch fixes it, so later on we can use the key length also in dict_set_lk() to save another strlen() (sent in a different patch). However, in the course of this patch I've also decided to reduce the copy-pasta in this code path and put all NFS options in an array and iterate through them. This makes the code shorter and easier to read. (It's also more efficient since once an entry was found, there's no additional strcmp()'s as the previous code did). Change-Id: I968ed50a55f3b1a7ad027c72b06e0fa3788eaa9b updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* Multiple files: make root gfid a static variableYaniv Kaul2019-10-1414-73/+24
| | | | | | | | | | | | | In many places we use it, compare to it, etc. It could be a static variable, as it really doesn't change. I think it's better than initializing to 0 and then doing gfid[15] = 1 or other tricks. I think there are additional oppportunuties to make more variables static. This is an attempt at an easy one. Change-Id: I7f23a30a94056d8f043645371ab841cbd0f90d19 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* afr: align structsYaniv Kaul2019-10-142-138/+138
| | | | | | | | | | squash >50 warnings on padding of structs in afr structures. The warnings were found by manually added '-Wpadded' to the GCC command line. Change-Id: I961fbdeb33715cedf3dd10db8e4f8ef40cd3e867 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* glusterd: Re-alignment of structure attributes in glusterd.Purna Pavan Chandra Aekkaladevi2019-10-147-13/+13
| | | | | | | | | Structures defined in few files of glusterd src have been modified into memory efficient manner. Change-Id: Ie712b41cc74b04d5169bfd2402bff3b9c0d8c95b Updates: bz#1754448 Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkala@redhat.com>
* POSIX/xlators: Unused and unchecked value coverity issueyatipadia2019-10-111-2/+2
| | | | | | | | | | | | | | | | | | This patch addresses CID-1274094 and CID-1382354 Problem(1): "ret" was assigned a value which was never used, it was overwritten by 0 and hence has no use. Problem(2): function was called without checking the return value. Solution(1): Removed the assignment and just called the function whose value was being written in ret. Solution(2): There was no need to check for the return value as at the end 0 is returned, so typecasted the return value as void. Change-Id: Iefd0e9000c466ef2428c754c31370263bf1ca0d0 updates: bz#789278
* Posix: UNUSED VALUE coverity fixPurna Pavan Chandra Aekkaladevi2019-10-111-2/+0
| | | | | | | | | | | | This patch fixes Coverity issue with CID 1274206 Problem : -1 is assigned to op_ret, but that stored value is overwritten before it can be used. Fix : Removal of the line that assigns -1 to op_ret which has no significance. Change-Id: Icb881549ac946003710551c9b9e88b33b6a06239 Updates: bz#789278 Signed-off-by: Purna Pavan Chandra Aekkaladevi <paekkala@redhat.com>
* performance/open-behind: seek fop should open_and_resumePranith Kumar K2019-10-111-0/+27
| | | | | | fixes: bz#1760187 Change-Id: I4c6ad13194d4fc5c7705e35bf9a27fce504b51f9 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* performance/read-ahead: update expected offset before unwinding read responseRaghavendra G2019-10-111-2/+2
| | | | | | | | | | | | | | With the current code there is a window of time between unwinding response to a read request and internal offset is updated to account the read just done. If new sequential read request comes in this time window, it is incorrectly identified as non-sequential read. Fix is to update the file offset to account for a read request before sending back the response to it. Change-Id: Iff0c59c769e1eb15f262257763026657e2d4785d Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Fixes: bz#1753843
* cli: fix distCount valueSanju Rakonde2019-10-111-2/+3
| | | | | | | | | | gluster volume info --xml id displaying wrong distCount value. This patch addresses it. fixes: bz#1758878 Change-Id: I64081597e06018361e6524587b433b0c4b2a0260 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* client xlator: misc. cleanupsYaniv Kaul2019-10-116-662/+474
| | | | | | | | | | | | | - remove dead code - move functions to be static - move some code that only needs to be executed under if branch - remove some dead assignments and redundant checks. No functional change, I hope. Change-Id: I93d952408197ecd2fa91c3f812a73c54242342fa updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* dict.{c,h}: remove the lock from the _data structYaniv Kaul2019-10-112-5/+0
| | | | | | | | | I'm not sure why it was there and I did not see any use for it. In the hope I did not miss anything, I removed it. Change-Id: I02fa2e8e2a598b488fddbff4c7168dc4a41929b2 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* glusterd-utils.c: attach_brick() - remove dead codeYaniv Kaul2019-10-111-5/+0
| | | | | | | | | pidfile1 and pidfile2 were not used anywhere. Removed the assignment and the variables. Change-Id: Ic5fe091ba28bb500c370410a63440953048fd0b7 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* posix-helpers.c: do not copy when reading xattrYaniv Kaul2019-10-111-47/+51
| | | | | | | | | | | | | The code is simplified to avoid needless copy as well as simplified overall for readability. Such changes are needed elsewhere too (see https://github.com/gluster/glusterfs/issues/720 ) Few other minor changes here and there, nothing functional. Change-Id: Ia1167849f54d9cacbfe32ddd712dc1699760daf5 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* glusterd: rebalance start should fail when quorum is not metSanju Rakonde2019-10-102-1/+4
| | | | | | | | | | rebalance start should not succeed if quorum is not met. this patch adds a condition to check whether quorum is met in pre-validation stage. fixes: bz#1760467 Change-Id: Ic7d0d08f69e4bc6d5e7abae713ec1881531c8ad4 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* packaging: remove leftover bd cruft in rpm .specKaleb S. KEITHLEY2019-10-091-9/+3
| | | | | | | | $subject Change-Id: Ifd8e3340ae6868ea1fd2d0b53f02b093cc23f2cb Fixes: bz#1193929 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* Fix spurious failure in bug-1744548-heal-timeout.tPranith Kumar K2019-10-091-6/+11
| | | | | | | | | | | | | | | | | | | | | Script was assuming that the heal would have triggered by the time test was executed, which may not be the case. It can lead to following failures when the race happens: ... 18:29:45 not ok 14 [ 85/ 1] < 26> '[ 331 == 333 ]' -> '' ... 18:29:45 not ok 16 [ 10097/ 1] < 33> '[ 668 == 666 ]' -> '' Heal on 3rd brick didn't start completely first time the command was executed. So the extra count got added to the next profile info. Fixed it by depending on cumulative stats and waiting until the count is satisfied using EXPECT_WITHIN fixes: bz#1759002 Change-Id: I3b410671c902d6b1458a757fa245613cb29d967d Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* cluster/afr: Heal entries when there is a source & no healed_sinkskarthik-us2019-10-092-0/+104
| | | | | | | | | | | | | | | | | | | | Problem: In a situation where B1 blames B2, B2 blames B1 and B3 doesn't blame anything for entry heal, heal will not complete even though we have clear source and sinks. This will happen because while doing afr_selfheal_find_direction() only the bricks which are blamed by non-accused bricks are considered as sinks. Later in __afr_selfheal_entry_finalize_source() when it tries to mark all the non-sources as sinks it fails to do so because there won't be any healed_sinks marked, no witness present and there will be a source. Fix: If there is a source and no healed_sinks, then reset all the locked sources to 0 and healed sinks to 1 to do conservative merge. Change-Id: If40d8bc95d52a52b2730f55bdcf135109b421548 Fixes: bz#1749322 Signed-off-by: karthik-us <ksubrahm@redhat.com>
* tests: Fix spurious failure in bug-1134691-afr-lookup-metadata-heal.tRavishankar N2019-10-091-0/+2
| | | | | | | | | | | | | Problem: The .t was examining the sink brick's iatt value before the launched client-side metadata heal got a chance to complete. Fix: Wait for heal completion. Fixes: bz#1759081 Change-Id: I4dd4e3a1cccf35fd18e8cdfea6aa76a726a4763b Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* afr: support split-brain CLI for replica 3Ravishankar N2019-10-093-2/+115
| | | | | | | | | | | | | | | | | | | | | | | | Ever since we added quorum checks for lookups in afr via commit bd44d59741bb8c0f5d7a62c5b1094179dd0ce8a4, the split-brain resolution commands would not work for replica 3 because there would be no readables for the lookup fop. The argument was that split-brains do not occur in replica 3 but we do see (data/metadata) split-brain cases once in a while which indicate that there are a few bugs/corner cases yet to be discovered and fixed. Fortunately, commit 8016d51a3bbd410b0b927ed66be50a09574b7982 added GF_CLIENT_PID_GLFS_HEALD as the pid for all fops made by glfsheal. If we leverage this and allow lookups in afr when pid is GF_CLIENT_PID_GLFS_HEALD, split-brain resolution commands will work for replica 3 volumes too. Likewise, the check is added in shard_lookup as well to permit resolving split-brains by specifying "/.shard/shard-file.xx" as the file name (which previously used to fail with EPERM). Change-Id: I3c543dea79caf7cfbc1633e9089cb1cdd2538ba9 Fixes: bz#1756938 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* extras: Enable direct-io options in group virtKrutika Dhananjay2019-10-081-1/+2
| | | | | | | | | | | | | Direct-io options are currently enabled in the ovirt-gluster installation through cockpit ui whereas all the other optimizations in gluster for virt are enabled through the group-virt option using 'volume-set' command. For the sake of completeness and to avoid any confusion, it would be better to set the o-direct gluster options also as part of group virt. Change-Id: Iac4c443c2a8239effeb05a52344e563f1d877916 Fixes: bz#1758984 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* afr: replace afr_frame_return() when possible with direct callYaniv Kaul2019-10-075-15/+9
| | | | | | | | | | | | If you are already under lock, just decrement the call count directly instead of removing the lock, re-taking the lock and decrementing. Implements https://github.com/gluster/glusterfs/issues/728 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I3fa20b4651fbdb826655c5a03baeed46e99b5487
* xlators: fixes logically dead code.yatipadia2019-10-031-5/+0
| | | | | | | | | | | | | | | This patch addresses CID-1124388. Problem: When we reach the "out" section in ra_priv_dump(), if the condition (ret && conf) holds true, then the value of "add_section" will always be true. So the condition (add_section == _gf_false) will be a dead code. Fix:"add_section" has no use in the whole block and was making part of the block as logically dead code and hence, removed it. Change-Id: Id7e0105fc9a5ca5b2c2d098c665e6e32ecc6b62b updates: bz#789278 Signed-off-by: yatipadia <ypadia@redhat.com>