summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* tests: Disable client-healsPranith Kumar K2020-05-151-0/+2
| | | | | | | | | | | | | | | | | Problem: ok 32 [ 11/ 9] < 46> 'gf_rm_file_and_gfid_link /d/backends/patchy0 del-file' not ok 33 [ 13/ 131] < 48> '! dd if=/dev/zero of=/mnt/glusterfs/0/del-file bs=1M count=1 oflag=direct' -> '' The assumption in the test above is that the file wouldn't exist when dd happens. But heal can lead to creation of the file in some cases leading to spurious failures. Fix: Disable client side heal. Fixes: #1245 Change-Id: I96b2b45528f9dfb3199d503a467cafafba9b387f Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* Fix ./tests/basic/fencing/afr-lock-heal-basic.t failurePranith Kumar K2020-05-131-3/+3
| | | | | | | | | | | | | | | | In brick-mux tests, all bricks of the volume have same pid. "generate_brick_statedump" cleans up the older statedumps with same brick pid. So successive calls to this function will delete previous brick's statedump as all bricks share same pid. So grep calls to the statedump were failing leading to failure of the .t To fix this, stored the result we need from statedump before calling next brick's statedump Fixes: #1234 Change-Id: I824ed4dff79e7242b3e980364836b9af0e87a6ee Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* syncop: improve scaling and implement more toolsXavi Hernandez2020-05-1313-109/+332
| | | | | | | | | | | | | | | | | | | | The current scaling of the syncop thread pool is not working properly and can leave some tasks in the run queue more time than necessary when the maximum number of threads is not reached. This patch provides a better scaling condition to react faster to pending work. Condition variables and sleep in the context of a synctask have also been implemented. Their purpose is to replace regular condition variables and sleeps that block synctask threads and prevent other tasks to be executed. The new features have been applied to several places in glusterd. Change-Id: Ic50b7c73c104f9e41f08101a357d30b95efccfbf Fixes: #1116 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* build: geo-rep sub-pkg requires policycoreutils-python-utils on rhel8Sunny Kumar2020-05-131-0/+5
| | | | | | | | glusterfs-geo-replication sub-package requires policycoreutils-python-utilson rhel8 to set relevant selinux boolean to allow rsync. Change-Id: Ia0fdcfdd8c7d18cd194e011f6b365bf5cb70a20a Fixes: #1236 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* dht: Do opendir selectively in gf_defrag_process_dirSusant Palai2020-05-122-22/+55
| | | | | | | | | | | | | | | | Currently opendir is done from the cluster view. Hence, even if one opendir is successful, the opendir operation as a whole is considered successful. But since in gf_defrag_get_entry we fetch entries selectively from local_subvols, we need to opendir individually on those local subvols and keep track of fds separately. Otherwise it is possible that opendir failed on one of the subvol and we wind readdirp call on the fd to the corresponding subvol, which will ultimately result in EINVAL error. fixes: #1218 Change-Id: I50dd88b9597852a15579f4ee325918979417f570 Signed-off-by: Susant Palai <spalai@redhat.com>
* debug/error-gen: Don't return EBADF for loc fopsPranith Kumar K2020-05-091-22/+20
| | | | | | | | | | | | | | | | | | | | | | | | The following crash happens when EBADF is returned for some of the loc operations. EBADF should be returned only for fd based fops (data=0x7ff1700606e8) at /home/jenkins/root/workspace/centos7-regression/xlators/cluster/dht/src/dht-helper.c:502 loc = {path = 0x0, name = 0x0, inode = 0x0, parent = 0x0, gfid = '\000' <repeats 15 times>, pargfid = '\000' <repeats 15 times>} ret = -1 frame = 0x7ff1700606e8 local = 0x7ff170049208 fd = 0x0 this = 0x7ff17c01d720 subvol = 0x7ff17c0197f0 __FUNCTION__ = "dht_check_and_open_fd_on_subvol_task" /home/jenkins/root/workspace/centos7-regression/libglusterfs/src/syncop.c:279 task = 0x7ff17c0b4920 Fixes: #1230 Change-Id: I24c11a8820a3c8b4070127e69c520e2c61e70930 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* cluster/ec: Return correct error code and log messageAshish Pandey2020-05-081-2/+9
| | | | | | | | | | | | In case of readdir was send with an FD on which opendir was failed, this FD will be useless and we return it with error. For now, we are returning it with EINVAL without logging any message in log file. Return a correct error code and also log the message to improve thing to debug. fixes: #1220 Change-Id: Iaf035254b9c5aa52fa43ace72d328be622b06169
* posix - fix seek functionalityBarak Sason Rofman2020-05-071-5/+6
| | | | | | | | | A wrong pointer check causes the offset returned by seek to be always wrong fixes: #1228 Change-Id: Iac4c6a163175617ac4f14544fc6b7c6fb4041cd6 Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
* tests: skip tests on absence of reflink in xfsPranith Kumar K2020-05-063-10/+12
| | | | | | Fixes: #1223 Change-Id: I36cb72d920ffd77405051546615c5262c392daef Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* common-ha: cluster status shows "FAILOVER" when actually HEALTHYKaleb S. KEITHLEY2020-05-041-2/+3
| | | | | | | | | | | | | | | | | | | | | | pacemaker devs change the format of the ouput of `pcs status` Expected to find a line in the format: Online: .... but now it's * Online: ... And the `grep -E "^Online:" no longer finds the list of nodes that are online. Also other lines now have '*' in first few characters of the line throwing off `grep -x ...` Change-Id: Ia04a89e76914f2a455a755f0a93fa415f60aefd0 Fixes: #1169 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* core, cli, quota: cleanup malloc debugging and statsDmitry Antipov2020-05-045-24/+6
| | | | | | | | | | | | 1. Since mcheck()/mprobe() etc. features are no longer used, mcheck.h isn't required to be included. 2. Since mallinfo() is used to obtain malloc statistics, it should be detected instead of malloc_stats(). Change-Id: I54c7d2ee568e06ab29938efc01d1a2153c5bd5db Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Fixes: #1172
* cluster/dht: Don't access local after STACK_DESTROYPranith Kumar K2020-05-031-1/+3
| | | | | | | | | | | | | There is a possibility that 'frame' could have been destroyed in dht_selfheal_dir_setattr() which can lead to local->mds_heal_fresh_lookup showing junk non-zero number. That will lead to double STACK_DESTROY. Remembered the value of the variable before the call to fix the access. Fixes: #1214 Change-Id: I37d1657798bfb549bb3887e260484d58fff42c91 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* test: improve geo-rep non root testSunny Kumar2020-05-022-9/+23
| | | | | | | | | Make sure bricks are up before mounting volume. Also made sure that mount is available before creating test data. Change-Id: I4915b837df46e43be5678dac8ae5602021c52685 Updates: #1197 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* cluster/ec: Fix varargs warning reported with clang-10Dmitry Antipov2020-05-011-10/+9
| | | | | | | | | | | | | | | | | | | | | Found with clang-10 -Wvarargs: xlators/cluster/ec/src/ec-combine.c:360:20: warning: passing an object that undergoes default argument promotion to 'va_start' has undefined behavior [-Wvarargs] va_start(args, global); ^ xlators/cluster/ec/src/ec-combine.c:348:34: note: parameter of type 'bool' is declared here gf_boolean_t global, ...) According to The C11 Standard, 7.16.1.4p4: If the parameter parmN is declared with the register storage class, with a function or array type, or with a type that is not compatible with the type that results after application of the default argument promotions, the behavior is undefined. Fixes: #1207 Change-Id: I527527845b2d574000d736c278be87cf19504761 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
* Use already expanded SYSCONF_DIR in glusterd.service instead of sysconfdirCharles Celerier2020-04-301-1/+1
| | | | | | | | | | | | | | | The generated glusterd.service file included the Automake artifact `${prefix}` in the EnvironmentFile definition. When an actual value for `${prefix}` is specified by Automake, this is not properly passed on to glusterd.service's EnvironmentFile variable since `${prefix}` will not be expanded once it is no longer in the control of Automake. Because this artifact was left by the sysconfdir variable, we substitute it with the SYSCONF_DIR variable that configure.ac expands earlier. Change-Id: I980b27590c15facb567b153bd57078fed320ff87 Updates: #1135 Signed-off-by: Charles Celerier <charles@chckyn.org>
* storage/posix: fix initialization warning reported with clang-10Dmitry Antipov2020-04-301-8/+4
| | | | | | | | | | | | | | | | | xlators/storage/posix/src/posix-common.c:1440:18: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides] .validate = GF_OPT_VALIDATE_MAX, ^~~~~~~~~~~~~~~~~~~ xlators/storage/posix/src/posix-common.c:1439:18: note: previous initialization is here .validate = GF_OPT_VALIDATE_MIN, ^~~~~~~~~~~~~~~~~~~ [4 times] Use GF_OPT_VALIDATE_BOTH for min/max-bounded values. Fixes: #1208 Change-Id: I073a27d23176f3b4a126f2eb50c079374a11418d Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
* core: Updated the GD_OP_VERSIONRinku Kothiya2020-04-291-1/+3
| | | | | | | fixes: #1204 Change-Id: Ied5d4d553771ff315ed3f1a7229f96733fe7ed00 Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
* tests: fix georep-upgrade.t failureSunny Kumar2020-04-291-1/+4
| | | | | | | | | | | | | | This patch fixes georep-upgrade.t test failure. Problem: `TEST upgrade_script=$(find / -type f -name glusterfs-georep-upgrade.py)` Multiple files with the same name can exist for temp fix picking only the 1st result. The proper fix should be finding a proper place for this upgrade script and use that. Change-Id: I8b388e30a30bc4a9a2f392bed42ceee7e8bc250a Updates: #1209 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* github/stale-bot: close issues automaticallyAmar Tumballi2020-04-292-0/+27
| | | | | | Updates: #824 Change-Id: I18e0a93c39e82bba74cc163457344fa6ce4d7fbb Signed-off-by: Amar Tumballi <amar@kadalu.io>
* tests: Fix bug-1101647.t test case failurekarthik-us2020-04-291-0/+2
| | | | | | | | | | | | | | Problem: tests/bugs/replicate/bug-1101647.t test case fails sporadically in the volume heal since connection to the bricks with shd was not being checked before running the index heal. Build link: https://build.gluster.org/job/regression-test-burn-in/5007/ Fix: Check for the connection status of the bricks with shd before performing the index heal. Change-Id: Ie7060f379b63bef39fd4f9804f6e22e0a25680c1 Updates: #1154 Signed-off-by: karthik-us <ksubrahm@redhat.com>
* rfc.sh: remove reference to bugzillaAmar Tumballi2020-04-291-36/+18
| | | | | | Updates: #824 Change-Id: I2eb1b43f01ca0e705110bd5d28f204065e611d3e Signed-off-by: Amar Tumballi <amar@kadalu.io>
* Github template: release tracker template addedHari Gowtham2020-04-292-4/+18
| | | | | | | | Have made minor changes to issue template to fix the nits Change-Id: Iadaee1289a98427c15ea03dd0a7c77a8e3ac3f7f Updates: #824 Signed-off-by: Hari Gowtham <hgowtham@redhat.com>
* dht xlator: integer handling issuenik-redhat2020-04-294-11/+19
| | | | | | | | | | | | | | Issue: The ret value is passed to the function instead of the proper errno value Fix: Passing the errno generated to the log function CID: 1415824 : Improper use of negative value CID: 1420205 : Improper use of negative value Change-Id: Iaa7407ebd03eda46a2c027695e6bf0f598b371b2 Updates: #1060 Signed-off-by: nik-redhat <nladha@redhat.com>
* dht: Handle setxattr and rm race for directory in rebalanceSusant Palai2020-04-283-0/+33
| | | | | | | | | | | | | | Problem: Selfheal as part of directory does not return an error if the layout setxattr fails. This is because the actual lookup fop must have been successful to proceed for layout heal. Hence, we could not tell if fix-layout failed in rebalance. Solution: We can check this information in the layout structure that whether all the xlators have returned error. fixes: #1200 Change-Id: I3e5f2a36c0d934c21476a73a9a5473d8e490cde7 Signed-off-by: Susant Palai <spalai@redhat.com>
* snapshot: fix python3 issue in gcronSunny Kumar2020-04-281-1/+2
| | | | | | | | | | | | | | | | | | | | | | `$gcron.py test_vol Job` Traceback: File "/usr/sbin/gcron.py", line 189, in <module> main() File "/usr/sbin/gcron.py", line 121, in main initLogger(script_name) File "/usr/sbin/gcron.py", line 44, in initLogger logfile = os.path.join(out.strip(), script_name[:-3]+".log") File "/usr/lib64/python3.6/posixpath.py", line 94, in join genericpath._check_arg_types('join', a, *p) File "/usr/lib64/python3.6/genericpath.py", line 151, in _check_arg_types raise TypeError("Can't mix strings and bytes in path components") from None TypeError: Can't mix strings and bytes in path components Solution: Added the 'universal_newlines' flag to Popen. Change-Id: I4c7a0e5bce605e4c134f6786c9dd8162b89fc77f Fixes: #1193 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* socket: Resolve ssl_ctx leak for a brick while only mgmt SSL is enabledMohit Agrawal2020-04-281-2/+2
| | | | | | | | | | | | | Problem: While only mgmt SSL is enabled for a brick process use_ssl flag is false for a brick process and socket api's cleanup ssl_ctx only while use_ssl and ssl_ctx both are valid Solution: To avoid a leak check only ssl_ctx, if it is valid cleanup ssl_ctx Fixes: #1196 Change-Id: I2f4295478f4149dcb7d608ea78ee5104f28812c3 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* build: geo-rep requires relevant selinux permission for rsyncSunny Kumar2020-04-281-0/+15
| | | | | | | | | | | If selinux is set in enforcing mode geo-rep goes into faulty state. To avoid this from happening some relevant selinux booleans need to be set in 'on' state to allow rsync operation. Change-Id: Ia8ce530d6548c2a545f4c99c600f5aac2bbb3363 Fixes: #1182 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* extras: upgrade script for geo-repShwetha K Acharya2020-04-272-0/+153
| | | | | | | | | | | | | | | | | The patch https://review.gluster.org/#/c/glusterfs/+/23733/( which optimizes the changelog) introduces change in dirctory structure which is above changelog files. Thus, before upgrade, old version should get updated, with respect to the corresponding changes made by the above qouted patch. This upgrade script, 1) creates a temp htime file, with updated paths from the htime file. Updates temp htime file as htime file. 2) places the changelog files under the required directory structure. Updates: #154 Change-Id: I4b5a6cb9a9266a65972b419b329bc958de8fdf8a Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
* afr: event gen changesRavishankar N2020-04-244-82/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The general idea of the changes is to prevent resetting event generation to zero in the inode ctx, since event gen is something that should follow 'causal order'. Change #1: For a read txn, in inode refresh cbk, if event_generation is found zero, we are failing the read fop. This is not needed because change in event gen is only a marker for the next inode refresh to happen and should not be taken into account by the current read txn. Change #2: The event gen being zero above can happen if there is a racing lookup, which resets even get (in afr_lookup_done) if there are non zero afr xattrs. The resetting is done only to trigger an inode refresh and a possible client side heal on the next lookup. That can be acheived by setting the need_refresh flag in the inode ctx. So replaced all occurences of resetting even gen to zero with a call to afr_inode_need_refresh_set(). Change #3: In both lookup and discover path, we are doing an inode refresh which is not required since all 3 essentially do the same thing- update the inode ctx with the good/bad copies from the brick replies. Inode refresh also triggers background heals, but I think it is okay to do it when we call refresh during the read and write txns and not in the lookup path. The .ts which relied on inode refresh in lookup path to trigger heals are now changed to do read txn so that inode refresh and the heal happens. Change-Id: Iebf39a9be6ffd7ffd6e4046c96b0fa78ade6c5ec Fixes: #1179 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reported-by: Erik Jacobson <erik.jacobson at hpe.com>
* dht - fixing rebalance failures for files with holesBarak Sason Rofman2020-04-241-11/+10
| | | | | | | | | | | Rebalance process handling of files which contains holes casued rebalance to fail with "No space left on device" errors. This patch modifies the code-flow in such a way that files with holes will be rebalanced correctly. fixes: #1187 Change-Id: I89bc3d4ea7f074db7213d759c49307f379543932 Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
* md-cache: fix several NULL dereferencesXavi Hernandez2020-04-231-66/+129
| | | | | | | | | | | | | | This patch includes the following CID from Coverity Scan: * 1425196 * 1425197 * 1425198 * 1425199 * 1525200 Change-Id: Iddcfea449d3dd56d4dfcc39f4c3c608518e611e4 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com> Updates: #1060
* tests: Fix spurious failure of tests/basic/quick-read-with-upcall.tPranith Kumar K2020-04-221-10/+3
| | | | | | | | | | | | | | | | | | | Problem: The test is failing at 14:56:41 ok 13, LINENUM:38 14:56:41 not ok 14 Got "test-message0" instead of "test-message1", LINENUM:41 14:56:41 FAILED COMMAND: test-message1 cat /mnt/glusterfs/1/test.txt This happens because fuse sometimes doesn't send 'read' fop to glusterfs and is served from cache. Fix: Mount with direct-io-mode=yes so that read is always received by gluster Fixes: #1190 Change-Id: I369e2024a85dc492dc24c7579b161fb965f55d19 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* dht/rebalance - fixing recursive failure issueBarak Sason Rofman2020-04-211-1/+2
| | | | | | | | | | | If rebalance process is failing, recursive failures appear in the log file, which is distracting from the root cause. In order to avoid recursive failure, error handling mechanism has been modified. fixes: #1072 Change-Id: Iae19430323630acd97c2c8d35685626d8da747a7 Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
* dht - Remove "tier" code (part 1)v9devBarak Sason Rofman2020-04-173-476/+19
| | | | | | | | | | | | | This patch is removing some of the "tier" code in dht xlator, as it is no longer being used. Not all of the not-needed code is removed at once, so reviewing is easier. Follow up patches removing additional unused code will follow. This is based in the work done in https://review.gluster.org/#/c/glusterfs/+/23935/ Change-Id: I3cb6a0c5d8f14afcd87cf021ef8f74b91c0f908a updates: #1097 Signed-off-by: Barak Sason Rofman <bsaonro@redhat.com>
* tests: Fix for spurious failure for some test casesMohit Agrawal2020-04-165-1/+6
| | | | | | | | | | | | | Problem: Sometimes test case is failing at the time of creating files on mount point after mounting the volume Solution: After started the volume need to wait to make sure all bricks instances are completely started so put a online_brick_count check after just started the volume Change-Id: I5020e7e417539377277ca00189f9c51d2cf877a6 Fixes: #1162 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* md-cache: avoid clearing cache when not necessaryXavi Hernandez2020-04-161-72/+93
| | | | | | | | | | | | mdc_inode_xatt_set() blindly cleared current cache when dict was not NULL, even if there was no xattr requested. This patch fixes this by only calling mdc_inode_xatt_set() when we have explicitly requested something to cache. Change-Id: Idc91a4693f1ff39f7059acde26682ccc361b947d Fixes: #1140 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* posix: fix GF_VALIDATE_OR_GOTO(this->name, this, out)Sanju Rakonde2020-04-161-3/+1
| | | | | | | | | | | | | | | Remove GF_VALIDATE_OR_GOTO(this->name, this, out) when this is passed as an argument and is checked for NULL in the caller itself. GF_VALIDATE_OR_GOTO(this->name, this, out) is modified to use xlator name instead of this->name as we are still verifying whether this is NULL. updates: #1000 Change-Id: Ide3180da29d0d4a35b2c5b9a7604fdf2ff4a9ffb Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* test: tests/bugs/rpc/bug-847624.t is crashedMohit Agrawal2020-04-152-7/+8
| | | | | | | | | | | | | Problem: glusterfs(GNFS) is crashing at the time of handling Pollerr event in rpcsvc_drc_client_unref.GNFS is crashed because ref was 0 at the time of unref and ref was taken while Pollin event successfully handled. Solution: Convert drc_client ref to atomic ref to avoid the crash Change-Id: Ia4c054f2f388032a5cd99597d0cfa18b003ca690 Fixes: #1038 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* tests: do not truncate file offsets and sizes to 32-bitDmitry Antipov2020-04-154-9/+13
| | | | | | | | | | Do not truncate file offsets and sizes to 32-bit to prevent tests from spurious failures on >2Gb files. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Change-Id: I2a77ea5f9f415249b23035eecf07129f19194ac2 Fixes: #1161
* common-ha: cluster status shows "FAILOVER" when actually HEALTHYKaleb S. KEITHLEY2020-04-141-1/+1
| | | | | | | | | | | | | | | | | | | pacemaker devs change the format of the ouput of `pcs status` Expected to find a line in the format: Online: .... but now it's * Online: ... And the `grep -E "^Online:" no longer finds the list of nodes that are online. Change-Id: If2aa1e7b53c766c625d7b4cc222a83ea2c0bd72d Fixes: #1169 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* tests: Fix spurious failure of worm.tRinku Kothiya2020-04-131-2/+2
| | | | | | | | | | | | When the output of date command is a single digit number it is preceded by zero which is getting considered as an octal number. Removing the leading zero from the number solved the problem. Fixes: #1156 Change-Id: Iac4fa20607c0bb90d94dd8ff157ef6b60932c560 Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
* mgmt/glusterd: use stat() syscall wrapperDmitry Antipov2020-04-131-2/+3
| | | | | | | | | | | | | | | Found with 0-symbol-check.t: ./tests/basic/0symbol-check.t .. 1..2 ./xlators/mgmt/glusterd/src/.libs/glusterd_la-glusterd-volume-set.o should call sys_stat, not stat ok 1 [ 40/ 41011] < 40> 'find . -name *.o -exec ./tests/basic/symbol-check.sh {} \;' not ok 2 [ 11/ 1] < 42> '[ ! -e ./.symbol-check-errors ]' -> '' Failed 1/2 subtests Change-Id: I8962f487cd88738a1f7a962049d513712687088c Fixes: #1160 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
* test: Fix test "bug-1064148" to pass in muxBarak Sason Rofman2020-04-131-10/+11
| | | | | | | | Parts of the test weren't designed to run in mux mode, this is now fixed Change-Id: I428c2fcce6d047e324ca5dcaef677ee1794e3dfe updates: #1154 Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
* tests: Fix spurious failure of ↵Mohit Agrawal2020-04-131-1/+1
| | | | | | | | | | | | | tests/bugs/glusterd/serialize-shd-manager-glusterd-restart.t Problem: Sometime volume status is failed after restart glusterd in one cluster node Solution: Wait to finish glusterd handshake on down cluster node Change-Id: Ib23ca41c943caf2903c61ebf42dc437c1b9d6054 Fixes: #1158 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* protocol/server: Fix coverity issue RESOURCE_LEAKSheetal Pamecha2020-04-101-0/+1
| | | | | | | | | Handle case of arg not freed CID: 1422174 Updates: #1060 Change-Id: Ibd03908a3ea8369035c2b7f6e024b3e5be48f436 Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
* Adding basic glusterfind test caseShwetha K Acharya2020-04-092-1/+85
| | | | | | | | This test case includes all the basic glusterfind scenarios. fixes: #1044 Change-Id: I6021443729e35769fe855c5cc41bb3fbc6365ef0 Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
* posix: Avoid dict_del logs in posix_is_layout_stale while key is NULLMohit Agrawal2020-04-092-4/+5
| | | | | | | | | | | | Problem: The key "GF_PREOP_PARENT_KEY" has been populated by dht and for non-distribute volume like 1x3 key is not populated so posix_is_layout stale throw a message while a file is created Solution: To avoid a log put a condition before delete a key Change-Id: I813ee7960633e7f9f5e9ad2f42f288053d9eb71f Fixes: #1150 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* mount/fuse: Wait for 'mount' child to exit before dyingPranith Kumar K2020-04-092-1/+27
| | | | | | | | | | | | | | | | Problem: tests/bugs/protocol/bug-1433815-auth-allow.t fails sometimes because of stale mount. This stale mount comes into picture when parent process dies without waiting for the child process which mounts fuse fs to die Fix: Wait for mounting child process to die before dying. Fixes: #1152 Change-Id: I8baee8720e88614fdb762ea822d5877973eef8dc Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* [geo-rep] Merging multiple import into single importkshithijiyer2020-04-089-38/+39
| | | | | | | | | | | | | | | | | | Geo-replication has a large number of repeated imports as shown below: ``` from syncdutils import set_term_handler, finalize, lf from syncdutils import log_raise_exception, FreeObject, escape ``` There imports can be clubbed together as shown below: `` from syncdutils import (set_term_handler, finalize, lf, log_raise_exception, FreeObject, escape) ``` Fixes: #1105 Change-Id: I59a48dd57a70fc851d93150b85e736ce41e8b793 Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
* dht - fixing a permission update issueBarak Sason Rofman2020-04-084-18/+110
| | | | | | | | | | | | | | | | | | When bringing back a downed brick and performing lookup from the client side, the permission on said brick aren't updated on the first lookup, but only on the second. This patch modifies permission update logic so the first lookup will trigger a permission update on the downed brick. LIMITATIONS OF THE PATCH: As the choice of source depends on whether the directory has layout or not. Even the directories on the newly added brick will have layout xattr[zeroed], but the same is not true for a root directory. Hence, in case in the entire cluster only the newly added bricks are up [and others are down], then any change in permission during this time will be overwritten by the older permissions when the cluster is restarted. fixes: #999 Change-Id: Ieb70246d41e59f9cae9f70bc203627a433dfbd33 Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>