summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* glusterd: Resolve coverity bug CID1435891 (#1716)mohit842020-10-301-2/+3
| | | | | | | The PR #1672 has introduced a coverity bug, this fixes it. Change-Id: I1140bf7527b6466f4210809a74dc3e59ecf02b6e Fixes: #1663 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* cluster/dht: Perform migrate-file with lk-owner (#1581)Pranith Kumar Karampuri2020-10-2911-12/+143
| | | | | | | | | | | | | | | | | | | | | | * cluster/dht: Perform migrate-file with lk-owner 1) Added GF_ASSERT() calls in client-xlator to find these issues sooner. 2) Fuse is setting zero-lkowner with len as 8 when the fop doesn't have any lk-owner. Changed this to have len as 0 just as we have in fops triggered from xlators lower to fuse. * syncop: Avoid frame allocation if we can * cluster/dht: Set lkowner in daemon rebalance code path * cluster/afr: Set lkowner for ta-selfheal * cluster/ec: Destroy frame after heal is done * Don't assert for lk-owner in lk call * set lkowner for mandatory lock heal tests fixes: #1529 Change-Id: Ia803db6b00869316893abb1cf435b898eec31228 Signed-off-by: Pranith Kumar K <pranith.karampuri@phonepe.com>
* io-cache: Minor Performance Optimization (#1656)Shree Vatsa N2020-10-281-17/+3
| | | | | | | | move trace logs after mutex unlock in some macros * Also removed unused macros - ioc_page_lock and ioc_page_unlock Fixes: #1653 Signed-off-by: Shreevatsa N <i.mnshreevatsa@gmail.com>
* tests: exclude more contrib/fuse-lib objects (#1694)Dmitry Antipov2020-10-271-0/+3
| | | | | | | Exclude more contrib/fuse-lib objects to avoid silly tests/basic/0symbol-check.t breakage. Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Fixes: #1692
* rpcsvc/transport: gracefully disconnect when graph is not ready (#1671)Rafi KC2020-10-272-7/+11
| | | | | | | | | | | | | | | | | * rpcsvc/transport: gracefully disconnect when graph is not ready. There was a crash reported when the brick rpc get's an accept request from a client before the server xlator is fully inited. The fix https://review.gluster.org/22339/ solves the crash, but it leaves the connection alive with out adding the rpc to xprts list of server conf. This will leads to problems with upcall, dump, and other cleanup codes. So this patch will make the rpc to fail and disconnect if a connection attempted before the server is fully inited. Change-Id: I3bf1113c0da4c2614afaa2c0f4eb6abfb0d26ed0 Signed-off-by: Mohammed Rafi KC <rafi.kavungal@iternity.com>
* tests: ./tests/bugs/core/bug-1650403.t is getting timed out (#1672)mohit842020-10-2712-15/+112
| | | | | | | | | | | | | | | | | | | | | | The test case ./tests/bugs/core/bug-1650403.t is consuming more than 500s while running a regression job so the regression is failing. After executed the test case in softserve environment i have found it is getting timed-out because DNS call is consuming time by glusterd while it is trying to disbale/enable shd. time ./tests/bugs/core/bug-1650403.t real 20m52.952s user 0m20.842s sys 0m9.824s After save the local IP address into glusterd_conf_t list test case time is reduced time ./tests/bugs/core/bug-1650403.t real 1m29.467s user 0m23.366s sys 0m10.395s Fixes: #1663 Change-Id: Iee3462075f84897faa294e48d81af9761929613a Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* nfs: Fix inconsistency between glibc and libtirpc (#1698)Xavi Hernandez2020-10-245-18/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * nfs: Fix inconsistency between glibc and libtirpc There's a critical difference between RPC implementation in glibc and libtirpc. In libtirpc, svc_run() starts a polling loop that listens from all registered connections and handles requests. When this is done from multiple threads, a race can happen where both threads are trying to process the same connection simultaneously. This causes memory corruption. However, in glibc, svc_run() only handles the registered connections on the current thread, so it's necessary to call svc_run() on all threads that register services. This patch fixes that problem by calling svc_run() from all threads only if libtirpc is not used. Otherwise it's called only once. Change-Id: I97c3c39a9aad90115e7e23c70884a4ee7769a2dd Updates: #1009 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com> * nfs: Use an atomic instead of a mutex Instead of using a mutex to synchronize the call to svc_run(), we use an atomic operation to update the flag. Change-Id: I401481d1d0308a557271f99a32527a2ab3c4542f Signed-off-by: Xavi Hernandez <xhernandez@redhat.com> * nfs: Align fields of struct nfs_state Change-Id: Ib0da4911533ffd9c08636457b664eaa45172e975 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
* posix: add io_uring supportRavishankar N2020-10-2311-5/+744
| | | | | | | | | | | | | | | | | This patch adds support for reads, writes and fsyncs using io-uring in posix xlator. A volume option 'storage.linux-io_uring' is introduced to turn it on or off. When I ran tests with fio and iozone on physical machines on a 2x3 volume + single client, the numbers were not any worse than regular pwrite/pread syscalls which posix does with default volume configurations. But given that io_uring itself undergoing rapid improvement and bug fixes,it is good to have an intial working implementation in gluster and iteratively develop on top of it. Updates: #1398 Change-Id: Ia47456ebb4c16a3b66ad9beb6a9043cc090fed2b Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* glusterd/afr: enable granular-entry-heal by default (#1621)Ravishankar N2020-10-2217-23/+555
| | | | | | | | | | | | | | | | | | | | | | | | | 1. The option has been enabled and tested for quite some time now in RHHI-V downstream and I think it is safe to make it 'on' by default. Since it is not possible to simply change it from 'off' to 'on' without breaking rolling upgrades, old clients etc., I have made it default only for new volumes starting from op-verison GD_OP_VERSION_9_0. Note: If you do a volume reset, the option will be turned back off. This is okay as the dir's gfid will be captured in 'xattrop' folder and heals will proceed. There might be stale entries inside entry-changes' folder, which will be removed when we enable the option again. 2. I encountered a cust. issue where entry heal was pending on a dir. with 236436 files in it and the glustershd.log output was just stuck at "performing entry selfheal", so I have added logs to give us more info in DEBUG level about whether entry heal and data heal are progressing (metadata heal doesn't take much time). That way, we have a quick visual indication to say things are not 'stuck' if we briefly enable debug logs, instead of taking statedumps or checking profile info etc. Fixes: #1483 Change-Id: I4f116f8c92f8cd33f209b758ff14f3c7e1981422 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* glusterd: brick sock file deleted, log error (#1560)schaffung2020-10-221-2/+25
| | | | | | | | | | | | | | | | | | Issue: The satus of the brick as tracked by glusterd is stopped if the socket file corresponding to a running brick process is absent in /var/run/gluster. The glusterd keeps on trying to reconnect ( rpc layer ) but it fails. Code change: Rather than registering the rpc connection with the help of the given sockfilepath which is not even present as it keeps on reconnecting, why not log this as an error and not try to reconnect using the non-existing sock file path. Fixes: #1526 Change-Id: I6c81691ab1624c66dec74f5ffcc6c383201ac757 Signed-off-by: srijan-sivakumar <ssivakumar@redhat.com> Co-authored-by: srijan-sivakumar <ssivakumar@redhat.com>
* trash: Create inode_table only while feature is enabled (#1626)mohit842020-10-221-3/+44
| | | | | | | | | | | | | | Currently trash xlator create a inode table(1M) even if feature is not enabled.In brick_mux environment while 250 bricks are attached with a single brick process and feature is not enable brick process increase RSS size unnecessarily. Solution: Create inode_table only while a feature is enabled. The patch reduces 250M RSS size per brick process if trash feature is not enabled. Change-Id: I11a6fd2b8419fe2988f398be6ec30fb4f3b99a5d Fixes: #1543 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* afr: fixing null dereference reported by coverity (#1570)Tamar Shacked2020-10-221-1/+1
| | | | | | | Added a null check to avoid a null pointer dereference CID: 1433222 Updates: #1060 Signed-off-by: Tamar Shacked <tshacked@redhat.com>
* geo-rep: Enable rsync verbose logging for debugging (#1588)Kotresh HR2020-10-211-1/+10
| | | | | | | | | | | | By default rsync command is run without --verbose argument. The rsync command takes "--verbose" or "-vv" which prints verbal output which helps in debugging rsync errors. The verbose argument can be passed by setting geo-rep config option "rsync_options" to required verbose string. If set, this patch logs rsync verbose output in the geo-rep log file. Fixes: #1587 Change-Id: I0b7e1e813eb7e90f1c2ba885b42fd52dbd44386a Signed-off-by: Kotresh HR <khiremat@redhat.com>
* libglusterfs/coverity: pointer to local outside the scope (#1675)Vinayak hariharmath2020-10-213-7/+12
| | | | | | | | | | | | | | issue: gf_store_read_and_tokenize() returns the address of the locally referred string. fix: pass the buf to gf_store_read_and_tokenize() and use it for tokenize. CID: 1430143 Updates: #1060 Change-Id: Ifc346540c263f58f4014ba2ba8c1d491c20ac609 Signed-off-by: Vinayakswami Hariharmath <vharihar@redhat.com>
* glusterd: wrong comparison in glusterd_brick_start() function (#1665)mohit842020-10-211-2/+2
| | | | | | | | Call gf_uuid_compare in glusterd_brick_start to compare two uuid instead of calling strncmp. Fixes: #1659 Change-Id: Icd1bdcc1ed4dfab4407fc51ae4ba248989a32f17 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* dht/rebalance - fixed dhtfcnt_thread wakeup time to be in absolute time (#1667)Tamar Shacked2020-10-211-1/+1
| | | | | | | | | | | The dhtfcnt_thread is designed to wakeup each 10min. Changed the time units passed to pthread_cond_timedwait() to be in absolute time (epoch time) todo: verify the values of total_file_size updates: #1507 Change-Id: I1a81ff23ff2c313463add9e0a5fc05c84ac1b4a5 Signed-off-by: Tamar Shacked <tshacked@redhat.com>
* Maintainers List Update : Management daemon. (#1633)schaffung2020-10-201-0/+1
| | | | | | | | Hello Maintainers, requesting permission to be a peer in the management daemon component. I believe I can actively help in the maintenance as well as the enhancement of the component. Updates: #1584 Signed-off-by: srijan-sivakumar <ssivakum@redhat.com>
* Update maintainers list of geo-rep and glusterfind (#1629)Shwetha Acharya2020-10-191-0/+2
| | | | | Change-Id: I6afd762ca9d9a7f6d2fb83256cb6edffb37b67a3 Updates: #1584 Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
* test: The test case tests/bugs/bug-1064147.t is failing (#1662)mohit842020-10-191-0/+3
| | | | | | | | | | | | The test case tests/bugs/bug-1064147.t is failing at the time of comparing root permission with permission changed while one of the brick was down.The permission was not matching because layout was not existing on root at the time of healing a permission, so correct permission was not healed on newly started brick Fixes: #1661 Change-Id: If63ea47576dd14f4b91681dd390e2f84f8b6ac18 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* tests/00-geo-rep: 00-georep-verify-non-root-setup.t fails on devel branch ↵Shwetha Acharya2020-10-151-1/+1
| | | | | | | | | | (#1639) Increasing the timeout value to overcome the encountered delay in execution of test Change-Id: Id40d92366738439634a6b06d447a43a2c6cdbf44 Updates: #1594 Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
* io-stats: Configure ios_sample_buf_size based on sample_interval value (#1574)mohit842020-10-152-8/+26
| | | | | | | | | | | io-stats xlator declares a ios_sample_buf_size 64k object(10M) per xlator but in case of sample_interval is 0 this big buffer is not required so declare the default value only while sample_interval is not 0.The new change would be helpful to reduce RSS size for a brick and shd process while the number of volumes are huge. Change-Id: I3e82cca92e40549355edfac32580169f3ce51af8 Fixes: #1542 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* glusterd: Resolve clang format issue (#1622)mohit842020-10-131-10/+10
| | | | | | | | | In the commit 8d54899724a31f29848e1461f68ce2cf40585056 clang format issue was introduced in patch but clang check was not complained at the time of running regression. Fixes: #1569 Change-Id: Ib1fb039ebe3c77f39b8c686eb4699327256ac494 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* tests/00-geo-rep: 00-georep-verify-non-root-setup.t fails on devel branch ↵Shwetha Acharya2020-10-131-0/+4
| | | | | | | | | | | | | | (#1617) ssh -oPasswordAuthentication=no -oStrictHostKeyChecking=no -i /var/lib/glusterd/geo-replication/secret.pem -p 22 nroot@127.0.0.1 /build/install/sbin/gluster --xml --remote-host=localhost volume info slave failes with error 255. Adding ssh key clean up code at the beginning of the test, inorder to clean any stale entries Updates: #1594 Signed-off-by: Shwetha K Acharya <sacharya@redhat.com>
* MAINTAINERS: update Amar's contact (#1598)Amar Tumballi2020-10-121-5/+5
| | | | | | | * Also add Deepshika to Platform section! Updates: #1584 Change-Id: I9846fb1a16ad536e0a23d606d308a61e2ff60b54 Signed-off-by: Amar Tumballi <amar@kadalu.io>
* core: configure optimum inode table hash_size for shd (#1576)mohit842020-10-1112-35/+65
| | | | | | | | | | | | | | | | | | | | | In brick_mux environment a shd process consume high memory. After print the statedump i have found it allocates 1M per afr xlator for all bricks.In case of configure 4k volumes it consumes almost total 6G RSS size in which 4G consumes by inode_tables [cluster/replicate.test1-replicate-0 - usage-type gf_common_mt_list_head memusage] size=1273488 num_allocs=2 max_size=1273488 max_num_allocs=2 total_allocs=2 inode_new_table function allocates memory(1M) for a list of inode and dentry hash. For shd lru_limit size is 1 so we don't need to create a big hash table so to reduce RSS size for shd process pass optimum bucket count at the time of creating inode_table. Change-Id: I039716d42321a232fdee1ee8fd50295e638715bb Fixes: #1538 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* configure.ac: Add --enable-brickmux (#1572)mohit842020-10-092-0/+18
| | | | | | | | Introduce an --enable-brickmux configure option to enable brick_mux as a default option. Fixes: gluster#1569 Change-Id: Id0c61ee3500630889e2cb2b5816cd40f68d47c94 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* MAINTAINERS: Updated Email address (#1567)Aravinda Vishwanathapura2020-10-091-6/+6
| | | | Change-Id: I867809cc2015869e480389caef22695862ccda9a Signed-off-by: Aravinda Vishwanathapura <aravinda@kadalu.io>
* rfc.sh: Handle remote-repo with .git extension (#1586)Pranith Kumar Karampuri2020-10-091-1/+1
| | | | | fixes: #1582 Change-Id: I8ad01b05f3d4befb1b502e853b4d4ee1ea8d038c Signed-off-by: Pranith Kumar K <pranith.karampuri@phonepe.com>
* Update maintainer list of EC (#1585)Sheetal Pamecha2020-10-091-0/+1
| | | | | Change-Id: I40caa4b7355c4b48ef18c45e46f5dbecb7ae538a Updates: #1584 Signed-off-by: Sheetal <spamecha@redhat.com>
* Update maintainer list of DHT (#1551)Barak Sason Rofman2020-10-091-1/+5
| | | | | | | Update maintainers list to reflect current status of DHT. fixes: #1550 Change-Id: Ie5ddd0255a53da1ac2b4dd1b210d69e78ca6c85a Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
* rfc.sh: make proper changes to work on github (#1547)Amar Tumballi2020-10-071-9/+14
| | | | | Change-Id: Ie02ae47c766f2caaece827f0d98862f2f4589c9c Updates: #1000 Signed-off-by: Amar Tumballi <amar@kadalu.io>
* Contributing: update about who can trigger the buildAmar Tumballi2020-10-071-3/+4
| | | | | | | | | Currently only maintainers listed in github group can trigger the regression runs, it may change in future! Updates: #1000 Change-Id: I3b5f1cace8a433886d725539198998875dcdce36 Signed-off-by: Amar Tumballi <amar@kadalu.io>
* Migration: update the docsAmar Tumballi2020-08-125-56/+160
| | | | | | | | | | | * Make CONTRIBUTING.md have complete workflow documented. * Change './rfc.sh' to reflect the new workflow Updates: #1000 Also Updates: gluster/project-infrastructure#62 Change-Id: I31becd7cdb35cb68048b662786c31694791d50fe Signed-off-by: Amar Tumballi <amar@kadalu.io>
* DHT - Removing commit hash and 'magical' return value from rebalanceBarak Sason Rofman2020-09-211-26/+7
| | | | | | | | | | | | | | | | | | | The order of operation in rebalance is as follows: gf_defrag_fix_layout - > gf_defrag_process_dir - > gf_defrag_get_entry gf_defrag_process_dir is passing to gf_defrag_get_entry a pointer to a variable 'gf_defrag_get_entry', however this value is ignored (remains unchanged in the method). Based on the return value from gf_defrag_get_entry, gf_defrag_process_dir may change it's return value to the 'magical' number 2, however since the value of 'should_commit_hash' never changes, this never happnes. All of this is propagated back to gf_defrag_fix_layout and is now removed from there as well. Change-Id: Ibff297650cf84139bd26c830bfa44f81119b60d4 updates: #1002 Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
* mount/fuse: Fix graph-switch when reader-thread-count is setPranith Kumar K2020-10-052-8/+68
| | | | | | | | | | | | | | Problem: The current graph-switch code sets priv->handle_graph_switch to false even when graph-switch is in progress which leads to crashes in some cases Fix: priv->handle_graph_switch should be set to false only when graph-switch completes. fixes: #1539 Change-Id: I5b04f7220a0a6e65c5f5afa3e28d1afe9efcdc31 Signed-off-by: Pranith Kumar K <pranith.karampuri@phonepe.com>
* dht - Remove "tier" code (part 2)Barak Sason Rofman2020-09-169-515/+81
| | | | | | | | | | | | | | Part 1 of this patch https://review.gluster.org/#/c/glusterfs/+/24328/ Following part 1, this patch complety removes all traces of "tier" feature in dht. This is based in the work done in https://review.gluster.org/#/c/glusterfs/+/23935/ Change-Id: I7fba1ab7249719301ca578b4a6f4acac748da145 updates: #1097 Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
* fixed AFR_READ_POLICY_GFID_PID_HASH policy bugperrynzhou2020-09-291-1/+2
| | | | | | Change-Id: Ib927a770a486c95e4b157e76ba96e9904d1a9716 Fixes: #1499 Signed-off-by: perrynzhou <perrynzhou@gmail.com>
* cluster/afr: Heal directory rename without rmdir/mkdirPranith Kumar K2020-04-1320-128/+1427
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem1: When a directory is renamed while a brick is down entry-heal always did an rm -rf on that directory on the sink on old location and did mkdir and created the directory hierarchy again in the new location. This is inefficient. Problem2: Renamedir heal order may lead to a scenario where directory in the new location could be created before deleting it from old location leading to 2 directories with same gfid in posix. Fix: As part of heal, if oldlocation is healed first and is not present in source-brick always rename it into a hidden directory inside the sink-brick so that when heal is triggered in new-location shd can rename it from this hidden directory to the new-location. If new-location heal is triggered first and it detects that the directory already exists in the brick, then it should skip healing the directory until it appears in the hidden directory. Credits: Ravi for rename-data-loss.t script Fixes: #1211 Change-Id: I0cba2006f35cd03d314d18211ce0bd530e254843 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* build: drop -rdynamic from compiler flagsDmitry Antipov2020-09-231-1/+1
| | | | | | | | | Since -rdynamic is meaningless during compilation, drop it from GF_CFLAGS. Note GF_LDFLAGS unconditionally use -rdynamic anyway. Change-Id: I07c7086a8a6adad8358b88999d98828c1cbfb464 Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru> Updates: #1002
* DHT - Fixing memory allocation crashBarak Sason Rofman2020-09-241-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | The allocation dir_dfmeta = GF_CALLOC(1, sizeof(*dir_dfmeta), gf_common_mt_pointer); seems to cause a crash. From the logs: [2020-09-24 13:10:13.225935 +0000] I [dht-rebalance.c:3273:gf_defrag_process_dir] 0-dist-dht: migrate data called on /dir1 [2020-09-24 13:10:13.226587 +0000] E [mem-pool.c:61:gf_mem_set_acct_info] (-->/usr/local/lib/glusterfs/9dev/xlator/cluster/distribute.so(+0x18e60) [0x7f4b1f71ee60] -->/usr/local/lib/glusterfs/9dev/xlator/cluster/distribute.so(+0x173ab) [0x7f4b1f71d3ab] -->/usr/local/lib/libglusterfs.so.0(+0x4d8e5) [0x7f4b357668e5] ) 0-: Assertion failed: type <= mem_acct->num_types [2020-09-24 13:10:13.226623 +0000] E [mem-pool.c:61:gf_mem_set_acct_info] (-->/usr/local/lib/glusterfs/9dev/xlator/cluster/distribute.so(+0x18e60) [0x7f4b1f71ee60] -->/usr/local/lib/glusterfs/9dev/xlator/cluster/distribute.so(+0x173d3) [0x7f4b1f71d3d3] -->/usr/local/lib/libglusterfs.so.0(+0x4d8e5) [0x7f4b357668e5] ) 0-: Assertion failed: type <= mem_acct->num_types The following change fixes that crash. fixes: #1511 Change-Id: Ibf605648981f7108e863c91a80370cf077ad7c4a Signed-off-by: Barak Sason Rofman <bsasonro@redhat.com>
* bitrot/stub: Fix memory leak gf_br_stub_mt_version_tMohammed Rafi KC2020-09-012-31/+42
| | | | | | | | | | The data type gf_br_stub_mt_version_t is leaking because the data type has been added to the dict as static type and the memory is not free'd from anywhere else Change-Id: Ib10134f41f45a39be849af1708b1960c77fb62fd Fixes: #1427 Signed-off-by: Mohammed Rafi KC <rafi.kavungal@iternity.com>
* MAINTAINERS: Changing communication emailMohammed Rafi KC2020-09-301-5/+5
| | | | | | Change-Id: I5ae3161d0357ddd62fb6409933837ffd94610d83 Updates: #1002 Signed-off-by: Mohammed Rafi KC <rafi.kavungal@iternity.com>
* gfapi: Move the SECURE_ACCESS_FILE check out of glfs_mgmt_initMôshe van der Sterre2020-09-285-5/+223
| | | | | | | | glfs_mgmt_init is only called for glfs_set_volfile_server, but secure_mgmt is also required to use glfs_set_volfile with SSL. fixes: #829 Change-Id: Ibc769fe634d805e085232f85ce6e1c48bf4acc66
* dht: explicit null dereferencenik-redhat2020-09-252-0/+4
| | | | | | | | | | | | | | Added a null check for uuid_list_copy, to avoid null dereference in strtok_r() in case of strdup() failure. CID: 1325612 CID: 1274223 Updates: #1060 Change-Id: I641a5068cd76d7b2ed92eccf39e7f97d6f7b2480 Signed-off-by: nik-redhat <nladha@redhat.com>
* locks: null dereferencenik-redhat2020-09-251-0/+3
| | | | | | | | | | | Added a null check before executing the strtok_r() to avoid null dereference in case of strdup() failure. CID: 1407938 Updates: #1060 Change-Id: Iec6e72ae8cb54f6d0a287615c43756325b2026ec Signed-off-by: nik-redhat <nladha@redhat.com>
* glusterd: start the brick on a different portSanju Rakonde2020-08-261-0/+3
| | | | | | | | | | | | | | | | | | | | | Problem: brick fails to start when the port provided by glusterd is in use by any other process Solution: glusterd should check errno set by runner_run() and if it is set to EADDRINUSE, it should allocate a new port to the brick and try to start it again. Previously ret value is checked instead of errno, so the retry part never executed. Now, we initialize errno to 0 before calling runner framework. and afterwards store the errno into ret to avoid modification of errno in subsequent function calls. fixes: #1101 Change-Id: I1aa048a77c5f8b035dece36976d60602d9753b1a Signed-off-by: Sanju Rakonde <srakonde@redhat.com> Signed-off-by: nik-redhat <nladha@redhat.com>
* MAINTAINERS: Changing communication emailpranith.karampuri2020-09-241-8/+8
| | | | | | Updates: #1002 Change-Id: I1b8fb6430a6a64fc813bdd111a31b3574ffc06a1 Signed-off-by: Pranith Kumar K <pranith.karampuri@phonepe.com>
* glusterd: Replacing str with ptr in strchr to reduce comparisonsrijan-sivakumar2020-09-261-1/+1
| | | | | | | | | | | | | | | Issue: On seeing the function glusterd_replace_slash_with_hyphen we see that the strchr inside the while loop takes str as a parameter, that'd mean repeated comparison from index 0 of str even though the characters have already been compared. Why not use ptr instead which points to the latest replacement in the string. Code change: replacing str with ptr inside the strchr function. Fixes: #1516 Change-Id: Id049ec2ad9800a01730f2a0263d9e0528557ae81 Signed-off-by: srijan-sivakumar <ssivakum@redhat.com>
* dht: Ongoing IO is failing on non-distribute volumes after just add-brickMohit Agrawal2020-09-233-8/+41
| | | | | | | | | | | | | Problem: On a non-distributed volumes linux kernel untar is failed after running add-brick operation Solution: 1) Save hashed subvol as a MDS in case while MDS has not been populated Fixes: #1328 Change-Id: I9967e136da008c6367973a7346637617dfa8f934 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* glusterd: resource leaksnik-redhat2020-09-251-2/+1
| | | | | | | | | | | | | | Issue: iobref was not freed before exiting the function. Fix: Modified the code to free iobref before exiting. CID: 1430107 Updates: #1060 Change-Id: I89351b3aa645792eb8dda6292d1e559057b02d8b Signed-off-by: nik-redhat <nladha@redhat.com>