summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* events: use attribute(format(/printf)) to catch fmt string errorsKaleb S. KEITHLEY2017-02-267-12/+14
| | | | | | | | | | | | | and statedump too. Also "const char *" (versus just "char *") for the fmt param. Change-Id: Ic63734a673208a2cd49aebccce7659816e6179e3 BUG: 1399196 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/15881 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* build: fixes to build 3.9.0rc2 on DebianKaleb S. KEITHLEY2017-02-264-1/+94
| | | | | | | | | | | | | | | | Add glustereventsd-Debian(.in) and associated Makefile(.am) and configure(.ac) changes Add UUIDLIBS to fdl's librecon Change-Id: Ibff821691023704978140eaaff2c6532b74c50fa BUG: 1389127 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/15737 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Joe Julian <me@joejulian.name>
* mgmt: Reset conf_fd to default value to avoid double closeMichael Scherer2017-02-261-0/+2
| | | | | | | | | | | | | | | | | | Coverity warn of a path where we use sys_close 2 times on the same file descriptor, which is likely harmless but could cause various hard to debug problems if threads are used (since the file descriptor table is shared among all threads, we could close a newly opened fd by another thread). Change-Id: I0524b31dccc0da94c7b87583e2a88ef06e003518 BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16758 Tested-by: Michael Scherer <misc@fedoraproject.org> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
* dnt: Add a GF_DEFRAG_CMD_NONE to gf_defrag_typeMichael Scherer2017-02-262-2/+3
| | | | | | | | | | | | | | | Coverity complain about enum mismatch since we assign GF_OP_CMD_NONE to a variable holding gf_defrag_type. Change-Id: I63e71f552b3cc752c26c1b8705420f38908e17e6 BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16756 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Michael Scherer <misc@fedoraproject.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* dnt: Fix crash when showing the error messageMichael Scherer2017-02-261-1/+1
| | | | | | | | | | | | | | | | Since this is NULL, this->name would crash the daemon if a incorrect rebal_entry is passed. Found by coverity scan. Change-Id: Ieddf1ef097d13711ab8ec9cd24e125914d2e7245 BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16740 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Michael Scherer <misc@fedoraproject.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* Free iobuf after using it, not beforeMichael Scherer2017-02-261-2/+2
| | | | | | | | | | | | | | | Coverity warn of use after free here. I assume that under pressure, this might crash the whole process. Change-Id: I15fb5cfc9b509705e96e4156b739988d816bbef5 BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16719 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Michael Scherer <misc@fedoraproject.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* Reorder the variable initialisationMichael Scherer2017-02-261-3/+1
| | | | | | | | | | | | | | | | Found by coverity, since is_hot_tier is assigned to false, tier_type was always "hot" rather than "cold", making potential debugging likely harder. Change-Id: I49bce1c184548c5de5c00639e83fc3d2dbed90b2 BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16717 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Michael Scherer <misc@fedoraproject.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* Remove deadcodeMichael Scherer2017-02-261-3/+0
| | | | | | | | | | | | | | Found by coverity, ret is already test in the previous 'if'. Change-Id: Iefb7da07c1144470c2322f44b28f98a5904343b4 BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16718 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Michael Scherer <misc@fedoraproject.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* Remove unused conditionnalMichael Scherer2017-02-261-15/+0
| | | | | | | | | | | | | | | The code is using a got to jump 1 line further, which is a no-op. Found by coverty scan Change-Id: Ic8698e2f86ebd9472b3104b09920ab7946c3b4fc BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16714 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Michael Scherer <misc@fedoraproject.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* Remove deadcode, found by covertyMichael Scherer2017-02-261-2/+0
| | | | | | | | | | | | | | | Since ret value is unchanged since last goto out, this code is unreachable. Change-Id: Iff8618739900b44bad6c4e663a4201d9e14cb457 BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16713 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Michael Scherer <misc@fedoraproject.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* libglusterfs, gfdb, glusterfs: Add missing breaksNigel Babu2017-02-268-0/+12
| | | | | | | | | | | | | | | | A few switches did not have breaks causing fall throughs. Most of them have been fixed with fall through comments for those that are intentional. Change-Id: I84c85726b542f38504b50fefab5eba5dbcd27a07 BUG: 1424894 Signed-off-by: Nigel Babu <nigelb@redhat.com> Reviewed-on: https://review.gluster.org/16677 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
* cli: fix error when HAVE_READLINE is falseNigel Babu2017-02-251-7/+6
| | | | | | | | | | | | | | | When HAVE_READLINE is false, Gluster doesn't compile with -Werror flag. This will fix it up so it is possible to compile without having readline present Change-Id: Ia6620b5a372318d10f0e908e3d45f4090f99d118 BUG: 1426052 Reviewed-on: https://review.gluster.org/16734 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Nigel Babu <nigelb@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* Filter coverty false positivesMichael Scherer2017-02-243-0/+4
| | | | | | | | | | | | | | | Since random is not used for anything cryptographically related, it is fine to use it in those instances. Change-Id: I720172285f60d6bc477c7169c7286fc018ebdf8f BUG: 1424764 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16668 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Nigel Babu <nigelb@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
* Do not call va_end twice in _gf_log_ehMichael Scherer2017-02-241-2/+0
| | | | | | | | | | | | | | | | | Since va_end is called after the out label, we do not need to call it here, as it make va_end undefined, and thus could cause problem. And this is a error on cppcheck. Change-Id: I6e96c796bd37fa3cde989996ab93f9a438c0ee74 BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16745 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: Michael Scherer <misc@fedoraproject.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
* Make sure that buffer is null terminatedMichael Scherer2017-02-241-1/+1
| | | | | | | | | | | | | | | | Coverity warn about it, and while that's unlikely to be a issue in practice, it is rather important to not mask more critical problems with false positive. Change-Id: Ibee1a9c37e216635077f05d5ef5de55ad5e0b051 BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16727 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* glusterd : log improvements in glusterd_op_stage_rebalance ()Atin Mukherjee2017-02-241-4/+7
| | | | | | | | | | | | | | Include volume names in the respective staging failure error logs in rebalance staging Change-Id: Iaaab12a552930dd5274fbecec78f5735f883ab6b BUG: 1426509 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: https://review.gluster.org/16746 Reviewed-by: Gaurav Yadav <gyadav@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* features/shard: Fix EIO error on add-brickKrutika Dhananjay2017-02-232-19/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | DHT seems to link inode during lookup even before initializing inode ctx with layout information, which comes after directory healing. Consider two parallel writes. As part of the first write, shard sends lookup on .shard which in its return path would cause DHT to link .shard inode. Now at this point, when a second write is wound, inode_find() of .shard succeeds and as a result of this, shard goes to create the participant shards by issuing MKNODs under .shard. Since the layout is yet to be initialized, mknod fails in dht call path with EIO, leading to VM pauses. The fix involves shard maintaining a flag to denote whether a fresh lookup on .shard completed one network trip. If it didn't, all inode_find()s in fop path will be followed by a lookup before proceeding with the next stage of the fop. Big thanks to Raghavendra G and Pranith Kumar K for the RCA and subsequent inputs and feedback on the patch. Change-Id: I9383ec7e3f24b34cd097a1b01ad34e4eeecc621f BUG: 1420623 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: https://review.gluster.org/14419 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* gfapi: OBS build fails in post build analysisKaleb S. KEITHLEY2017-02-231-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | Originally gfapi: create statedump when glusterd requests it When GlusterD sends the STATEDUMP procedure to the libgfapi client, the client checks if it matches the PID that should take the statedump. If so, it will do a statedump for the glfs_t that is connected to this mgmt connection. See https://bugzilla.redhat.com/show_bug.cgi?id=1169302#c25 for the OpenSuSE Build System post build analysis error. See Change-Id: I70d6a1f4f19d525377aebc8fa57f51e513b92d84 https://review.gluster.org/#/c/16415/ Change-Id: I7775f44ce13e20c831e8f1015816a28471d35bb4 BUG: 1169302 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: https://review.gluster.org/16722 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* nfs: remove include of mount3.hMichael Scherer2017-02-231-1/+0
| | | | | | | | | | | | | | | | While there is proper protection against that, coverity complain of a loop, and nothing in auth-cache.h use a declaration of "mount3.h". Change-Id: I55885ec12496359170f271ae192e9940a35121e1 BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16728 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* libglusterfs, dht, locks, glusterd: Coverity fixesNigel Babu2017-02-236-30/+10
| | | | | | | | | | | | | | Fix up use after free bugs and dead code Change-Id: I8f79ed6b5108926c1fac31c147b5ecba79d10785 BUG: 1424905 Signed-off-by: Nigel Babu <nigelb@redhat.com> Reviewed-on: https://review.gluster.org/16666 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
* Properly verify the return code of fcntlMichael Scherer2017-02-231-1/+1
| | | | | | | | | | | | | | | | | | Coverty scan complain about it, even if in practice, this doesn't seems to have much impact. Change-Id: I513f7d393889625d22dded25ef4c7477f68d1064 BUG: 1424793 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16671 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Nigel Babu <nigelb@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Poornima G <pgurusid@redhat.com>
* TESTS/TIER: bug-1303028-Rebalance-glusterd-rpc-connection-issue.thari gowtham2017-02-231-1/+2
| | | | | | | | | | | | | | | | | | | | | | PROBLEM: spurious failure of the test. CAUSE: the function "rebalance_run_time" calculates the total time the tier has been running for. this being a test case, the run time of tier can be 0 and when the function adds up zero it results in zero. and thus it starts to fail. FIX: Give it some time for the function to add up the values. Signed-off-by: hari gowtham <hgowtham@redhat.com> Change-Id: Ie270f3f3c8942081cca85dc49ef8fec76f3a261a BUG: 1425743 Reviewed-on: https://review.gluster.org/16711 Smoke: Gluster Build System <jenkins@build.gluster.org> Tested-by: hari gowtham <hari.gowtham005@gmail.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>
* features/shard: Put onus of choosing the inode to resolve on individual fopsKrutika Dhananjay2017-02-232-26/+21
| | | | | | | | | | | | | | | ... as opposed to adding checks in "common" functions to choose the inode to resolve based local->fop, which is rather ugly and prone to errors. Change-Id: Ia46cc59992baa2979516369cb72d8991452c0274 BUG: 1420623 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: https://review.gluster.org/16709 Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* tests: Added check for NFS export availability to quota-anon-fd-nfs.tShyam2017-02-221-0/+1
| | | | | | | | | | | Change-Id: I15a9441267c18bb1073d14db325c98fa497f2fb7 BUG: 1425515 Signed-off-by: Shyam <srangana@redhat.com> Reviewed-on: https://review.gluster.org/16701 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: sanoj-unnikrishnan <sunnikri@redhat.com>
* glusterd : cluster.brick-multiplex validation is missing while setting itGaurav Yadav2017-02-221-4/+5
| | | | | | | | | | | | | | | | | Currently glusterd allow setting all values while setting cluster.brick-multiplex option. Validation of allowed options is missing. With this patch glusterd will validate the values given while setting cluster.brick-multiplex. Change-Id: I938fb16b8f5faa9d31326373cd18632b8aa7ebab BUG: 1425288 Signed-off-by: Gaurav Yadav <gyadav@redhat.com> Reviewed-on: https://review.gluster.org/16704 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* snapshot/scheduler: Set sebool cron_system_cronjob_use_shares to onAvra Sengupta2017-02-221-0/+90
| | | | | | | | | | | | | | | | | | | Rhel 7.1 onwards, the user has to manually set the selinux boolean 'cron_system_cronjob_use_shares' as on, if selinux is enabled for snapshot scheduler to work. With this fix, we are automating that bit, in init step of snapshot scheduler Change-Id: I5c1d23c14133c64770e84a77999ce647526f6711 BUG: 1395643 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: https://review.gluster.org/15857 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com>
* glusterd: unref brickinfo object on volume stopAtin Mukherjee2017-02-211-1/+1
| | | | | | | | | | | | | | | | If brick multiplexing is enabled, on a volume stop glusterd was not unrefing the brickinfo rpc object which lead to a flood of stale rpc logs. Change-Id: I18fedcd6921042ef2e945605466194b7b53fe2f7 BUG: 1421724 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: https://review.gluster.org/16699 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Samikshan Bairagya <samikshan@gmail.com>
* cluster/ec: Fallback to precompiled codeXavier Hernandez2017-02-213-70/+63
| | | | | | | | | | | | | | | When dynamic code generation fails for some reason, instead of causing a failure in encode/decode, fallback to the precompiled version. Change-Id: I4f8a97d3033aa5885779722b19c6e611caa4ffea BUG: 1421955 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: https://review.gluster.org/16614 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* rpm: replace renamed python-gluster with python2-glusterNiels de Vos2017-02-211-0/+5
| | | | | | | | | | | | | | | | | | | | When upgrading from < 3.10, the old python-gluster package causes conflicts with the newly renamed python2-gluster package. This can be solved by adding the appropriate Provides and Obsoletes to the python2-gluster RPM. Details on renaming packages are listed on the Fedora Packaging Guidelines. Change-Id: Ib143bf69022c45abe2d5e8d31d3375a6b85f75da URL: https://fedoraproject.org/wiki/Packaging:Guidelines#Renaming.2FReplacing_Existing_Packages BUG: 1414902 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/16649 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Anoop C S <anoopcs@redhat.com>
* Fix erronous comparaison of flagsMichael Scherer2017-02-201-1/+1
| | | | | | | | | | | | | | | | | Using a binary 'or' mean that we always send the UUID, even when not required. Found by coverty scan Change-Id: Ifc4bff6b2f64febd5d2f038538218c2183518fd5 BUG: 1424815 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16675 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> Tested-by: Shyamsundar Ranganathan <srangana@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* Initialize path, since coverty detect a code path whereMichael Scherer2017-02-201-1/+1
| | | | | | | | | | | | | | | we do a free on a unitialized pointer (if jbr_get_changelog_dir fail). Change-Id: Ib68122bb9eddaeb422028f834856a0776ecbb789 BUG: 1424791 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16670 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Nigel Babu <nigelb@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* Ressources used by va_start must be freed with va_endMichael Scherer2017-02-201-1/+4
| | | | | | | | | | | | | | | | Coverty warn of the defect. Change-Id: Ie86684520e1d5b41237ab8d3247c24564a1a8639 BUG: 1424802 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16673 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Susant Palai <spalai@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* contributors: map more email addresses and domain namesNiels de Vos2017-02-203-2/+27
| | | | | | | | | | | | | | | | | | | | | | While checking the statistics for the upcoming release, I noticed some new names, emailaddresses and domains. Adding the ones for which the mapping is obvious or for which people replied to my request for clarification. Steps to get the more up-to-date statistics (once merged): $ git checkout master $ ./extras/who-wrote-glusterfs/who-wrote-glusterfs.sh v3.9dev..origin/release-3.10 ... Change-Id: I4ab85fdbdb53d09a70a659555b8341cf9376167c Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/16688 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Remove the useless gotoMichael Scherer2017-02-201-4/+0
| | | | | | | | | | | | | | | | | | ret cannot be 0, since the error code for gf_store_save_value is -1. And the label of the goto is just after the goto, so that's deadcode. Change-Id: I227bca41f4d0755891b8e6e0f4cb2ce004615a35 BUG: 1424809 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16674 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Nigel Babu <nigelb@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* marker: Fix inode value in loc, in setxattr fopPoornima G2017-02-203-0/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | On recieving a rename fop, marker_rename() stores the, oldloc and newloc in its 'local' struct, once the rename is done, the xtime marker(last updated time) is set on the file, but sending a setxattr fop. When upcall receives the setxattr fop, the loc->inode is NULL and it crashes. The loc->inode can be NULL only in one valid case, i.e. in rename case where the inode of new loc can be NULL. Hence, marker should have filled the inode of the new_loc before issuing a setxattr. marker_rename_cbk was already fixed in a previous commit. Fixing marker_rename_done to send valid inode in this commit. Also in upcall check for NULL inode so that there is no crash. Change-Id: I3ed2a05118fed3367dfe3251ce4477310cb480d0 BUG: 1422776 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: https://review.gluster.org/16633 Reviewed-by: Kotresh HR <khiremat@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>
* libglusterfs: Fix a crash due to race between inode_ctx_set and inode_refPoornima G2017-02-194-34/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: Currently inode ref count is gaurded by inode_table->lock, and inode_ctx is gauarded by inode->lock. With the new patch [1] inode_ref was modified to change the inode_ctx to track the ref count per xlator. Thus inode_ref performed under inode_table->lock is modifying inode_ctx which has to be modified only under inode->lock Solution: When a inode is created, inode_ctx holder is allocated for all the xlators. Hence in case of inode_ctx_set instead of using the first free index in inode ctx holder, we can have predecided index for every xlator in the graph. Credits Pranith K <pkarampu@redhat.com> [1] http://review.gluster.org/13736 Change-Id: I1bfe111c211fcc4fcd761bba01dc87c4c69b5170 BUG: 1423373 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: https://review.gluster.org/16622 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* rpc: fix obvious typo in cleanup code in rpc_clnt_notifyMateusz Slupny2017-02-191-1/+1
| | | | | | | | | | | | | | | Change-Id: I003e38b238704d3345d46688355bcf3702455ba1 BUG: 1399593 Signed-off-by: Mateusz Slupny <mateusz.slupny@appeartv.com> [ndevos: rebased after I8ff5d1a32 moved the code around] Reviewed-on: https://review.gluster.org/15969 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Prashanth Pai <ppai@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Remove deadcode, found by covertyscanMichael Scherer2017-02-191-3/+0
| | | | | | | | | | | | | | | | Since ctx_dict is either assigned to the value of aggr, or we goto to out, there is no need for a 2nd goto. Change-Id: I6c4295c61e6ff412ed7b85421dcae13df8088d7c BUG: 1424796 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16672 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Atin Mukherjee <amukherj@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* posix: Fix creation of files with S_ISVTX on FreeBSDXavier Hernandez2017-02-185-20/+43
| | | | | | | | | | | | | | | | | | | On FreeBSD the S_ISVTX flag is completely ignored when creating a regular file. Since gluster needs to create files with this flag set, specialy for DHT link files, it's necessary to force the flag. This fix does this by calling fchmod() after creating a file that must have this flag set. Change-Id: I51eecfe4642974df6106b9084a0b144835a4997a BUG: 1411228 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: https://review.gluster.org/16417 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* glusterd, readdir-ahead: Fix backward incompatibilityPoornima G2017-02-182-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: Any opion is spcified in two places: In the options[] of xlator itself and glusterd-volume-set.c. The default value of this option can be specified in both the places. If its specified only in xlator then the volfile generated will not have the option and default value, it will be assigned during graph initialization. With patch [1] the option rda-request-size was changed from INT to SIZET type, and default was changed from 131072 to 128KB, but was specified only in the readdir-ahead.c. Thus with this patch alone the volfile entry for readdir-ahead looks like: volume patchy-readdir-ahead type performance/readdir-ahead subvolumes patchy-read-ahead end-volume With patch [2], the default of option rda-request-size was specified in glusterd-volume-set.c as well(as it was necessary fr parallel readdir). With this patch the readdir entry in the volfile will look like: volume patchy-readdir-ahead type performance/readdir-ahead option rda-cache-limit 10MB option rda-request-size 128KB option parallel-readdir off subvolumes patchy-read-ahead end-volume Now consider the server has both these patches and client doesn't. Server will generate a volfile with entry: The old clients which thought the option rda-request-size is of type INT will now recieve the value 128KB which it willn't understand, and hence fail the mount. The issue is seen only with the combination of [1] and [2]. Solution: Instead of specifying 128KB as default in glusterd we specify 131072 so that the old clients will interpret as INT and new ones as 128KB Credits: Raghavendra G Change-Id: I0c269a5890957fd8a38e9a05bdec088645a6688a BUG: 1423410 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: https://review.gluster.org/16657 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* glusterd: take conn->lock around operations on conn->reconnectJeff Darcy2017-02-182-1/+27
| | | | | | | | | | | | | | | | Failure to do this could lead to a race in which a timer would be removed twice concurrently, corrupting the timer list (because gf_timer_call_cancel has no internal protection against this) and possibly causing a crash. Change-Id: Ic1a8b612d436daec88fd6cee935db0ae81a47d5c BUG: 1421721 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: https://review.gluster.org/16662 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* build: Add gf_attach to glusterfs-server packageAnoop C S2017-02-171-1/+1
| | | | | | | | | | | | | | | | | | Previously gf_attach was listed under glusterfs-fuse sub-package which introduced the dependency for glusterfs-api. So as per the discussion on gluster-devel[1] moving it to glusterfs-server. [1] http://lists.gluster.org/pipermail/gluster-devel/2017-February/052111.html Change-Id: I3d646d7c2e556d8f37e6da67bdedd0738739e01b BUG: 1423448 Signed-off-by: Anoop C S <anoopcs@redhat.com> Reviewed-on: https://review.gluster.org/16660 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
* glusterd : Fix for error message while removing brickGaurav Yadav2017-02-171-1/+2
| | | | | | | | | | | | | | | | | | | When remove-brick command is issued to a offline brick, glusterd error out the operation with message -: "volume remove-brick start: failed: Found stopped brick <hostname>:". With this fix while removing brick, error message is modified to "volume remove-brick start: failed: Found stopped brick <brick path>. Use force option to remove the brick" Change-Id: Id40a02fc38cdb526c4629de262967fe2383febe4 BUG: 1422624 Signed-off-by: Gaurav Yadav <gyadav@redhat.com> Reviewed-on: https://review.gluster.org/16630 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
* readdir-ahead: Remove unnecessary loggingPoornima G2017-02-171-6/+0
| | | | | | | | | | | | | | dict_get_int can return < 0 when key is not found is a valid case. Hence no need to log. Change-Id: If0795b0f178adbb94b10efc563506993f7411962 BUG: 1423369 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: https://review.gluster.org/16654 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* extras: Add more options to group virtKrutika Dhananjay2017-02-171-2/+7
| | | | | | | | | | | | | | | | | | | Apart from some of the option configurations already listed in the group-virt.example file, we also recommend that the users set certain other options added by this patch for VM use-case. This also helps Gluster-oVirt users in configuring virt options for new volumes at the click of a button as opposed to setting them manually through volume-set command. Change-Id: I8524e8d8a06bbbb0b9247571706e786410013b41 BUG: 1418900 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: https://review.gluster.org/16577 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Sahina Bose <sabose@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* build: fix linking of 'gf_logdump' and 'gf_recon'Niels de Vos2017-02-171-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | When linking the 'gf_recon' and 'gf_logdump' binaries on certain OS's (Debian?), the following error is returned and compilation aborts: Making all in src CCLD gf_recon Makefile:617: recipe for target 'gf_recon' failed Furher inspection showed this failure: /lib/x86_64-linux-gnu/libuuid.so.1: error adding symbols: DSO missing from command line 'gf_recon' and 'gf_logdump' link against libgfapi, and also need to pass the additional used libraries on the 'ld' commandline. Change-Id: I7401023f154dde46443f0186dda8ba749951234c Reported-by: chawlanikhil24 (on IRC) BUG: 1198849 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/16639 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org>
* performance/decompounder: Have terminal value in options[]Pranith Kumar K2017-02-161-0/+1
| | | | | | | | | | | | | | Absence of terminal values is leading to buffer-over-flow errors in address sanitizer. BUG: 1422152 Change-Id: I769c0e4b5bbb3ef2849b8d1097b9def522ae08d9 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: https://review.gluster.org/16615 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* cluster/afr: Perform new entry mark before creating new entryPranith Kumar K2017-02-164-54/+51
| | | | | | | | | | | | | | | | | | | There is a chance for the source brick to go down just after the new entry is created and before source brick is marked with necessary pending markers. If after this any I/O happens then new entry will become source and reverse heal will happen. To prevent this mark the pending xattrs before creating the new entry. BUG: 1417466 Change-Id: I233b87e694d32e5d734df5a83b4d2ca711c17503 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: https://review.gluster.org/16474 Smoke: Gluster Build System <jenkins@build.gluster.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
* geo-rep: Fix xsync crawlKotresh HR2017-02-161-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | If stime is set to (0, 0) on master brick root, it is expected to do complete sync ignoring the stime set on sub directories. But while initializing the stime variable for comparison, it was initailized to (-1, 0) instead of (0, 0). Fixed the same. The stime is set to (0, 0) with the 'reset-sync-time' option while deleting session. 'gluster vol geo-rep master fedora1::slave delete reset-sync-time' The scenario happens when geo-rep session is deleted as above and for some reason the session is re-established with same slave volume after deleting data on slave volume. Change-Id: Ie5bc8f008dead637a09495adeef5577e2b33bc90 BUG: 1422760 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: https://review.gluster.org/16629 NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Aravinda VK <avishwan@redhat.com>
* rpcsvc: Add rpchdr and proghdr to iobref before submitting to transportPoornima G2017-02-154-12/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue: When fio is run on multiple clients (each client writes to its own files), and meanwhile the clients does a readdirp, thus the client which did a readdirp will now recieve the upcalls. In this scenario the client disconnects with rpc decode failed error. RCA: Upcall calls rpcsvc_request_submit to submit the request to socket: rpcsvc_request_submit currently: rpcsvc_request_submit () { iobuf = iobuf_new iov = iobuf->ptr fill iobuf to contain xdrised upcall content - proghdr rpcsvc_callback_submit (..iov..) ... if (iobuf) iobuf_unref (iobuf) } rpcsvc_callback_submit (... iov...) { ... iobuf = iobuf_new iov1 = iobuf->ptr fill iobuf to contain xdrised rpc header - rpchdr msg.rpchdr = iov1 msg.proghdr = iov ... rpc_transport_submit_request (msg) ... if (iobuf) iobuf_unref (iobuf) } rpcsvc_callback_submit assumes that once rpc_transport_submit_request() returns the msg is written on to socket and thus the buffers(rpchdr, proghdr) can be freed, which is not the case. In especially high workload, rpc_transport_submit_request() may not be able to write to socket immediately and hence adds it to its own queue and returns as successful. Thus, we have use after free, for rpchdr and proghdr. Hence the clients gets garbage rpchdr and proghdr and thus fails to decode the rpc, resulting in disconnect. To prevent this, we need to add the rpchdr and proghdr to a iobref and send it in msg: iobref_add (iobref, iobufs) msg.iobref = iobref; The socket layer takes a ref on msg.iobref, if it cannot write to socket and is adding to the queue. Thus we do not have use after free. Thank You for discussing, debugging and fixing along: Prashanth Pai <ppai@redhat.com> Raghavendra G <rgowdapp@redhat.com> Rajesh Joseph <rjoseph@redhat.com> Kotresh HR <khiremat@redhat.com> Mohammed Rafi KC <rkavunga@redhat.com> Soumya Koduri <skoduri@redhat.com> Change-Id: Ifa6bf6f4879141f42b46830a37c1574b21b37275 BUG: 1421937 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: https://review.gluster.org/16613 Reviewed-by: Prashanth Pai <ppai@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: soumya k <skoduri@redhat.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Raghavendra G <rgowdapp@redhat.com>