summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* glusterd/snapshot: Buffer Size WarningSanju Rakonde2017-10-031-1/+1
| | | | | | | | | | | new_brickinfo->mnt_opts is allocated memory using calloc. So it is already zeroed out at allocation. we need not to add null character at the end. we pass one less than maximum size to the strncpy to make sure that destination string is terminated. Change-Id: I463dddd2171fb39a509bb75ffcc074d5b1cf7d62 BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* packaging: manual systemctl daemon reload required after installKaleb S. KEITHLEY2017-10-021-6/+6
| | | | | | | | | | | | | Use the %systemd_{post,preun,postun_with_restart} macros provided I tried both install and update from 3.10.x and did not receive any warnings about needing daemon reload Reported-by: Sam McLeod <rhbugs@auto.smcleod.net> Change-Id: Ibb33a748fc4226864019765b59d1a154b7297bae BUG: 1495384 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* cluster/afr: Make choose-local "reconfigurable"Krutika Dhananjay2017-09-302-0/+29
| | | | | | | | | | With this change, enabling choose-local (which means its state makes transition from "off" to "on") will be effective after the first gfid-lookup on "/" since volume-set was executed. Change-Id: Ibab292ba705d993b475cd0303fb3318211fb2500 BUG: 1480525 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* libglusterfs: Coverity Fix CONSTANT_EXPRESSION_RESULT in gf_string2int64Mohammed Azhar Padariyakam2017-09-291-7/+2
| | | | | | | | | | | | | Issue : "l <= 9223372036854775807L" is always true regardless of the values of its operands. This occurs as the logical operand of "if". Solution : Remove the comparison which always turns out to be true Fix : The if-condition was removed and the body inside the same was retained. Change-Id: Iba94d7f4f2dee85a180d10cdb7f7235b406cc400 BUG: 789278 Signed-off-by: Mohammed Azhar Padariyakam <mpadariy@redhat.com>
* glusterfsd: Coverity Issue "MISSING_BREAK" in parse_optsSubha sree Mohankumar2017-09-291-1/+1
| | | | | | | | | | | | Issue:Event unterminated_case: The case for value "ARGP_LOCALTIME_LOGGING_KEY" is not terminated by a 'break' statement. Solution: A break statement is added in the fallthrough case. Change-Id: Ie44d1a291afaa0e9fb9ef2aa45368b9401a8bb82 BUG: 789278 Signed-off-by: Subha sree Mohankumar <smohanku@redhat.com>
* cluster/ec: FORWARD_NULL coverity fixAkarsha Rai2017-09-291-1/+1
| | | | | | | | | | Problem: ctx pointer could be NULL Solution: Updated the code to verify ctx pointer BUG: 789278 Change-Id: I25e07a07c6ebe2f630c99ba3aa9a61656fbaa981 Signed-off-by: Akarsha Rai <akrai@redhat.com>
* libglusterfs: Coverity Issue NEGATIVE_RETURNSGirjesh Rajoria2017-09-291-9/+13
| | | | | | | | | | | | | Issue: Event negative_return_fn: Function "dup(handle->fd)" returns a negative number. Event negative_returns: "dup(handle->fd)" is passed to a parameter that cannot be negative. With this change value of dup(handle->fd) is stored in duped_fd & if condition checks the value of duped_fd is non-negative. Change-Id: I563d717108016d740ffa64fbe0929eb1e08c8f33 BUG: 789278 Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
* core: Verify pool pointer before destroying itAkarsha Rai2017-09-291-0/+3
| | | | | | | | | | Problem: Current code is not checking whether the pool pointer is null or not. Solution: Updated the code to verify pool pointer. Bug: 1496675 Change-Id: Ie1f2de4e4204fde15d2b1e3a966ea4c9e7b41534 Signed-off-by: Akarsha Rai <akrai@redhat.com>
* cli: fix Coverity warning DEADCODE in gf_cli_attach_tier()Mohammed Azhar Padariyakam2017-09-291-3/+0
| | | | | | | | | | | | | | | Issue : At condition "ret", the value of "ret" must be equal to 0. The condition "ret" cannot be true since the value is always 0. Hence, the execution cannot reach the statement "goto out" Solution : The never-true if-condition and its body has to be removed Fix : The always false if-condition and the dead code under this if-condition was removed. Change-Id: I5c038b8ec9abf9b2f06dcfd981904b9dca1a0094 BUG: 789278 Signed-off-by: Mohammed Azhar Padariyakam <mpadariy@redhat.com>
* protocol/client: Coverity Fix IDENTICAL_BRANCHES in client3_3_flush_cbkMohammed Azhar Padariyakam2017-09-291-2/+1
| | | | | | | | | | | | | | | Issue : The same code is executed when the condition "ret < 0" is true or false, because the code in the if-then branch and after the if statement is identical. Solution : Remove the if-condition whose output does not alter the program flow of control Fix : The identical branching condition was removed. Change-Id: Iae40f068e5a03946273e1091886ba7011460fcc8 BUG: 789278 Signed-off-by: Mohammed Azhar Padariyakam <mpadariy@redhat.com>
* cluster/ec: FORWARD_NULL coverity fixAkarsha Rai2017-09-291-0/+1
| | | | | | | | | | | | | Problem: cbk could be NULL. Solution: Returning NULL when memory is not allocated for cbk. BUG: 789278 Change-Id: Iea9128e0f3b95100deca560f690f9baaae226abf Signed-off-by: Akarsha Rai <akrai@redhat.com>
* xlators/protocol/server: Coverity Issue in server_setvolume()Girjesh Rajoria2017-09-291-8/+0
| | | | | | | | | | | | | Issue: Event result_independent_of_operands: "rsp->dict.dict_len > 4294967295U /* 2147483647 * 2U + 1U */" is always false regardless of the values of its operands. This occurs as the logical operand of "if". Fix: removed if block as the if condition is always false and statement inside block never executes. Change-Id: Ieaa968d6fbc9477428b4658ef725ace0db9b810a BUG: 789278 Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
* stack.h:PW.INCLUDE_RECURSIONSanju Rakonde2017-09-295-5/+0
| | | | | | | | | | | | | | | | | | | The headerfile globals.h is recursively adding itself. ( globals.h -> xlator.h -> stack.h -> globals.h). We are finding the source files which are including the header file globals.h and removing the inclusion line. I used git grep -l stack.h | xargs git grep globals.h -- to find out the files and removed the header file from all files except libglusterfs/src/xlator.h and libglusterfs/src/Makefile.am When I try to remove header file from libglusterfs/src/xlator.h I'm getting some errors. In libglusterfs/src/Makefile.am it is required for building RPMs. Change-Id: I537218c09ade6d7ea51717768b26563a247daf60 BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* Posix: fix additional inode refhari gowtham2017-09-291-4/+1
| | | | | | | | | | | Problem: In the iteration, the inode is being ref-ed twice and unref-ed once. this leads to ref leak. Fix: assign the parent to the inode instead of referencing it. Change-Id: Ib154b12d38ad68220f8f5288bbc50081beccc2b9 BUG: 1496379 Signed-off-by: hari gowtham <hgowtham@redhat.com>
* rpc/rpc-transport/socket/: Coverity Issue MISSING_BREAKGirjesh Rajoria2017-09-291-1/+1
| | | | | | | | | | | | | Issue: Event unterminated_case: The case for value "AF_INET_SDP" is not terminated by a 'break' statement. Function: socket_server_get_local_sockaddr Added Fall through in comment after case AF_INET_SDP. Change-Id: I5340cde2257be33ff13c53cee6ccdb33df7d2c88 BUG: 789278 Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
* dht: fix a coverity error of type - UNREACHABLEKamal Mohanan2017-09-281-3/+0
| | | | | | | | | | | | | | Problem: Unreachable assignment statement at dht-rebalance.c:1040 Fix: Delete line dht-rebalance.c:1040. The goto statements at lines 1037 and 1031 are also deleted since both branches of the if statement finally go to the same immediately-following label anyway. Change-Id: I5f47ea99244cae2a0a9f2aec7284faadf2ea286a BUG: 789278 Signed-off-by: Kamal Mohanan <kmohanan@redhat.com>
* cluster/ec: FORWARD_NULL coverity fixAkarsha Rai2017-09-281-1/+3
| | | | | | | | | | Problem: Pool pointer could be NULL while destroying it. Solution: Verifying pointer before destroying it. BUG: 789278 Change-Id: I497d1310aa47cb749a4c992aa961bd4dfa23ee48 Signed-off-by: Akarsha Rai <akrai@redhat.com>
* protocol: UNINIT coverity fixAkarsha Rai2017-09-271-1/+1
| | | | | | | | | | Problem: Coverity issue due uninitialized variable. Solution: Initialized the variable appropriately. Bug: 789278 Change-Id: I6e9356bbcd8fa97006b605ee162458d4a2eb5887 Signed-off-by: Akarsha Rai <akrai@redhat.com>
* libglusterfs: fix a coverity error of type - PW.INCLUDE_RECURSIONKamal Mohanan2017-09-271-1/+0
| | | | | | | | | | Problem: xlator.h which is included at inode.h:32 includes itself. Solution: Delete the include statement. Change-Id: I304bbef5293a2fef0584773a1f8e61e838d7cbf1 BUG: 789278 Signed-off-by: Kamal Mohanan <kmohanan@redhat.com>
* features/locks: Maintain separation of lock->client_pid, flock->l_pidPranith Kumar K2017-09-272-34/+15
| | | | | | | | | | | | | | | | | | Problem: grant_blocked_locks() constructs flock from lock. Locks xlator uses frame->root->pid interchangeably flock->l_pid. With gNFS frame->root->pid (which translates to lock->client_pid) is not same as flock->l_pid, this leads to lk's cbk returning flock with l_pid from lock->client_pid instead of input flock->l_pid. This triggers EC's error code path leading to failure of lk call, because the response' flock->l_pid is different from request's flock->l_pid. Fix: Maintain separation of lock->client_pid, flock->l_pid. Always unwind with flock with correct pid. BUG: 1472961 Change-Id: Ifab35c458662cf0082b902f37782f8c5321d823d Signed-off-by: Pranith Kumar K <pkarampu@redhat.com>
* afr: don't check for file size in afr_mark_source_sinks_if_file_emptyRavishankar N2017-09-271-6/+7
| | | | | | | | | ... for AFR_METADATA_TRANSACTION and just mark source and sinks if metadata is the same. Change-Id: I69e55d3c842c7636e3538d1b57bc4deca67bed05 BUG: 1491670 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* glusterd: FORWARD_NULL coverity fixAkarsha Rai2017-09-261-11/+22
| | | | | | | | | | | | Problem: Pointer used to print xlator name could be NULL. Solution: Updated the code to use xlator name as appropriate. BUG: 789278 Change-Id: I26927ef1f33f362e17c104684d7f722a643c7f97 Signed-off-by: Akarsha Rai <akrai@redhat.com>
* Coverity Issue Fix: IDENTICAL_BRANCHESGirjesh Rajoria2017-09-261-2/+0
| | | | | | | | | | | | Issue: Event identical_branches: The same code is executed when the condition "ret" is true or false, because the code in the if-then branch and after the if statement is identical. Function: glusterd_print_gsync_status_by_vol Fix: removed if and goto statement. Change-Id: I966d793c9f3b65487acfb07083a4039caf593105 BUG: 789278 Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
* Posix: Unused valueSanju Rakonde2017-09-261-1/+0
| | | | | | | | | | In line number 5179 we are storing -1 into op_ret variable. Before we use the value we are overwriting the same variable in line number 5339. So we are removing the value assigning statement. Change-Id: I8c6dae9f6b0f9f1e3c09d0744d451b9296d12db8 BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* Glusterfsd: Unreachable statementsSanju Rakonde2017-09-261-3/+3
| | | | | | | | | | | | | Issue: Event unreachable at line number 1111 in glusterfsd/src/glusterfsd.c There was a statement in outer if block after the break statement. Ideally the break statement should be inside the inner if block so that the statement will not become unreachable. I put the break inside the inner if block. Change-Id: Id4917305333e1638f35b3f2fb59ac42e62a12d02 BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* Coverity Issue Fix : CHECKED_RETURNSubha sree Mohankumar2017-09-261-1/+1
| | | | | | | | | | Issue :Event check_return: Calling "ec_dict_set_number" without checking return value. Fix : Type casted the return value of the function "ec_dict_set_number" to void. Change-Id: Id97034f9b1b8591536d63dca680ca7c7a9c4fcc3 BUG: 789278 Signed-off-by: Subha sree Mohankumar <smohanku@redhat.com>
* Fix a coverity error of checker type: CHECKED_RETURNKamal Mohanan2017-09-261-1/+1
| | | | | | | | | | | Problem: dht_frame_return was being called without checking the return value. Solution: Typecast the value returned by the function to void. Change-Id: Idfc6a7ed467d1c8f5f8d09ec26d9059f3d23b760 BUG: 789278 Signed-off-by: Kamal Mohanan <kmohanan@redhat.com>
* geo-rep/scheduler: Fix '--no-color' help msgKotresh HR2017-09-261-1/+1
| | | | | | Change-Id: I0f51558083e0b11a6563b8a2ef62ec07fe2a9ca9 BUG: 1495436 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* afr: auto-resolve split-brains for zero-byte filesRavishankar N2017-09-264-1/+79
| | | | | | | | | | | | | | | | | | | | | | | | Problems: As described in BZ 1491670, renaming hardlinks can result in data/mdata split-brain of the DHT link-to files (T files) without any mismatch of data and metadata. As described in BZ 1486063, for a zero-byte file with only dirty bits set, arbiter brick will likely be chosen as the source brick. Fix: For zero byte files in split-brain, pick first brick as a) data source if file size is zero on all bricks. b) metadata source if metadata is the same on all bricks In arbiter case, if file size is zero on all bricks and there are no pending afr xattrs, pick 1st brick as data source. Change-Id: I0270a9a2f97c3b21087e280bb890159b43975e04 BUG: 1491670 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reported-by: Rahul Hinduja <rhinduja@redhat.com> Reported-by: Mabi <mabi@protonmail.ch>
* glusterd: retrieve uuid under mutex lockAtin Mukherjee2017-09-251-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In a multi node cluster, if one of the glusterd instance goes down and comes back, then there might be a race situation where glusterd needs to retrieve its uuid (glusterd_retrieve_uuid) and at the same time as part of receiving a friend handshake from other peer, glusterd iterates over the volume information recieved from remote node and checks for if a brick is local or not by calling MY_UUID which in turn calls glusterd_retrieve_uuid. And the same applies for glusterd_store_global_info () function too. This could end up in a situation where for the same node glusterd ends up generating two UUID files in /var/lib/glusterd. Following is the log snippet which confirms the above: [2017-09-01 03:09:24.458030] I [glusterd.c:146:glusterd_uuid_init] 0-management: retrieved UUID: fd46a495-7e33-468f-88f6-63c815fac640 // thread 1 retrieve uuid from glusterd.info [2017-09-01 03:09:24.458034] E [glusterd-store.c:2109:glusterd_retrieve_uuid] 0-: No previous uuid is present //thread 2 can not retrieve uuid, because in thread1 the file pointer has already become eof. [2017-09-01 03:09:24.458041] E [glusterd-store.c:2117:glusterd_retrieve_uuid] 0-: Returning -1 [2017-09-01 03:09:24.458076] I [glusterd.c:176:glusterd_uuid_generate_save] 0-management: generated UUID: 190bb292-a296-4125-96da-42b247511cc4 [2017-09-01 03:09:24.458129] E [store.c:367:gf_store_save_value] 0-: Able to store key: UUID,value: 190bb292-a296-4125-96da-42b247511cc4 Fix is to retrieve the uuid under mutex lock. Credits : cynthia.zhou@nokia-sbell.com Change-Id: Ib9a5e159c3febf2aef13aa5e38f0a51fe409dadb BUG: 1493967 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* mount/fuse: Make event-history feature configurableKrutika Dhananjay2017-09-247-15/+73
| | | | | | | | | | | | | | | | | | | | | | ... and disable it by default. This is because having it disabled seems to improve performance. This could be due to the lock contention by the different epoll threads on the circular buff lock in the fop cbks just before writing their response to /dev/fuse. Just to provide some data - wrt ovirt-gluster hyperconverged environment, I saw an increase in IOPs by 12K with event-history disabled for randrom read workload. Usage: mount -t glusterfs -o event-history=on $HOSTNAME:$VOLNAME $MOUNTPOINT OR glusterfs --event-history=on --volfile-server=$HOSTNAME --volfile-id=$VOLNAME $MOUNTPOINT Change-Id: Ia533788d309c78688a315dc8cd04d30fad9e9485 BUG: 1467614 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com>
* cli: Bypass the confirmation question creating replica 2 volume with forcekarthik-us2017-09-211-13/+17
| | | | | | | | | | | When a replica 2 volume is created with the force option, remove the warning message with the confirmation question, whether they want to continue or not and Succeed the volume creation. Change-Id: I4f3306659fa4cbf53dd8d45269a32d19ce86ac88 BUG: 1493893 Signed-off-by: karthik-us <ksubrahm@redhat.com>
* libglusterfs: Fix openSUSE build errorAnoop C S2017-09-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GlusterFS failed during make on openSUSE Tumbleweed with the following error: Making all in fdl Making all in src CC logdump.o CC recon.o CC fdl.lo CC librecon.o CC libfdl.o CCLD gf_logdump CCLD gf_recon /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64/libfl.so: undefined reference to `yylex' collect2: error: ld returned 1 exit status make[5]: *** [Makefile:618: gf_logdump] Error 1 make[5]: *** Waiting for unfinished jobs.... /usr/lib64/gcc/x86_64-suse-linux/7/../../../../lib64/libfl.so: undefined reference to `yylex' collect2: error: ld returned 1 exit status Reading through autoconf manual[1](see AC_PROG_LEX) reveals that LEXLIB is automatically set to appropriate value for the system. The reference to LEXLIB in automake file caused the above mentioned error on openSUSE. In particular, we do not bother about LEXLIB hereafter. [1] https://www.gnu.org/software/autoconf/manual/autoconf.html#Particular-Programs Change-Id: I9bfce80c9654b2e3bfb393b08c25e8ad3d79e449 BUG: 1493133 Signed-off-by: Anoop C S <anoopcs@redhat.com>
* cluster/afr: Sending subvol up/down events when subvol comes up or goes downkarthik-us2017-09-201-0/+2
| | | | | | Change-Id: I6580351b245d5f868e9ddc6a4eb4dd6afa3bb6ec BUG: 1493539 Signed-off-by: karthik-us <ksubrahm@redhat.com>
* cluster/ec: fix for BAD_SHIFT, follow-up patchKaleb S. KEITHLEY2017-09-201-11/+14
| | | | | | | | | | | | | | | | | | Address comments to https://review.gluster.org/18067, (Change-Id I86e15d12939c610c99f5f96c551bb870df20f4b4) Which was posted as an RFC as an example of a possible alternative fix to https://review.gluster.org/17860 (Change-Id I28a3bdd4a357526dba0cf84c262919c05cfa173e) An alternative fix that preserved the unsignedness of the indexes throughout, obviating the need to check its value before using it to shift. (shift by negative number is undefined, as is shift by more bits than in the type.) BUG: 1474309 Change-Id: I46fe9cec140d3397463780748f6876251acb06dd Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
* fuse/readdirp: Remove need_lookup from fuse_readdirp_cbkSusant Palai2017-09-201-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | background: Various xlators used to populate their ctx, on an explicit lookup. That means without a lookup, the translator will have either null or stale data to function. E.g. dht would depend on lookup to create linkto files on the correct node/hashed subvol, afr would rely on this lookup to heal pending data/metadata etc. So to complete above actions a lookup used to be issued on files, even their inode was populated on a readdirp_cbk. This was done by setting the need_lookup flag on all the files those were read on readdirp fop. We tried a small test on "ACL client". For listing 50k files on root itself, it took around 50seconds with readdirp enabled while the same operation took 5-6 seconds with readdirp disabled. Both the times md-cache was enabled. We observed that on the 1st test case (readdirp enabled), post readdirp a getxattr is done. The number of getxattr depends on the number of acl xattrs (I saw requests on these two: system.posix_acl_default, system.posix_acl_access). Since need_lookup flag is set, during fuse_resolve a nameless lookup is executed on the inode(getxattr being inode operation, hence the nameless lookup). Since md-cache does not serve nameless lookup, a network hop is needed for each file, costing the time. With readdirp disabled, the getxattrs are served from md-cache itself(note: we are discussing the 2nd attempt of ls -l use case). _Current affairs around need of lookup for a file to populate it's ctx_: For the xlators on client stack we discussed quite extensively about the need for a lookup fop post readdirp in all three cluster translators - afr, EC and dht. EC and dht don't really need a nameless lookup post readdirp. For afr too, the need for lookup was negated with patch (http://review.gluster.org/6010 - AFRV2), where afr added a function called afr_inode_refresh() which does a lookup and populates its inode context in case a FOP came to AFR without a lookup being issued prior to it. We ran a thread on gluster-devel asking for feedback on the need of explicit lookup post readdirp. For responses refer [1]. Refer [2] for discussions happened on gerrit. After gathering inputs from [1] and [2], it looks like there is no xlator in current state that requires an explicit lookup post readdirp to function properly. * A separate similar patch will be sent for gfapi/nfs/nfs-ganesha. Note: Only file's inode is built with readdirp. [1] http://lists.gluster.org/pipermail/gluster-devel/2017-August/053505.html [2] https://review.gluster.org/#/c/17985/ Change-Id: Ie1d68ce7bea5e1f8a1fab9a62217f478322554f5 BUG: 1492996 Signed-off-by: Susant Palai <spalai@redhat.com>
* eventsapi: Fix issue with CLIENT_CONNECT eventAravinda VK2017-09-191-1/+1
| | | | | | | | | | | | | | | | | | | | | A mismatch in event format causing below error in events.log when it detects CLIENT_CONNECT event. [2017-09-19 09:35:06,785] WARNING [glustereventsd - 46:handle] - Unable to parse Event 1505793906 97 client_uid=f241-16363-2017/09/19-04:05:06:747558-gv1-client- 0-0-0;client_identifier=192.168.122.208:49150;server_identifier= 192.168.122.208:49152;brick_path=/bricks/b1,subdir_mount=(null) BUG: 1492968 Change-Id: Ie6d507725a7e6b54fca44651f9c5e66eca2be244 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: https://review.gluster.org/18322 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Amar Tumballi <amarts@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com>
* Tests: disabling the check for volume client-listhari gowtham2017-09-191-1/+2
| | | | | | | | | | | | | | | The client-list command is broken for brick-multiplexed. Disabling it until the fix is in so that the regression test can be resumed for the other test cases. Change-Id: Idcb5a09db0eb46fbe71c215109b5c55924cc1209 BUG: 1492542 Signed-off-by: hari gowtham <hgowtham@redhat.com> Reviewed-on: https://review.gluster.org/18308 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Atin Mukherjee <amukherj@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* glusterd: disallow replace brick for dist only volumesAtin Mukherjee2017-09-196-63/+28
| | | | | | | | | | | | | | | | | | Allowing replace-brick on dist only volumes will lead to data loss. This patch blocks replace brick commit force to fail if a volume is dist only. Also removing tests/basic/pump.t as its of no use as per the discussion in http://lists.gluster.org/pipermail/gluster-devel/2017-September/053652.html Change-Id: Iabb0c16f865f3fc361b64a19bfcf0c0fbb5c2682 BUG: 1489432 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: https://review.gluster.org/18226 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: N Balachandran <nbalacha@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* events : Add brick list in EVENT_VOLUME_CREATEAtin Mukherjee2017-09-183-5/+8
| | | | | | | | | | | Change-Id: Ibf87ae5ca57f9d27c036f329a30c8f81b51c52bf BUG: 1492109 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: https://review.gluster.org/18306 Reviewed-by: Prashanth Pai <ppai@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* features/worm: Adding check to newloc when doing renameluneo72017-09-182-2/+25
| | | | | | | | | | | | | | | | | | Problem: Since rename didn't check if newloc exists and it's retention state it was possible to rename a new file that wasn't in retention over a existing file that was in read-only state. Change-Id: I63c6bbabb7bb456ebedf201cc77b878ffda62229 BUG: 1484490 Signed-off-by: luneo7 <luneo7@gmail.com> Reviewed-on: https://review.gluster.org/18104 Tested-by: jiffin tony Thottan <jthottan@redhat.com> Tested-by: Prashanth Pai <ppai@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Karthik U S <ksubrahm@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* heal: New feature heal info summary to list the status of brick and count of ↵Mohamed Ashiq Liyazudeen2017-09-156-33/+206
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | entries to be healed Command output: Brick 192.168.2.8:/brick/1 Status: Connected Total Number of entries: 363 Number of entries in heal pending: 362 Number of entries in split-brain: 0 Number of entries possibly healing: 1 <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <healInfo> <bricks> <brick hostUuid="9105dd4b-eca8-4fdb-85b2-b81cdf77eda3"> <name>192.168.2.8:/brick/1</name> <status>Connected</status> <totalNumberOfEntries>363</numberOfEntries> <numberOfEntriesInHealPending>362</numberOfEntriesInHealPending> <numberOfEntriesInSplitBrain>0</numberOfEntriesInSplitBrain> <numberOfEntriesPossiblyHealing>1</numberOfEntriesPossiblyHealing> </brick> </bricks> </healInfo> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr/> </cliOutput> Change-Id: I40cb6f77a14131c9e41b292f4901b41a228863d7 BUG: 1261463 Signed-off-by: Mohamed Ashiq Liyazudeen <mliyazud@redhat.com> Reviewed-on: https://review.gluster.org/12154 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Karthik U S <ksubrahm@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* rpc-transport/socket: tab -> spaces cleanupKaleb S. KEITHLEY2017-09-152-466/+466
| | | | | | | | | | | tired of review comments about use of tabs when the whole file uses tabs Change-Id: I4f822a53f47886da04282f9c3fb84d81a7b3f8d0 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/18286 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* Fix use-after-free in gf_rdma_do_readsMichael Scherer2017-09-151-0/+1
| | | | | | | | | | | | | | | | If iobref_new can't allocate a ref, we free the iobuf, and then go to the cleanup part of the function, that will run iobuf_unref a 2nd time, which trigger a warning with coverity. Change-Id: Ie9cf7a5d5f98244a390e44e1403c614199eb650c BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/18245 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* Heal root xattr correctly upon an add-brick operationSanoj Unnikrishnan2017-09-142-5/+13
| | | | | | | | | | | | | | | | | | | | | When an add-brick is performed the root path xattr is healed using a hook script. For a volume in stopped state, the hook script is triggered in post op of add-brick. Otherwise, if the volume is in started state the hook script is started on a subsequent volume start. The script unlinks itself after execution. The issue is that current hook script does not work when you have multiple volumes in stopped state. A hook script meant for volume1 can get trigerred during start of volume2. Fix: create separate hook script links for individual volumes. Bug: 1472609 Change-Id: If5f056509505fdbbbf73d3363e9966047ae6a3d3 Signed-off-by: Sanoj Unnikrishnan <sunnikri@redhat.com> Reviewed-on: https://review.gluster.org/17824 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* features/shard: Change default shard-block-size to 64MBKrutika Dhananjay2017-09-147-1/+8
| | | | | | | | | | | Change-Id: I55fa87e07136cff10b0d725ee24dd3151016e64e BUG: 1489823 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: https://review.gluster.org/18243 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Sunil Kumar Acharya <sheggodu@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* glusterd: fix invalid memory reference returnedXavier Hernandez2017-09-131-2/+9
| | | | | | | | | | | Change-Id: I0823c7b33060b48040c1d86ad346a5f6e15bc190 BUG: 1490897 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: https://review.gluster.org/18263 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us> Reviewed-by: Gaurav Yadav <gyadav@redhat.com>
* rpc: TLSv1_2_method() is deprecated in OpenSSL-1.1Kaleb S. KEITHLEY2017-09-132-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fedora 26 has OpenSSL-1.1. Compile-time warnings indicate that TLSv1_2_method() is now deprecated. As per the SSL man page: TLS_method(), TLS_server_method(), TLS_client_method() These are the general-purpose version-flexible SSL/TLS methods. The actual protocol version used will be negotiated to the highest version mutually supported by the client and the server. The supported protocols are SSLv3, TLSv1, TLSv1.1 and TLSv1.2. Applications should use these methods, and avoid the version- specific methods described below. ... TLSv1_2_method(), ... ... Note that OpenSSL-1.1 is the version of OpenSSL; Fedora 25 and RHEL 7.3 and other distributions (still) have OpenSSL-1.0. TLS versions are orthogonal to the OpenSSL version. TLS_method() is the new — in OpenSSL-1.1 — version flexible function intended to replace the TLSv1_2_method() function in OpenSSL-1.0 and the older (?), insecure TLSv23_method(). (OpenSSL-1.0 does not have TLS_method()) Change-Id: I190363ccffe7c25606ea2cf30a6b9ff1ec186057 BUG: 1491025 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/18268 Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* protocol/server: Remove duplicate dict_get_strAnoop C S2017-09-131-8/+0
| | | | | | | | | | | | | dict_get_str() for auth-path has been already done once within switch case for RPCSVC_EVENT_DISCONNECT inside server_rpc_notify(). Therefore this change removes the needless dict_get_str. Change-Id: Ifeb3db828328df08a1f1612a8ad8e0babace1d16 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-on: https://review.gluster.org/18272 Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jeff@pl.atyp.us>
* socket: Use granular mutex locks during pollin and pollout event processingKrutika Dhananjay2017-09-082-35/+58
| | | | | | | | | | | | | | | | | | | ... instead of one global lock. This is because pollin and pollout processing code operate on mutually exclusive members of socket_private_t. Keeping this in mind, this patch introduces the more granular priv->in_lock and priv->out_lock locks. For pollerr, which modifies both priv->incoming and priv->ioq, both locks need to be taken. Change-Id: Id7aeb608dc7755551b6b404470d5d80709c81960 BUG: 1467614 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: https://review.gluster.org/17687 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>