summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* rpc: implement reconnect back-off strategyXavier Hernandez2019-05-112-16/+18
| | | | | | | | | | | | | | | When a connection failure happens, gluster tries to reconnect every 3 seconds. In some cases the failure is spurious, so a delay of 3 seconds could be unnecessarily long. This patch implements a back-off strategy that tries a reconnect as soon as 1 tenth of a second. If this fails, the time is doubled until it's around 3 seconds. After that, the reconnect is attempted every 3 seconds as before. Change-Id: Icb3fbe20d618f50cbbb599dce542b4e871c22149 Updates: bz#1193929 Signed-off-by: Xavier Hernandez <xhernandez@redhat.com>
* libglusterfs: Remove decompunder helper routines from symbol exportAnoop C S2019-05-111-4/+0
| | | | | | | | | | | | | decompounder and related sources were removed via the following commits: https://review.gluster.org/#/c/glusterfs/+/22627/ https://review.gluster.org/#/c/glusterfs/+/22629/ Therefore taking out symbol exports for those removed routines. Change-Id: I2ef99a318de1e4b512cabd2fa923225c5b79b1e5 updates: bz#1193929 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* core: Capture process memory usage at the time of call gf_msg_nomemMohit Agrawal2019-05-111-9/+13
| | | | | | | | | | | | | Problem: All gluster processes call gf_mgm_nomem while calloc/malloc/realloc throw an error but the message does not capture current memory usage of gluster process Solution: Call getrusage to capture current memory usage of gluster process Change-Id: I2e0319da1f33b177fa042fdc9e7268068576c9c3 fixes: bz#1708051 Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* cli: Validate invalid slave urlKotresh HR2019-05-114-5/+31
| | | | | | | | | This patch validates the invalid slave url in cli itself and throws appropriate error. fixes: bz#1098991 Change-Id: I278e2a04a4d619d2c2d1db0dd56ab5bdf7e7f469 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* glusterd: Add gluster volume stop operation to glusterd_validate_quorum()Vishal Pandey2019-05-112-2/+4
| | | | | | | | | | | | | | ISSUE: gluster volume stop succeeds even if quorum is not met. Fix: Add GD_OP_STOP_VOLUME to gluster_validate_quorum in glusterd_mgmt_v3_pre_validate (). Since the volume stop command has been ported from synctask to mgmt_v3, the quorum check was missed out. Change-Id: I7a634ad89ec2e286ea262d7952061efad5360042 fixes: bz#1690753 Signed-off-by: Vishal Pandey <vpandey@redhat.com>
* tests: fix bug-1319374.c compile warnings.Ravishankar N2019-05-101-0/+1
| | | | | | | | | | | | | | | | | I was looking at a downstream failure of bug-1319374-THIS-crash.t when I saw the compiler was throwing a warning while running the test: tests/bugs/gfapi/bug-1319374.c:17:61: warning: implicit declaration of function ‘strerror’; did you mean ‘perror’? [-Wimplicit-function-declaration] fprintf(stderr, "\nglfs_new: returned NULL (%s)\n", strerror(errno)); ^~~~~~~~ perror So I compiled the .c with -Wall and saw a lot many more warnings, all due of a missing header. This patch fixes it. fixes: bz#1708163 Change-Id: I8b6dd8e1404178a3d99b2d92d01f4575f5203e58 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* shd/glusterd: Serialize shd manager to prevent race conditionMohammed Rafi KC2019-05-104-0/+72
| | | | | | | | | | | At the time of a glusterd restart, while doing a handshake there is a possibility that multiple shd manager might get executed. Because of this, there is a chance that multiple shd get spawned during a glusterd restart Change-Id: Ie20798441e07d7d7a93b7d38dfb924cea178a920 fixes: bz#1707081 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
* afr: thin-arbiter lock release fixesRavishankar N2019-05-103-47/+93
| | | | | | | | | | | | | | | | | | | | - pass fop state instead of afr local to afr_ta_dom_lock_check_and_release() - avoid afr_lock_release_synctask() being called simultaneosuly from notify code path and transaction (post-op) code path due to races. - Check if the post-op on TA is valid based on event_gen checks. - Invalidate in-memory information when we get TA child down. Note: Thi patch addresses some pending review comments of commit 053b1309dc8fbc05fcde5223e734da9f694cf5cc (https://review.gluster.org/#/c/glusterfs/+/20095/) fixes: bz#1698449 Change-Id: I2ccd7e1b53362f9f3fed8680aecb23b5011eb18c Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* glusterd: fix inconsistent global option output in volume getAtin Mukherjee2019-05-091-2/+2
| | | | | | | | | | volume get all all | grep <key> & volume get <volname> all | grep <key> dumps two different output value for cluster.brick-multiplex and cluster.server-quorum-ratio Fixes: bz#1707700 Change-Id: Id131734e0502aa514b84768cf67fce3c22364eae Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: reduce some work in glusterd-utils.cYaniv Kaul2019-05-091-125/+128
| | | | | | | | | | | | Similar to https://review.gluster.org/#/c/glusterfs/+/22652/ , reduce some of the work by using smaller buffers and less conversion of parameters when snprintf()'ing them. On the way, remove some clang warnings, mainly on dead assignment. Change-Id: Ie51e6d6f14df6b2ccbebba314cf937af08839741 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* tests: improve and fix some test scriptsXavier Hernandez2019-05-0919-82/+179
| | | | | | Change-Id: Iceefe22af754096c599dc570d4894d14fce4deae Updates: bz#1193929 Signed-off-by: Xavier Hernandez <xhernandez@redhat.com>
* geo-rep: Fix sync-method configKotresh HR2019-05-094-9/+11
| | | | | | | | | | | | | | | | | | Problem: When 'use_tarssh' is set to true, it exits with successful message but the default 'rsync' was used as sync-engine. The new config 'sync-method' is not allowed to set from cli. Analysis and Fix: The 'use_tarssh' config is deprecated with new config framework and 'sync-method' is the new config to choose sync-method i.e. tarssh or rsync. This patch fixes the 'sync-method' config. The allowed values are tarssh and rsync. Change-Id: I0edb0319cad0455b29e49f2f08a64ce324735e84 fixes: bz#1707686 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* tests/geo-rep: Fix arequal checksum comparisonKotresh HR2019-05-095-9/+10
| | | | | | | | | The arequal checkusm comparison was always returning as successful, eventhough, if it was not. Fixed the same. Change-Id: I5083da25c0954126e452d06311d2d376f8540555 fixes: bz#1707742 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* glusterd: improve logging in __server_getspec()Sanju Rakonde2019-05-082-2/+15
| | | | | | | updates: bz#1193929 Change-Id: Idad745d5869c92e6bed71842f14bc1a3362ca4bd Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* afr: log before attempting data self-heal.Ravishankar N2019-05-081-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I was working on a blog about troubleshooting AFR issues and I wanted to copy the messages logged by self-heal for my blog. I then realized that AFR-v2 is not logging *before* attempting data heal while it logs it for metadata and entry heals. I [MSGID: 108026] [afr-self-heal-entry.c:883:afr_selfheal_entry_do] 0-testvol-replicate-0: performing entry selfheal on d120c0cf-6e87-454b-965b-0d83a4c752bb I [MSGID: 108026] [afr-self-heal-common.c:1741:afr_log_selfheal] 0-testvol-replicate-0: Completed entry selfheal on d120c0cf-6e87-454b-965b-0d83a4c752bb. sources=[0] 2 sinks=1 I [MSGID: 108026] [afr-self-heal-common.c:1741:afr_log_selfheal] 0-testvol-replicate-0: Completed data selfheal on a9b5f183-21eb-4fb3-a342-287d3a7dddc5. sources=[0] 2 sinks=1 I [MSGID: 108026] [afr-self-heal-metadata.c:52:__afr_selfheal_metadata_do] 0-testvol-replicate-0: performing metadata selfheal on a9b5f183-21eb-4fb3-a342-287d3a7dddc5 I [MSGID: 108026] [afr-self-heal-common.c:1741:afr_log_selfheal] 0-testvol-replicate-0: Completed metadata selfheal on a9b5f183-21eb-4fb3-a342-287d3a7dddc5. sources=[0] 2 sinks=1 Adding it in this patch. Now there is a 'performing' and a corresponding 'Completed' message for every type of heal. fixes: bz#1707746 Change-Id: I0b954cf1e17b48280aefa76640b5119b92133d61 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* tests: enhance the auth.allow test to validate all failures of 'login' moduleAmar Tumballi2019-05-081-4/+49
| | | | | | | | now the enhanced test covers most of the code in auth.login and auth.addr module. updates: bz#1693692 Change-Id: I1f43c7dc414e2e4d443a93e9a37051359fd46ea4 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* geo-rep: fix incorrectly formatted authorized_keysSunny Kumar2019-05-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | There are two ways for creating secret pem pub file during geo-rep setup. 1. gluster-georep-sshkey generate 2. gluster system:: execute gsec_create Below patch solves this problem for `gluster-georep-sshkey generate` method. Patch link: https://review.gluster.org/#/c/glusterfs/+/22246/ This patch is added to support old way of creating secret pem pub file `gluster system:: execute gsec_create`. Problem: While Geo-rep setup when creating an ssh authorized_keys the geo-rep setup inserts an extra space before the "ssh-rsa" label. This gets flagged by an enterprise customer's security scan as a security violation. Solution: Remove extra space while creating secret key. fixes: bz#1679401 Change-Id: I92ba7e25aaa5123dae9ebe2f3c68d14315aa5f0e Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* glusterd/store: store all key-values in one shotYaniv Kaul2019-05-085-323/+343
| | | | | | | | | | | | Instead of saving each key-value separately, which is slow ( especially as we fflush() after each!), store them all as one string and write all together. Implements https://github.com/gluster/glusterfs/issues/629 Change-Id: Ie77a272446b0b6785584b710a4fdd9c613dd9578 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat,.com>
* dht: Custom xattrs are not healed in case of add-brickroot2019-05-082-8/+68
| | | | | | | | | | | | | | | | Problem: If any custom xattrs are set on the directory before add a brick, xattrs are not healed on the directory after adding a brick. Solution: xattr are not healed because dht_selfheal_dir_mkdir_lookup_cbk checks the value of MDS and if MDS value is not negative selfheal code path does not take reference of MDS xattrs.Change the condition to take reference of MDS xattr so that custom xattrs are populated on newly added brick Updates: bz#1702299 Change-Id: Id14beedb98cce6928055f294e1594b22132e811c Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* afr : fix Coverity CID 1398627Rinku Kothiya2019-05-071-2/+9
| | | | | | | | | | | Fixed coverity error, "Unchecked return value (CHECKED_RETURN)". Checking return value & logging error message if afr_set_pending_dict fails. updates: bz#789278 Change-Id: Iab7da6b4f3cd0622b95b8e1c412b007a330467e5 Signed-off-by: Rinku Kothiya <rkothiya@redhat.com>
* libglusterfs: Fix compilation when --disable-mempool is usedPranith Kumar K2019-05-071-0/+5
| | | | | | updates bz#1193929 Change-Id: I245c065b209bcce5db939b6a0a934ba6fd393b47 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* performance/write-behind: remove request from wip list in wb_writev_cbkRaghavendra G2019-05-061-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a race in the way O_DIRECT writes are handled. Assume two overlapping write requests w1 and w2. * w1 is issued and is in wb_inode->wip queue as the response is still pending from bricks. Also wb_request_unref in wb_do_winds is not yet invoked. list_for_each_entry_safe (req, tmp, tasks, winds) { list_del_init (&req->winds); if (req->op_ret == -1) { call_unwind_error_keep_stub (req->stub, req->op_ret, req->op_errno); } else { call_resume_keep_stub (req->stub); } wb_request_unref (req); } * w2 is issued and wb_process_queue is invoked. w2 is not picked up for winding as w1 is still in wb_inode->wip. w1 is added to todo list and wb_writev for w2 returns. * response to w1 is received and invokes wb_request_unref. Assume wb_request_unref in wb_do_winds (see point 1) is not invoked yet. Since there is one more refcount, wb_request_unref in wb_writev_cbk of w1 doesn't remove w1 from wip. * wb_process_queue is invoked as part of wb_writev_cbk of w1. But, it fails to wind w2 as w1 is still in wip. * wb_requet_unref is invoked on w1 as part of wb_do_winds. w1 is removed from all queues including w1. * After this point there is no invocation of wb_process_queue unless new request is issued from application causing w2 to be hung till the next request. This bug is similar to bz 1626780 and bz 1379655. Change-Id: Iaa47437613591699d4c8ad18bc0b32de6affcc31 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Fixes: bz#1705865
* mem-pool.{c|h}: minor changesYaniv Kaul2019-05-061-25/+12
| | | | | | | | | | | 1. Removed some code that was not needed. It did not really do anything. 2. CALLOC -> MALLOC in one place. Compile-tested only! updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com> Change-Id: I4419161e1bb636158e32b5d33044b06f1eef2449
* tests: delete the snapshots and the volume after the testsRaghavendra Bhat2019-05-061-0/+22
| | | | | | | | | | | | In uss.t multiple snapshots are taken and after all the tests things are left for the cleanup () function to get removed. Instead of that, delete the snapshots and the volume once all the tests are over so that cleanup operation becomes relatively a light operation. Change-Id: I2342740bbb185cd6c9a450eb3b4f5cbbba78974c fixes: bz#1704888 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com>
* tests: validate volfile grammar - strings in volfileAmar Tumballi2019-05-065-85/+90
| | | | | | | | * libglusterfs/graph-print: remove unused code updates: bz#1693692 Change-Id: Iae81bb6a3af5911c3da07ab8f1d8f58f27e06905 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* glusterd: coverity fixAtin Mukherjee2019-05-061-2/+14
| | | | | | | | CID: 1382403 (CHECKED_RETURN) Updates: bz#789278 Change-Id: I4c57b93fd3d14c524ff8519ed876f029834de306 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* cluster/ec: fix shd healer wait timeoutKinglong Mee2019-05-062-1/+2
| | | | | | | | | Right now, the timeout is written by hard code, fix it by using heal-timeout. fixes: bz#1703020 Change-Id: I0d154e7807f9dba7efc3896805559bbfaa7af2ad Signed-off-by: Kinglong Mee <kinglongmee@gmail.com>
* features/shard: Fix integer overflow in block count accountingKrutika Dhananjay2019-05-061-1/+1
| | | | | | | | ... by holding delta_blocks in 64-bit int as opposed to 32-bit int. Change-Id: I2c1ddab17457f45e27428575ad16fa678fd6c0eb updates: bz#1705884 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* glusterd: prevent use-after-free in glusterd_op_ac_send_brick_op()Niels de Vos2019-05-061-2/+1
| | | | | | | | | Coverity reported that GF_FREE(req_ctx) could be called 2x on req_ctx. Change-Id: I9120686e5920de8c27688e10de0db6aa26292064 CID: 1401115 Updates: bz#789278 Signed-off-by: Niels de Vos <ndevos@redhat.com>
* cluster/ec: Reopen shouldn't happen with O_TRUNCPranith Kumar K2019-05-051-1/+1
| | | | | | | | | | | | | Problem: Doing re-open with O_TRUNC will truncate the fragment even when it is not needed needing extra heals Fix: At the time of re-open don't use O_TRUNC. fixes bz#1706603 Change-Id: Idc6408968efaad897b95a5a52481c66e843d3fb8 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* glusterd-utils.c: reduce work in glusterd_add_volume_to_dict()Yaniv Kaul2019-05-031-58/+59
| | | | | | | | | | | 1. Use small arrays, 32 or 64 bytes should suffice. 2. Do not repeat the pattern of snprintf '%s.%d', prefix, count over and over. Change-Id: Ief6de78b766d9a07acb6256fc4830f4f3cfba7c9 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* glusterd: Fix coverity defects & put coverity annotationsAtin Mukherjee2019-05-0214-33/+65
| | | | | | | | | | | Along with fixing few defect, put the required annotations for the defects which are marked ignore/false positive/intentional as per the coverity defect sheet. This should avoid the per component graph showing many defects as open in the coverity glusterfs web page. Updates: bz#789278 Change-Id: I19461dc3603a3bd8f88866a1ab3db43d783af8e4 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* tests/cli: add .t file to increase line coverage in cliSanju Rakonde2019-05-021-0/+21
| | | | | | | updates: bz#1693692 Change-Id: Ib188c5fddea8c762e89ff15aa83b08c35cdb21e1 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* tests: add .t files to increase cli code coveragerishubhjain2019-05-022-2/+3
| | | | | | | | different volume profile sub options are added in the test. Change-Id: I93100c37f51afc10870e60b91fcd86e7859e734a updates: bz#1693692 Signed-off-by: rishubhjain <rishubhjain47@gmail.com>
* tests: Add changelog snapshot testcaseKotresh HR2019-05-021-0/+60
| | | | | | | | | | Add testcase to test snapshot creation while I/O is happening with changelog enabled. updates: bz#1193929 Change-Id: Ice4cb596286c583ed7308484d65902007a48396c Signed-off-by: Kotresh HR <khiremat@redhat.com>
* glusterd: Fix bulkvoldict thread logic in brick multiplexingMohit Agrawal2019-04-301-6/+18
| | | | | | | | | | | | | | | Problem: Currently glusterd spawn bulkvoldict in brick_mux environment while no. of volumes are less than configured glusterd.vol_count_per_thread Solution: Correct the logic to spawn bulkvoldict thread 1) Calculate endindex only while total thread is non zero 2) Update end index correctly to pass index for bulkvoldict thread Fixes: bz#1704252 Change-Id: I1def847fbdd6a605e7687bfc4e42b706bf0eb70b Signed-off-by: Mohit Agrawal <moagrawal@redhat.com>
* cloudsync/plugin: coverity fixesSusant Palai2019-04-301-6/+6
| | | | | | | | | CID 1401087: Null pointer dereferences (REVERSE_INULL) CID 1401088: Null pointer dereferences (FORWARD_NULL) Change-Id: I71bf67af80e1b22bcd2eb997b01a1a5ef0b4d80b Updates: bz#789278 Signed-off-by: Susant Palai <spalai@redhat.com>
* options.c,h: minor changes to GF_OPTION_RECONFYaniv Kaul2019-04-302-49/+26
| | | | | | | | | | | Minor code changes (less variables and if statements) and use dict_get_strn(), since all options are fixed strings. Similar changes could be done to GF_OPTION_INIT() as well. Change-Id: I4a523f67183f4c4852a3d4de5e3cac52df68d3cf updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
* libglusterfs: remove compound-fop helper functionsAmar Tumballi2019-04-293-177/+3
| | | | | | updates: bz#1693692 Change-Id: If69702990af273be1f38855ba56b3b89fabff167 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* storage/posix: fix fresh file detection delayXavier Hernandez2019-04-291-4/+20
| | | | | | | | | | | Current implementation made it possible to consider that a file was not fresh even if it was created less than a second ago. This patch fixes the way in which the delay is computed to ensure that at least one second has elapsed. Change-Id: I05f7b99e7e8dd97e31f7ebaaec6c39eecf98b00f Updates: bz#1193929 Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
* nl-cache:add test to increase code coverageSheetal Pamecha2019-04-291-0/+30
| | | | | | Change-Id: Ie0a5c522dfa0123ca45f9decf5015d39b92cb0f3 updates: bz#1693692 Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
* protocol: remove compound fopAmar Tumballi2019-04-2911-7723/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | Compound fops are kept on wire as a backward compatibility with older AFR modules. The AFR module used beyond 4.x releases are not using compound fops. Hence removing the compound fop in the protocol code. Note that, compound-fops was already an 'option' in AFR, and completely removed since 4.1.x releases. So, point to note is, with this change, we have 2 ways to upgrade when clients of 3.x series are present. i) set 'use-compound-fops' option to 'false' on any volume which is of replica type. And then upgrade the servers. ii) Do a two step upgrade. First from current version (which will already be EOL if it's using compound) to a 4.1..6.x version, and then an upgrade to 7.x. Consider the overall code which we are removing for the option seems quite high, I believe it is worth it. updates: bz#1693692 Signed-off-by: Amar Tumballi <amarts@redhat.com> Change-Id: I0a8876d0367a15e1410ec845f251d5d3097ee593
* performance/decompounder: remove the translator as the feature is not used ↵Amar Tumballi2019-04-2912-1030/+4
| | | | | | | | anymore updates: bz#1693692 Change-Id: Id5932b11e115ca6da1c2bfff7ae1460787109e06 Signed-off-by: Amar Tumballi <amarts@redhat.com>
* glusterd: define dumpops in the xlator_api of glusterdSanju Rakonde2019-04-272-0/+14
| | | | | | | | | | | | | | Problem: statedump is not capturing information related to glusterd Solution: statdump is not capturing glusterd info because trav->dumpops is null in gf_proc_dump_single_xlator_info () where trav is glusterd xlator object. trav->dumpops is null because we missed to define dumpops in xlator_api of glusterd. defining dumpops in xlator_api of glusterd fixes the issue. fixes: bz#1703629 Change-Id: If85429ecb1ef580aced8d5b88d09fc15258bfc4c Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* cloudsync: Fix bug in cloudsync-fops-c.pyAnuradha Talur2019-04-261-3/+21
| | | | | | | | | | | | | | | | In some of the fops generated by generator.py, xdata request was not being wound to the child xlator correctly. This was happening because when though the logic in cloudsync-fops-c.py was correct, generator.py was generating a resultant code that omits this logic. Made changes in cloudsync-fops-c.py so that correct code is produced. Change-Id: I6f25bdb36ede06fd03be32c04087a75639d79150 updates: bz#1642168 Signed-off-by: Anuradha Talur <atalur@commvault.com>
* cloudsync/cvlt: Cloudsync plugin for commvault storeAnuradha Talur2019-04-2614-3/+1228
| | | | | | Change-Id: Icbe53e78e9c4f6699c7a26a806ef4b14b39f5019 updates: bz#1642168 Signed-off-by: Anuradha Talur <atalur@commvault.com>
* glusterd: coverity fixesAtin Mukherjee2019-04-265-8/+9
| | | | | | | | | | | | | | | | 1400775 - USE_AFTER_FREE 1400742 - Missing Unlock 1400736 - CHECKED_RETURN 1398470 - Missing Unlock Missing unlock is the tricky one, we have had annotation added, but coverity still continued to complaint. Added pthread_mutex_unlock to clean up the lock before destroying it to see if it makes coverity happy. Updates: bz#789278 Change-Id: I1d892612a17f805144d96c1b15004a85a1639414 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: enable fips-mode-rchecksum for new volumesRavishankar N2019-04-261-0/+13
| | | | | | | | | | | | | ...during volume create if the cluster op-version is >=GD_OP_VERSION_7_0. This option itself was introduced in GD_OP_VERSION_4_0_0 via commit 6daa65356. We missed enabling it by default for new volume creates in that commit. If we are to do it now safely, we need to use op version GD_OP_VERSION_7_0 and target it for release-7. fixes: bz#1702303 Change-Id: I7c6d4a8abe0816367e7069cb5cad01744f04858f Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* tools/glusterfind : validate session nameSaravanakumar Arumugam2019-04-261-8/+42
| | | | | | | | | | | | | Validate a session name(during create) for the following: 1. minimum 2 character length. 2. Maximum 256 characters. 3. No special characters apart from underscore, hyphen allowed. Also, validate volume(expect, while using glusterfind list). Change-Id: I1b1e64e218f93d0a531d3cf69fc2ce7e2ed11d01 BUG: 1241494 Signed-off-by: Saravanakumar Arumugam <sarumuga@redhat.com>
* geo-rep: Fix rename with existing destination with same gfidSunny Kumar2019-04-267-5/+102
| | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Geo-rep fails to sync the rename properly if destination exists. It results in source to be remained on slave causing more number of files on slave. Also heavy rename workload like logrotate caused lot of ESTALE errors Cause: Geo-rep fails to sync rename if destination exists if creation of source file also falls into single batch of changelogs being processed. This is because, after fixing problematic gfids verifying from master, while re-processing original entries, CREATE also was re-processed causing more files on slave and rename to be failed. Solution: Entries need to be removed from retrial list after fixing problematic gfids on slave so that it's not re-created again on slave. Also treat ESTALE as EEXIST so that the error is properly handled verifying the op on master volume. Change-Id: I50cf289e06b997adddff0552bf2466d9201dd1f9 fixes: bz#1694820 Signed-off-by: Kotresh HR <khiremat@redhat.com> Signed-off-by: Sunny Kumar <sunkumar@redhat.com>