summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* rpm: drop the glusterfs-devel dependency from glusterfs-apiNiels de Vos2014-02-261-1/+3
| | | | | | | | | | | | | This dependency was introduced when the Fedora packaging change for Bug 1016938 was (incorrectly) merged back into the upstream community version. Change-Id: I74a52c96533fa381e86b47f719480f00b12722ac BUG: 1065750 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/7022 Reviewed-by: Justin Clift <jclift@redhat.com> Tested-by: Justin Clift <jclift@redhat.com>
* feature/compress: Validate option and enable docPrashanth Pai2014-02-264-61/+55
| | | | | | | | | | | | | | | | | * Validate network.compression option * Enable descriptions of xlator configurable options * Improve indentation in code * Make network.compression.mode not configurable by user. This is similar to "iam-self-heal-daemon" option in AFR xlator. Fixes BUGs: 1065658, 1065640, 1065655 Change-Id: I99d82b574ee0e5c8c2baf5f5d52dbf8d015d330a BUG: 1065640 Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/7024 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* build: fail configure if the libxml2 devel package is missing.Vijaykumar Koppad2014-02-251-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | Problem: Geo-replication uses volume info xml output. While installing glusterfs through build+install from source, and if the libxml2-devel package is not present in the system, build will succeed with just warning and XML output : no. If user fails to observe this and doesn't know that geo-rep is dependent on xml output, user won't be able use geo-rep. Solution: If libxml2-devel is unavailable, and if geo-rep is enabled error out in configure, otherwise just warn with XML_OUTPUT = no. If the xml-output is disabled while configuring, error out if geo-rep is enabled, otherwise just warn. Change-Id: Icde5d0c1e5f3b869e7db6ed6a046bdc49b450fcb BUG: 1066997 Signed-off-by: Vijaykumar Koppad <vkoppad@redhat.com> Reviewed-on: http://review.gluster.org/7131 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* extras/hookscripts: Add `%P` as default relative rootHarshavardhana2014-02-241-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | ctdb in its monitoring script looks for the "path" variable values at the system level not at share level. This relative root path, if any should be default for all volumes, to avoid issues with ctdb when doing subdirectory shares. Error: 2014/02/21 12:50:34.355754 [41083]: ERROR: samba directory "/foodir" not available Fix: Add %P in your smb.conf [gluster-foodir] ... ... path = %P/foodir ... ... Change-Id: If3c110d844ba8301c901dbce40b23cac99d6d55b BUG: 1068776 Signed-off-by: Harshavardhana <harsha@harshavardhana.net> Reviewed-on: http://review.gluster.org/7147 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/io-threads: Remove code duplicationPranith Kumar K2014-02-243-1896/+561
| | | | | | | | | Change-Id: Ic905cc6074c796efce2972857b79ab53700a2de4 BUG: 1065657 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/7010 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Check for ctx before dereferencing it.Raghavendra Talur2014-02-201-6/+8
| | | | | | | | | | | Fix for coverity CID: 1175010 & 1175011 Change-Id: Ib894fadf94c36704166ac0e2a3b6febf9b3fe446 BUG: 789278 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/7025 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* rpc/socket: Avoid excessive INFO logs when SSL is not configured.Vijay Bellur2014-02-201-2/+4
| | | | | | | | | Change-Id: I7f4dd2ae4225c8d3783417d0c3d415178f04c0da BUG: 1067011 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/7031 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* build: Don't discard CFLAGS in configureKaushal M2014-02-201-2/+2
| | | | | | | | | | | | | | | | | | | The configure script was discarding the passed CFLAGS inadvertently. This caused failures while building rpms on epel7 and fedora-{19,20}, as the hardened CFLAGS passed by rpmbuild on these distros were discarded which lead to the failure of rpmbuild. Thanks to Neils de Vos for helping track this down. Change-Id: I5b2aa5d449d13bf67df6c19cda178bddfe6c3652 BUG: 1066385 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/7029 Reviewed-by: Justin Clift <jclift@redhat.com> Tested-by: Justin Clift <jclift@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Changed Amar's email address to his gmail oneJustin Clift2014-02-191-2/+2
| | | | | | | Change-Id: Ia4a3d4f3e1be6dfcf0c23e8d481475927e3605da Reviewed-on: http://review.gluster.org/7133 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* protocol/auth: Fix a possible double free.Raghavendra Talur2014-02-191-0/+1
| | | | | | | | | | | | | | Assign NULL to addr_cpy to avoid double free. Fix for coverity CID: 1124891 Change-Id: I0cd6721f066170190d8b5441ecdbc1704ed5e75b BUG: 789278 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/6993 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libgfapi: In glfs_resolve_at(), do not override the previous return value.Poornima G2014-02-191-1/+3
| | | | | | | | | | | | | | | Overriding ret to contain glfs_loc_touchup()s' return value implies that if glfs_loc_touchup() is successful, glfs_resolve_at() is also successful which is not necessarily true. This was causing glfs_resolve_at() to succeed even if it couldn't resolve, thus create and other fops would fail. Hence overriding ret only if glfs_loc_touchup() fails. Change-Id: I0804afbd120b3798abe07e870bfc40bf162bc289 BUG: 1066837 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/7125 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount/fuse: Fix the NULL dereference errors reported by coverity.Poornima2014-02-171-0/+2
| | | | | | | | | Change-Id: I9df57e11b115d7323931735c86b586c0b65fa414 BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6990 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Docs: Fixed few broken link issues in the doc admin_settingup_clients.mdSoumya2014-02-171-3/+3
| | | | | | | | | Signed-off-by: Soumya <skoduri@redhat.com> Change-Id: If01c1a34aaf6a84b3c95d56a9536b38cd9773cbe Reviewed-on: http://review.gluster.org/7009 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* io-cache: Unlock and then goto out in failure case.Raghavendra Talur2014-02-171-0/+1
| | | | | | | | | | | Fix for coverity bug CID:1124625 Change-Id: I76df453a17f2af7c48a80b6fc0ccd411ab96e371 BUG: 789278 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/6949 Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* protocol/client: conn-id should be unique when lk-heal is offPranith Kumar K2014-02-172-8/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: It was observed that in some cases client disconnects and re-connects before server xlator could detect that a disconnect happened. So it still uses previous fdtable and ltable. But it can so happen that in between disconnect and re-connect an 'unlock' fop may fail because the fds are marked 'bad' in client xlator upon disconnect. Due to this stale locks remain on the brick which lead to hangs/self-heals not happening etc. For the exact bug RCA please look at https://bugzilla.redhat.com/show_bug.cgi?id=1049932#c0 Fix: When lk-heal is not enabled make sure connection-id is different for every setvolume. This will make sure that a previous connection's resources are not re-used in server xlator. Change-Id: Id844aaa76dfcf2740db72533bca53c23b2fe5549 BUG: 1049932 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/6669 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* storage/posix: lgetxattr called with invalid keys on the bricksKaleb S. KEITHLEY2014-02-161-110/+112
| | | | | | | | | | | | | | More invalid keys have crept in since this was fixed. We need a better strategy for avoiding this than the current noticed-in-an-strace... Cleaning tabs while I'm at it. Change-Id: I2ea97f6d1ab2a9fd569b5b5e01a4de891401fb81 BUG: 765202 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/7003 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfsd: Use gf_strdup instead of assigning a literal.Raghavendra Talur2014-02-161-1/+1
| | | | | | | | | | | Fix for coverity bug CID:1124340 Change-Id: Ibf8700bdeaaddade02e63470a773c5fe2aabc645 BUG: 789278 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/6984 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc: Fix a crash due to NULL dereferenceVijay Bellur2014-02-161-2/+2
| | | | | | | | | Change-Id: Ib2bf6dd564fb7e754d5441c96715b65ad2e21441 BUG: 1065611 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/7007 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* protocol/client: Fix the possible resource leaks.Poornima2014-02-151-7/+10
| | | | | | | | | | Change-Id: Ib86dee366f5a6f0971c6472d1fb2c32dbf7f0102 BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6985 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: Free dup_value when error path is taken.Ira Cooper2014-02-141-4/+8
| | | | | | | | | | | | | | | | | When the error path is taken here, the data that was allocated for dup_value is never freed. This patch frees it. Thanks to Kaleb Keithley <kkeithle@redhat.com> for his suggestions on how to fix this. Change-Id: Iad88b9ab035602d15961b46c4954d54d54e0d65e CID: 1124705 BUG: 789278 Signed-off-by: Ira Cooper <ira@samba.org> Reviewed-on: http://review.gluster.org/6780 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* libgfapi: Add proper NULL checksJose A. Rivera2014-02-142-18/+44
| | | | | | | | | | | | | | | | | | Two spots check for NULL after the pointer in question has already been dereferenced. Checked for NULL (and set errno when needed) at appripriate spots, added a few NULL checks further up the stack, and some whitespace cleanup. BUG: 789278 CID: 1124800 CID: 1124805 Change-Id: I1dd4ad3f285cca36f4e3f739288f154ec120aebb Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-on: http://review.gluster.org/6908 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterfsd: Check for NULL before dereference.Jose A. Rivera2014-02-141-1/+2
| | | | | | | | | | | BUG: 789278 CID: 1124805 Change-Id: I5926a4e59790f142d65f034726c9c369c2ad7808 Signed-off-by: Jose A. Rivera <jarrpa@redhat.com> Reviewed-on: http://review.gluster.org/6909 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd/Vol-Locks : Moving globals into glusterd priv and code refactoringAvra Sengupta2014-02-1410-102/+295
| | | | | | | | | | | | | | | | | | | | | | Moved globals(vol_lock and txn_opinfo dicts and global_txn_id) into glusterd priv Moved glusterd_op_send_cli_response() out of gd_unlock_op_phase as gd_unlock_op_phase and glusterd_clear_txn_opinfo should only be called if the txn id has been successfully generated. The cli resp should be sent irrespective of that. Changed log levels from ERROR to WARNING for some volume lock logs where the logs are expected and is not an error Added logs for better transparency of transaction ids. Change-Id: Ifac9b23aa9f1648c9ae252cfd3ac50bb2ed46728 BUG: 1011470 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/6976 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* add build-gfid option to enable pgfid tracking ...Krishnan Parthasarathi2014-02-144-4/+55
| | | | | | | | | | | .. for inode to pathname mapping Change-Id: I0486d85b02e86d739fc1d8ea16d118fb666abf60 BUG: 1064863 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/6989 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Removed the old and unused non-Glupy Python bindings codeJustin Clift2014-02-138-540/+0
| | | | | | | | BUG: 1064096 Change-Id: Ifd34f46f0f0b45bbc27d35953e6ecbca36753886 Signed-off-by: Justin Clift <jclift@redhat.com> Reviewed-on: http://review.gluster.org/6980 Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* Clean up some weirdness with the gf_resolve inet definesJustin Clift2014-02-132-8/+2
| | | | | | | | Change-Id: I6bf6101aa0b5d6624891a8ebed2ac1fec2e11e1c Reviewed-on: http://review.gluster.org/6948 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* syncops: add support for custom PIDAnand Avati2014-02-132-2/+49
| | | | | | | | | | | | AFR self-heal needs to issue syncops with special PID. Extend the custom UID/GID support to include custom PIDs Change-Id: I736c0e177f862b029f203acc87f9eb46c8cb839b BUG: 1021686 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6888 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* storage/posix: calculate checksum only over read dataAnand Avati2014-02-131-2/+2
| | | | | | | | | | | | | | If the last block of a file is not aligned to the requested size, checksum is calculated over junk data in the iobuf. Or it could be zeroes, resulting in a spurious checksum match in self-heal. Change-Id: I41422e08de90013dabfc348ec6fbb8ecdd4f8fb8 BUG: 1021686 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6932 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* core: add @xdata parameter to syncop_[f]removexattr()Anand Avati2014-02-136-13/+15
| | | | | | | | | | | To be used in afr metadata self-heal Change-Id: I8dac4b19d61e331702427eeb5b606aab3d20b328 BUG: 1021686 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/6941 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* Use libglusterfs wrapper to make setxattr portableEmmanuel Dreyfus2014-02-131-3/+4
| | | | | | | | | BUG: 764655 Change-Id: I332922521bef5684f18d5f7b226cb36d5303ae47 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/6982 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/stripe: Fix the possible resource leaks.Poornima2014-02-121-4/+5
| | | | | | | | | Change-Id: Ic6fbc8c843f80edd7458d15229eb72a5609973a5 BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6986 Reviewed-by: Amar Tumballi <amarts@gmail.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* xlators/rot-13: Free memory when returning on error.Christopher R. Hertel2014-02-121-0/+2
| | | | | | | | | | | | | | Added GF_FREE() calls to free allocated memory that was left behind otherwise. BUG: 789278 CID: 1124725 Change-Id: I5aa086d6b13a93e14de50e47e02b0e9813af9572 Signed-off-by: Christopher R. Hertel <crh@redhat.com> Reviewed-on: http://review.gluster.org/6940 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Fix possible leaks on failure code pathSantosh Kumar Pradhan2014-02-122-1/+22
| | | | | | | | | | | | | | | Fix the memory leaks in socket and glusterd in failure code paths reported by Coverity. CIDs: 1124777, 1124781, 124782 Change-Id: I63472c6b5900f308f19e64fc93bf7ed2f7b06ade BUG: 789278 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/6954 Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* geo-rep: Fix gsyncd restart issue.Kotresh H R2014-02-121-7/+111
| | | | | | | | | | | | | | | | | | | | | | | New function 'glusterd_gsync_op_already_set' is written which compares the geo-rep configuration value in gsync.conf with the one sent from cli. The generic function is written to compare op_value for any op_name sent from cli as this issue can happen with any configuration setting other than use-tarssh also. This routine is used to avoid restart of gsyncd if the configuration value is set to same as in gsyncd.conf. Also added error checking when glusterd_gsync_configure fails. Earlier, eventhough 'glusterd_gsync_configure' fails, error was not getting catched and success message was shown. Change-Id: If4dcd0ffc09e6e67c79ba86238f03eff1b7c7645 BUG: 1060797 Signed-off-by: Kotresh H R <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/6897 Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/io-cache: Fix dereferencing of freed pointerPoornima2014-02-121-2/+6
| | | | | | | | | Change-Id: Ic4276c6d76c36f4eb77282dc06d2b8b212b58f08 BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6822 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/stripe: Fix the resource leaks.Poornima2014-02-121-0/+2
| | | | | | | | | Change-Id: Ieb1fe112686f4932a6272a0117c1373e736d5b4e BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6951 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* build: CFLAGS was being polluted by python flagsLuis Pabon2014-02-122-23/+35
| | | | | | | | | | | | | | | | | The CFLAGS were being polluted by the python test for glupy. The test also sets CFLAGS -NDEBUG even when passing --enable-debug to configure. To fix it, the patch now saves the necessary python flags into new makefile flags which can now be used by the glupy Makefile.am. BUG: 1063541 Change-Id: I8546a64b8ad4fe9318a97fb6a2f0c36087be1b29 Signed-off-by: Luis Pabon <lpabon@redhat.com> Reviewed-on: http://review.gluster.org/6957 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Harshavardhana <harsha@harshavardhana.net> Tested-by: Harshavardhana <harsha@harshavardhana.net>
* gfapi: Set log level to GF_LOG_NONE after closing log file in glfs_finiPoornima2014-02-121-3/+4
| | | | | | | | | | | | | | | | | | | Currently any logs that are logged after calling glfs_fini will appear on stderr. Ideally to the end of the glfs_fini all the operations will be complete and there should be no further logging. But it appears that the client translator is still up and prints some log messages even after calling glfs_fini. In this patch the log level is set to GF_LOG_NONE once the log file is closed. This fix is not required if wait for "CHILD_DOWN" event is implemented in glfs_fini. Change-Id: Idde80e9a89f3a5264d02b7e6fc2a84d67550b20a BUG: 1054696 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6726 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount.glusterfs: backward compatible option for root-squashingRaghavendra Bhat2014-02-121-0/+7
| | | | | | | | | Change-Id: I74fa6686cff84cfad4a2587a0061e6bb2beea081 BUG: 954057 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/6975 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* storage/posix: perform chmod after chown.Ravishankar N2014-02-112-6/+51
| | | | | | | | | | | | | | | | | | | | | | | Problem: When a replica brick is added to a volume, set-user-ID and set-group-ID permission bits of files are not set correctly in the new brick. The issue is in the posix_setattr() call where we do a chmod followed by a chown. But according to the man pages for chown: When the owner or group of an executable file are changed by an unprivileged user the S_ISUID and S_ISGID mode bits are cleared. POSIX does not specify whether this also should happen when root does the chown(). Fix: Swap the chmod and chown calls in posix_setattr() Change-Id: I094e47a995c210d2fdbc23ae7a5718286e7a9cf8 BUG: 1058797 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/6862 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* gNFS: Coverity fix for possible memory leakSantosh Kumar Pradhan2014-02-111-3/+7
| | | | | | | | | | | | | | | | | | | | In nfs_gfid_dict(), if dict_new() fails, the control goes to out: block and dyngfid resource (dynamically allocated by GF_CALLOC()) is leaked. Add a validation for memory returned by GF_CALLOC() Drop unnecessary "goto" statements Coverity CID: 1124764 Change-Id: Idda7923cc1c32260b3353f7a9141aa1cf43e4fe1 BUG: 789278 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/6852 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* dht: Modified dht-statedump to print all subvolume_statusVenkatesh Somyajulu2014-02-111-12/+33
| | | | | | | | | | | Change-Id: I1aae33472bd15fc2bd7a170544f2994534fdf246 BUG: 1058204 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/6800 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* libglusterfs/client_t.c: rhel5/i386 atomic, link failureKaleb S. KEITHLEY2014-02-111-40/+26
| | | | | | | | | | | RHEL5's gcc-4.1.2 on i386 does not have built-in atomic __sync_*() Change-Id: If7b1027570a6c8c962392871b002be0a37258ed3 BUG: 1060703 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/6894 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* protocol/server: do not do root-squashing for trusted clientsRaghavendra Bhat2014-02-1017-9/+406
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * As of now clients mounting within the storage pool using that machine's ip/hostname are trusted clients (i.e clients local to the glusterd). * Be careful when the request itself comes in as nfsnobody (ex: posix tests). So move the squashing part to protocol/server when it creates a new frame for the request, instead of auth part of rpc layer. * For nfs servers do root-squashing without checking if it is trusted client, as all the nfs servers would be running within the storage pool, hence will be trusted clients for the bricks. * Provide one more option for mounting which actually says root-squash should/should not happen. This value is given priority only for the trusted clients. For non trusted clients, the volume option takes the priority. But for trusted clients if root-squash should not happen, then they have to be mounted with root-squash=no option. (This is done because by default blocking root-squashing for the trusted clients will cause problems for smb and UFO clients for which the requests have to be squashed if the option is enabled). * For geo-replication and defrag clients do not do root-squashing. * Introduce a new option in open-behind for doing read after successful open. Change-Id: I8a8359840313dffc34824f3ea80a9c48375067f0 BUG: 954057 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4863 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Volume locks and transaction specific opinfosAvra Sengupta2014-02-1026-250/+2329
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With this patch we are replacing the existing cluster-wide lock taken on glusterds across the cluster, with volume locks which are also taken on glusterds across the cluster, but are volume specific. So with the volume locks we are able to perform more than one gluster operation at the same time, as long as the operations are being performed on different volumes. We maintain a global list of volume-locks (using a dict for a list) where the key is the volume name, and which saves the uuid of the originator glusterd. These locks are held and released per volume transaction. In order to acheive multiple gluster operations occuring at the same time, we also separate opinfos in the op-state-machine, as a part of this patch. To do so, we generate a unique transaction-id (uuid) per gluster transaction. An opinfo is then associated with this transaction id, which is used throughout the transaction. We maintain a run-time global list(using a dict) of transaction-ids, and their respective opinfos to achieve this. Upstream Feature Page: http://www.gluster.org/community/documentation/index.php/Features/glusterd-volume-locks Change-Id: Iaad505a854bac8de8f83beec0357eb6cde3f7ea8 BUG: 1011470 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/5994 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* geo-rep: Config file upgradeAravinda VK2014-02-102-1/+55
| | | | | | | | | | | | | | | | | | | When old config file is used with new geo-rep, config item like 'georep_session_working_dir' was missing in old config file. With this patch geo-rep sets the default value for new items. Following config options supported: - georep_session_working_dir - gluster_params - ssh_command_tar BUG: 1036539 Change-Id: I389c62e749f3b567f9ecf96d4b41367ef962c025 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/6934 Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* performance/io-cache: Fix for the bugs reported by coverityPoornima2014-02-101-0/+2
| | | | | | | | | | Change-Id: I24c10d874511a2f24dda2fb84d31f5074da1616f BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6869 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* features/quota: Fix NULL dereference error reported by coverity.Poornima2014-02-101-0/+4
| | | | | | | | | Change-Id: I48c1ebcb3261fa5da721e5b48d17c6c873df256d BUG: 789278 Signed-off-by: Poornima <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/6907 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* spec: geo-rep: Include hooks and upgrade scriptsAravinda VK2014-02-102-0/+30
| | | | | | | | | | | | | | Added hook script S56glusterd-geo-rep-create-post.sh to %{_sharedstatedir}/glusterd/hooks/1/gsync-create/post/ and upgrade scripts added to %{_datadir}/glusterfs/scripts/ BUG: 1036539 Change-Id: Id114b827824e55516181ab8f564d419c258be3e2 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/6926 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/afr: goto statements may cause exit before memory is freed.Christopher R. Hertel2014-02-101-9/+28
| | | | | | | | | | | | | | | | | | | | | | | Memory is allocated for pump_priv and for pump_priv->resume_path, but if an error is detected the references to that memory go out of scope and the memory is never freed. This patch assures that the memory is freed on error. Patchset 2: These are Kaleb's recommended changes which, compared to my original fix, are more comprehensive and provide a more complete resolution to the memory leakage bugs in this function. The bug reported by Coverity was limited to a single memory allocation. BUG: 789278 CID: 1124737 Change-Id: Ie239e3b5d28d97308bf948efec6a92f107bc648b Signed-off-by: Christopher R. Hertel <crh@redhat.com> Reviewed-on: http://review.gluster.org/6929 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>