summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd
Commit message (Collapse)AuthorAgeFilesLines
* glusterd: Nullify pmap entry for bricks belonging to same portAtin Mukherjee2018-01-031-1/+1
| | | | | | | | | | | Commit 30e0b86 tried to address all the stale port issues glusterd had in case of a brick is abruptly killed. For brick multiplexing case because of a bug the portmap entry was not getting removed. This patch addresses the same. Change-Id: Ib020b967a9b92f1abae9cab9492f0cacec59aaa1 BUG: 1530281 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* mgmt/glusterd: Adding validation for setting quorum-countkarthik-us2017-12-291-5/+40
| | | | | | | | | | | In a replicated volume it was allowing to set the quorum-count value between the range [1 - 2147483647]. This patch adds validation for allowing only maximum of replica_count number of quorum-count value to be set on a volume. Change-Id: I13952f3c6cf498c9f2b91161503fc0fba9d94898 BUG: 1529515 Signed-off-by: karthik-us <ksubrahm@redhat.com>
* snapshot : after brick reset/replace snapshot creation failsSunny Kumar2017-12-293-27/+39
| | | | | | | | | | | | | Problem : after brick reset/replace snapshot creation fails Solution : During brick reset/replace when we validate and aggrigate dictionary data from another node it was rewriting 'mount_dir' value to NULL which is critical for snapshot creation. Change-Id: Iabefbfcef7d8ac4cbd2a241e821c0e51492c093e BUG: 1512451 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* rchecksum/fips: Replace MD5 usage to enable fips supportKotresh HR2017-12-211-1/+1
| | | | | | | | | rchecksum uses MD5 which is not fips compliant. Hence using sha256 for the same. Updates: #230 Change-Id: I7fad016fcc2a9900395d0da919cf5ba996ec5278 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* snapshot: fix several coverity issues in glusterd-snapshot.cSunny Kumar2017-12-213-34/+38
| | | | | | | | | | This patch fixes issues 157, 426, 428, 431, 432, 437,439, 482 from [1]. [1] https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-12-13-e255385a/html/ Change-Id: Iff9df12bd9802db29434155badb1beda045aba5b BUG: 789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* fips: Replace md5sum usage to enable fips supportKotresh HR2017-12-191-3/+5
| | | | | | | | | | | | md5sum is not fips compliant. Using xxhash64 instead of md5sum for socket file generation in glusterd and changelog to enable fips support. NOTE: md5sum is 128 bit hash. xxhash used is 64 bit. Updates: #230 Change-Id: I1bf2ea05905b9151cd29fa951f903685ab0dc84c Signed-off-by: Kotresh HR <khiremat@redhat.com>
* snapshot: Fix several coverity issues in glusterd-snapshot-utils.cSunny Kumar2017-12-182-18/+32
| | | | | | | | | | This patch fixes issues 622, 627, 630, 484, 32, 33 and 34 from [1] [1] https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/ Change-Id: I4c7ac2b2725474d73643367b38f8bf33eaddd8da BUG: 789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* glusterd: Fix buffer overflow in glusterd_get_volopt_contentXavier Hernandez2017-12-151-14/+45
| | | | | | | | | | | | The size of the description of each option in gluster has become greater than the hardcoded maximum size, causing a buffer overflow when requesting a list of all options. This patch uses dynamic memory to store all the information. Change-Id: I115cb9b55fc440434638bf468a50db055cdf271d BUG: 1526402 Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
* all: Simplify component message id's definitionXavier Hernandez2017-12-141-4950/+625
| | | | | | | | | This patch creates a new way of defining message id's that is easier and less error prone because it doesn't require so many manual changes each time a new component is defined or a new message created. Change-Id: I71ba8af9ac068f5add7e74f316a2478bc991c67b Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
* write-behind: Allow trickling-writes to be configurableCsaba Henk2017-12-131-0/+12
| | | | | | | | | | | | | | This is the undisputed/trivial part of Shreyas' patch he attached to https://bugzilla.redhat.com/1364740 (of which the current bug is a clone). We need more evaluation for the page_size and window_size bits before taking them on. Change-Id: Iaa0b9a69d35e522b77a52a09acef47460e8ae3e9 BUG: 1428060 Co-authored-by: Shreyas Siravara <sshreyas@fb.com> Signed-off-by: Csaba Henk <csaba@redhat.com>
* quick-read: Integrate quick read with upcall and increase cache timePoornima G2017-12-131-0/+12
| | | | | | | Fixes : #261 Co-author: Subha sree Mohankumar <smohanku@redhat.com> Change-Id: Ie9dd94e86459123663b9b200d92940625ef68eab Signed-off-by: Poornima G <pgurusid@redhat.com>
* glusterd : Fix glusterd mem leaksMohit Agrawal2017-12-122-0/+37
| | | | | | | | | | | | | | | Problem: glusterd eats a huge amount of meory during volume set/stop/start. Solution: At the time of compare graph topology create a graph and populate key values in the dictionary, after finished graph comparison we do destroy the new graph.At the time of construct graph we don't take any reference and for server xlators we do take reference in server_setvolume so in glusterd we do take reference after prepare a new graph while we do create a graph to compare graph topology. BUG: 1520245 Change-Id: I573133d57771b7dc431a04422c5001a06b7dda9a Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* md-cache: Cache statfs callsShreyas Siravara2017-12-121-0/+6
| | | | | | | | | | | | | | | Summary: - This gives md-cache to cache statfs calls - You can turn it on or off via 'gluster vol set groot performance.md-cache-statfs <on|off>' Change-Id: I664579e3c19fb9a6cd9d7b3a0eae061f70f4def4 BUG: 1523295 Signature: t1:4652632:1488581841:111cc01efe83c71f1e98d075abb10589c4574705 Reviewed-on: https://review.gluster.org/18228 Reviewed-by: Shreyas Siravara <sshreyas@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Signed-off-by: Shreyas Siravara <sshreyas@fb.com>
* nfs: Enable multi-core epoll support in gNFSdShreyas Siravara2017-12-081-0/+6
| | | | | | Change-Id: Ie8a7b1ba04b0e83f5ec7a09f9d181fe59be479ca BUG: 1522847 Signed-off-by: Shreyas Siravara <sshreyas@fb.com>
* storage/posix: Add limit to number of hard linksShreyas Siravara2017-12-081-0/+5
| | | | | | | | | | | | Summary: Too may hard links blow up btrfs by exceeding max xattr size (recordign pgfid for each hardlink). Add a limit to prevent this explosion. > Reviewed-on: https://review.gluster.org/18232 > Reviewed-by: Shreyas Siravara <sshreyas@fb.com> Fixes gluster/glusterfs#370 Signed-off-by: ShyamsundarR <srangana@redhat.com> Change-Id: I614a247834fb8f2b2743c0c67d11cefafff0dbaa
* glusterd: Allow volume stop to succeed if certain processes are already deadShreyas Siravara2017-12-081-4/+14
| | | | | | | | | | | | | | Summary: - Sometimes a the process that glusterd is trying to kill is already dead. - In that case, if it can't find the pid, it should just continue on and not fail the entire operation. Change-Id: Ic96952a8d31927446f648830ede6ccd82512663f BUG: 1522968 Reviewed-on: https://review.gluster.org/18234 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Signed-off-by: Ana M. Neri <amnerip@fb.com>
* Fix management client deadlockRichard Wareing2017-12-071-1/+6
| | | | | | | | | | | | | | | | | | | Ping notify is a NOOP for management daemons Reviewers: sshreyas Reviewed By: sshreyas FB-commit-id: ec30b68 Change-Id: I8e121aaaa3ad268e5df057e03aa4b37a403c9ea0 BUG: 1522968 Signed-off-by: Kevin Vigor <kvigor@fb.com> Reviewed-on: https://review.gluster.org/16858 CentOS-regression: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shreyas Siravara <sshreyas@fb.com>
* glusterd: Free up svc->conn on volume deleteAtin Mukherjee2017-12-071-0/+5
| | | | | | | | | | Daemons like snapd, tierd and gfproxyd are maintained on per volume basis and on a volume delete we should destroy the rpc connection established for them. Change-Id: Id1440e39da07b990fdb9b207df18da04b1ca8014 BUG: 1522775 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* storage/posix : options to override umaskSubha sree Mohankumar2017-12-021-1/+21
| | | | | | | | | | | | | | | | | | | | | Options "create-mask" and "create-directory-mask" are added to remove the mode bits set on a file or directory when its created. Default value of these options is 0777. Options "force-create-mode" and "force-create-directory" sets the default permission for a file or directory irrespective of the clients umask. Default value of these options is 0000. Command to set option: volume set <volume name> storage.<option-name> <value> The valid value range from 0000 to 0777. Updates #301 Change-Id: Ia33d13f2117202ca55a056c747ccc3674eb8bae1 Signed-off-by: Subha sree Mohankumar <smohanku@redhat.com>
* glusterd:buffer_size_warning coverity fixesSubha sree Mohankumar2017-12-021-0/+6
| | | | | | | | Fixes Issues :15,17,18,19,24,38 Change-Id: Ib09d319308e4ef7dfbdd5e49e16064d4f55a54f9 BUG: 789278 Signed-off-by: Subha sree Mohankumar <smohanku@redhat.com>
* posix: Convert posix_fs_health_check asynchrnously to save timestampMohit Agrawal2017-12-011-0/+5
| | | | | | | | | | | Problem: Sometime posix_fs_health_check thread is blocked on write/read call while backend device deleted abruptly. Solution: To resolve it convert code to update timestamp asynchrnously. BUG: 1501132 Change-Id: Id68ea6a572bf68fbf437e1d9be5221b63d47ff9c Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* Tier: Stop tierd for detach starthari gowtham2017-12-017-173/+158
| | | | | | | | | | | | | | | | | | | Problem: tierd was stopped only after detach commit This makes the detach take a longer time. The detach demotes the files to the cold brick and if the promotion frequency is hit, then the tierd starts to promote files to hot tier again. Fix: stop tierd after detach start so the files get demoted faster. Note: the is_tier_enabled was not maintained properly. That has been fixed too. some code clean up has been done. Signed-off-by: hari gowtham <hgowtham@redhat.com> Change-Id: I532f7410cea04fbb960105483810ea3560ca149b BUG: 1446381
* cluster/ec: Modify OP_VERSION to 4.0.0 for stripe cache optionAshish Pandey2017-11-291-1/+1
| | | | | | Change-Id: I991eaeb979497a1bf056b5871284274f959f36f2 BUG: 1471753 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* glusterd: revert coverity fix for freeing key_dupAtin Mukherjee2017-11-291-1/+0
| | | | | | | | | key_dup can't be freed here as the same is referenced at the gd_mgmt_v3_unlock_timer_cbk. Change-Id: I85667f98c82d1acebcce59137dfc0dd1ca93b4eb BUG: 789278 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* posix: Change GD_OP_VERSION to 3_13_0 from 3_12_0 for storage.reserveMohit Agrawal2017-11-291-1/+1
| | | | | | | | | | | Problem: Change GD_OP_VERSION to 3_13_0 from 3_12_0 for option storage.reserve Solution: Actually feature was merged in 3.13.0 branch so GD_OP_VERSION needs to change from 3_12_0 to 3_13_0 BUG: 1518508 Change-Id: I3890a3e921847d896465ce456fee003efaeb0c61 Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
* snapshot : snapshot creation failed after brick reset/replaceSunny Kumar2017-11-283-18/+9
| | | | | | | | | | | | Problem : snapshot creation was failing after brick reset/replace Fix : changed code to set mount_dir value in rsp_dict during prerequisites phase i.e glusterd_brick_op_prerequisites call and removed form prevalidate phase. Signed-off-by: Sunny Kumar <sunkumar@redhat.com> Change-Id: Ief5d0fafe882a7eb1a7da8535b7c7ce6f011604c BUG: 1512451
* afr: coverity fixesRavishankar N2017-11-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | 1.afr_discover_do: COPY_PASTE_ERROR 2.afr_fav_child_reset_sink_xattrs_cbk: REVERSE_INULL 3.afr_fop_lock_proceed: UNUSED_VALUE 4.afr_local_init: CHECKED_RETURN 5.afr_set_split_brain_choice: REVERSE_INULL 6.__afr_inode_write_finalize: FORWARD_NULL 7.afr_refresh_heal_done: REVERSE_INULL 8.afr_xl_op:UNUSED_VALUE 9.afr_changelog_populate_xdata: DEADCODE 10.set_afr_pending_xattrs_option: RESOURCE_LEAK Note: RESOURCE_LEAK complaints about afr_fgetxattr_pathinfo_cbk, afr_getxattr_list_node_uuids_cbk and afr_getxattr_pathinfo_cbk seem to be false alarms. Change-Id: Ia4ca1478b5e2922084732d14c1e7b1b03ad5ac45 BUG: 789278 Signed-off-by: Ravishankar N <ravishankar@redhat.com>
* features/worm: new config option to manage deletion of Worm files.Vishal Pandey2017-11-201-0/+8
| | | | | | | | | | | | | | | | | | | | Add a new configuration option worm-files-deletable to file-level Worm in order to control behaviour of Worm files upon deletion. Steps to Test: 1. Add all the configuration options to a volume to activate file-level-worm 2. Option features.worm-files-deletable is set to 1 by default. 3. Create a new file and wait for the retention time to expire. 4. After retention time expires, do an truncate, rename, unlink, link or write to send the file in Worm state. 5. After that do `rm -f filename`. 6. The file is successfully removed. 7. Repeat from step 2 by setting features.worm-files-deletable 0. This time deletion should not be successful. Change-Id: Ibc89861ee296e065330b93a9f9606be5da40af31 BUG: 1508898 Signed-off-by: Vishal Pandey <vishpandey2014@gmail.com>
* tier/glusterd: coverity issues in glusterd-tier.chari gowtham2017-11-171-3/+13
| | | | | | | | | | | | Coverity issues fixed in this patch: 254, 256, 295, 791, 546 from: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/ master/glusterfs-coverity/2017-10-30-9aa574a5/html/ Change-Id: I44b7d307a3434040125d8b1d6fb18221f30f678d BUG: 789278 Signed-off-by: hari gowtham <hgowtham@redhat.com>
* glusterd: Fix coverity issues in handshake moduleSanju Rakonde2017-11-151-10/+6
| | | | | | | | This patch fixes coveruty issues 737,738,172,188,728,198,235,35. Change-Id: I632ddc5edbfb03bc81ce27f02886b8e262c1d946 BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd: Fix coverity issues in glusterd-handler.cSamikshan Bairagya2017-11-151-9/+26
| | | | | | | | | | | Fixes get-state CLI related coverity issues 477, 511, 515, 523, 526 and 527 from the report at [1] [1] https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/ Change-Id: Ieb6f64c9035b4d9338d9515de003d607b7a4e9bc BUG: 789278 Signed-off-by: Samikshan Bairagya <samikshan@gmail.com>
* glusterd: checked_return coverity fixKartik_Burmee2017-11-151-1/+1
| | | | | | | | | | | | function: glusterd_store_retrieve_options issue: Calling "gf_store_iter_destroy" without checking return value fix: typecasted the return value of the function to void Change-Id: I6dc4f4308b1eca8d6ee85834a1530ff356c73898 BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* cluster/ec: Fix op-version for disperse.other-eager-lockXavier Hernandez2017-11-141-1/+1
| | | | | | | | | The op-version used for the new option was wrong. It has been set to 3.13.0. Change-Id: I88fbd7834e4a8018c8906303e734c251e90be8cf BUG: 1502610 Signed-off-by: Xavier Hernandez <jahernan@redhat.com>
* glusterd: dead_code coverity fixKartik_Burmee2017-11-141-3/+0
| | | | | | | | | | | | issue: Execution cannot reach this statement: "rsp.op_errno = gf_errno_to_...". function:__server_event_notify fix: removed the if statement and the corresponding actions. Also, the variable was not being used anywhere else, so removed its declaration as well Change-Id: I85259e276c482cc9c98b1a829426bcec7412ce3f BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* glusterd: DEADCODE coverity fixSanju Rakonde2017-11-141-8/+0
| | | | | | | | | | | Problem: execution cannot enter into if block since the condition !address is always false. Fix: removing if block solves it. Change-Id: I47b4beca7bdc095900b46e3f5a5cb9629aa2a4d7 BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd: dead code coverity fixKartik_Burmee2017-11-141-2/+0
| | | | | | | | | | | | | | | | function: glusterd_volume_rebalance_use_rsp_dict problem: Execution cannot reach this statement: "goto out;" fix: removed the condition 'if(!ctx_dict)' and the corresponding action 'goto out;' because it will never be executed. reason: if the execution reaches this condition, then the value of '!ctx_dict' will always be false otherwise the execution will reach the 'out' label, skipping the execution of this conditional statement. html link of issue: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-11-10-0f524f07/html/1/99glusterd-utils.c.html#error Change-Id: I7ab6b2386bb01c54edd872f9f83bb8d2a4cd499f BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* glusterd: checked_return coverity fixKartik_Burmee2017-11-141-1/+1
| | | | | | | | | | issue: Calling "recursive_rmdir" without checking return value fix: typecasted return value of function 'recursive_rmdir' to void Change-Id: Ie95c2a2c503bb247afa69823d0043c3af5e036e8 BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* glusterd: buffer_size_warning coverity fixKartik_Burmee2017-11-131-1/+1
| | | | | | | | | | | | | | function: glusterd_import_volinfo problem: Calling strncpy with a maximum size argument of 256 bytes on destination array "new_volinfo->parent_volname" of size 256 bytes might leave the destination string unterminated. fix: The third argument of strncpy specifies the number of characters to be copied from the source string to the destination string. To make sure that the final string in destination is always null terminated, we copy 1 less character than the total capacity of the destination array and the last element of the array will be filled by '/0' automatically by the strncpy function. html link of issue: https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-11-10-0f524f07/html/1/39glusterd-utils.c.html#error Change-Id: I76b0d10e6a932b0885531c9be3c4f4ce7239f3e1 BUG: 789278 Signed-off-by: Kartik_Burmee <kburmee@redhat.com>
* glusterd: Validate changelog on geo-rep volumeKotresh HR2017-11-122-1/+62
| | | | | | | | | If geo-rep is configured on volume, don't allow to disable changelog. Change-Id: I7d1ba8b2939c8fe6ee6c59fb923d9aa1bdab553c BUG: 1503227 Signed-off-by: Kotresh HR <khiremat@redhat.com>
* glusterd: PW.INCLUDE_RECURSION coverity fixSanju Rakonde2017-11-122-1/+2
| | | | | | | | | | | | | | This patch fixes coverity issue 421 Problem: #include file "glusterd-utils.h" includes itself, glusterd-utils.h -> glusterd-peer-utils.h -> glusterd-utils.h Fix: include of glusterd-utils.h into glusterd-peer-utils.c instead of glusterd-peer-utils.h. Change-Id: I164732dfb1f64636577765124ddc5361ff0f1cc5 BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* glusterd: few coverity fixes in glusterd-handler.cSanju Rakonde2017-11-121-6/+15
| | | | | | | | This patch fixes coverity issues 695,555,263 Change-Id: I3577cbc793b6652b24cc719037db2bdd5e27f196 BUG: 789278 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* mgmt/glusterd glusterd coverity fixesAshish Pandey2017-11-111-51/+61
| | | | | | | | | | | | | | | | Coverity ID: 498 Coverity ID: 756 Coverity ID: 764 Coverity ID: 553 Coverity ID: 562 Coverity ID: 765 Coverity ID: 731 Coverity ID: 545 Coverity ID: 781 Change-Id: I5922db462ba3f71397ae097d7e56739c335114d3 BUG: 789278 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* cluster/ec: Keep last written strip in in-memory cacheAshish Pandey2017-11-101-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: Consider an EC volume with configuration 4 + 2. The stripe size for this would be 512 * 4 = 2048. That means, 2048 bytes of user data stored in one stripe. Let's say 2048 + 512 = 2560 bytes are already written on this volume. 512 Bytes would be in second stripe. Now, if there are sequential writes with offset 2560 and of size 1 Byte, we have to read the whole stripe, encode it with 1 Byte and then again have to write it back. Next, write with offset 2561 and size of 1 Byte will again READ-MODIFY-WRITE the whole stripe. This is causing bad performance because of lots of READ request travelling over the network. There are some tools and scenario's where such kind of load is coming and users are not aware of that. Example: fio and zip Solution: One possible solution to deal with this issue is to keep last stripe in memory. This way, we need not to read it again and we can save READ fop going over the network. Considering the above example, we have to keep last 2048 bytes (maximum) in memory per file. Change-Id: I3f95e6fc3ff81953646d374c445a40c6886b0b85 BUG: 1471753 Signed-off-by: Ashish Pandey <aspandey@redhat.com>
* quota: fixes issue in quota.conf when setting large number of limitsSanoj Unnikrishnan2017-11-091-12/+33
| | | | | | | | | | | | | | | Problem: It was not possible to configure more than 7712 quota limits. This was because a stack buffer of size 131072 was used to read from quota.conf file. In the new format of quota.conf file each gfid entry takes 17bytes (16byte gfid + 1 byte type). So, the buf_size was not a multiple of gfid entry size and as per code this was considered as corruption. Solution: make buf size multiple of gfid entry size Change-Id: Id036225505a47a4f6fa515a572ee7b0c958f30ed BUG: 1510940 Signed-off-by: Sanoj Unnikrishnan <sunnikri@redhat.com>
* glusterd: display gluster volume status, when quorum type is serverSanju Rakonde2017-11-091-0/+6
| | | | | | | | | | | | | Problem: when server-quorum-type is server, after restarting glusterd in the node which is up, gluster volume status is giving incorrect information. Fix: check whether server is blank, before adding other keys into the dictionary. Change-Id: I926ebdffab330ccef844f23f6d6556e137914047 BUG: 1511339 Signed-off-by: Sanju Rakonde <srakonde@redhat.com>
* Coverity Issue: PW.INCLUDE_RECURSION in several filesGirjesh Rajoria2017-11-0912-13/+0
| | | | | | | | | | | | | | Coverity ID: 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 423, 424, 425, 426, 427, 428, 429, 436, 437, 438, 439, 440, 441, 442, 443 Issue: Event include_recursion Removed redundant, recursive includes from the files. Change-Id: I920776b1fa089a2d4917ca722d0075a9239911a7 BUG: 789278 Signed-off-by: Girjesh Rajoria <grajoria@redhat.com>
* snapshot: fix coverity issue 'UNREACHABLE'Sunny Kumar2017-11-091-34/+1
| | | | | | | | | | | | | | | | Problem : In glusterd-snapshot-utils.c:2778 code path is unreachable as it was intended for n-way replication snapshot support. Fix : Removed code now, will revert back this change in future once we support n-way replication in snapshot. This patch fixes coverity issue 687 from [1]. [1] https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/ Change-Id: I163f318e62a7e84d211d9930dedee6587d37b2a0 BUG: 789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>
* glusterd: restart the brick if qorum status is NOT_APPLICABLE_QUORUMAtin Mukherjee2017-11-091-1/+2
| | | | | | | | | | | If a volume is not having server quorum enabled and in a trusted storage pool all the glusterd instances from other peers are down, on restarting glusterd the brick start trigger doesn't happen resulting into the brick not coming up. Change-Id: If1458e03b50a113f1653db553bb2350d11577539 BUG: 1509845 Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: Coverity Issue FORWARD_NULL fixVishal Pandey2017-11-081-1/+1
| | | | | | | | | | | | | | | | | | Problems: According to Coverity Issue ID 207 issues are as follows- a-) Dereferencing "this" pointer without checking if it points to NULL. b-) The IF condition on line 1750 should check if any *one* of dict, this or peerinfo is NULL and not *all*. Fix: Replace the && operator with || to check if any *one* of this, dict or peerinfo is NULL and then execute out label. Change-Id: I40057d6cade71d3862c8e491bf4137cf25dda327 BUG: 789278 Signed-off-by: Vishal Pandey <vishpandey2014@gmail.com>
* snapshot : fix coverity issue in glusterd-snapshot.cSunny Kumar2017-11-081-1/+3
| | | | | | | | | | This patch fixes coverity issue 87 from [1]. [1] https://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-coverity/2017-10-30-9aa574a5/html/ Change-Id: I5c9c67b4dd43ebf1a5a83532cbd06178000da145 BUG: 789278 Signed-off-by: Sunny Kumar <sunkumar@redhat.com>