summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* extras: prevent "glusterd dead but subsys locked"Niels de Vos2013-05-251-1/+0
| | | | | | | | | | | | | | | | | | | | | Commit b5bf14a6 added support for a file under /var/lock/subsys, Hoewever, killproc does remove the $PIDFILE which cases subsequent checks on its existence to fail. When glusterd was stopped successfully, the $PIDFILE has been removed already, there is no need to try to remove is again. Upon executing '/sbin/service glusterd status', the message 'glusterd dead but subsys locked' would be returned because the file under /var/lock/subsys was not removed. Bug: 960476 Change-Id: I781fe463e3c5472e42d668155cee4f63d349a568 Reported-by: Satheesaran Sundaramoorthi <sasundar@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/5074 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* gfapi: ignore NULL and -1 parameters in glfs_set_logging()Anand Avati2013-05-251-5/+8
| | | | | | | | | | | | Permit changing either logfile or level by specifying the other as -1 or NULL respectively. Change-Id: I7df05db7b613c57e0106a5cce846ae26d2a160d4 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5085 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* pkg-config: present API version and not package versionAnand Avati2013-05-251-1/+2
| | | | | | | | | | | | | | | | | | | This way PKG_MODULE() autoconf test checks for required API rather than release version (e.g required API could be in all all of 3.4.5, 3.5.1, 3.6.4 etc.) With the first "release" of gfapi, the current version (4) will be frozen. Version 3 is sufficient for QEMU's requirement. Version 4 is necessary for Samba VFS Change-Id: Iada3a4c88b9c67413dcd57004fd8a62926a21b42 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4932 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gfapi: provide stable st_dev in stat structureAnand Avati2013-05-253-4/+16
| | | | | | | | | | | | | Samba depends on st_dev being unique and stable for different filesystems (it uses st_dev+st_ino as key to store metadata of a file). Change-Id: Ia022fabadfb5ef3fc9724c1b1ca86f1a20f98af9 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5045 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* dht,posix: support for case discoveryAnand Avati2013-05-253-0/+140
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is support for discovering a filename in a given directory which has a case insensitive match of a given name. It is implemented as a virtual extended attribute on the directory where the required filename is specified in the key. E.g: sh# getfattr -e "text" -n user.glusterfs.get_real_filename:FiLe-B /mnt/samba/patchy getfattr: Removing leading '/' from absolute path names # file: mnt/samba/patchy user.glusterfs.get_real_filename:FiLe-B="file-b" In reality, there can be multiple "answers" as the backend filesystem is case sensitive and there can be multiple files which can strcasecamp() successfully. In this case we pick the first matched file from the first responding server. If a matching file does not exist, we return ENOENT (and NOT ENODATA). This way the caller can differentiate between "unsupported" glusterfs API and file not existing. This API is used by Samba VFS to perform efficient discovery of the real filename without doing a full scan at the Samba level. Change-Id: I53054c4067cba69e585fd0bbce004495bc6e39e8 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4941 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gfapi: link inodes in relevant entry FOPsAnand Avati2013-05-254-15/+105
| | | | | | | | | | | | Do not let inode linking to happen only in lookup(). While that works, it is inefficient. Change-Id: I51bbfb6255ec4324ab17ff00566375f49d120c06 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4931 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* syncop: copy inode pointer in readdirplusAnand Avati2013-05-251-0/+2
| | | | | | | | | Change-Id: I9ab2b8ac2da9fe13f56b8b08f715a0b603ece0cb BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4930 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* md-cache: support negative xattr entriesAnand Avati2013-05-251-10/+31
| | | | | | | | | | | | | | | Add support for negative xattr caching. For this, we need to fetch xattrs in every opportunity (including readdirplus) in order to treat missing key in cached dict as negative entry. This is crucial to detect missing ACL xattrs in Samba workload. Change-Id: I918a2ef4ab804724256f7546b15e808332ed518d BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4929 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gfapi: optimistic resolution with ESTALE detectionAnand Avati2013-05-253-60/+248
| | | | | | | | | | | | | | | | | | | Enhance the path resolver to be optimistic. Instead of performing a wasteful ->lookup() fop for every component in every API call, build in speculation logic to consider the previous resolution result temporarily, and if it results in ESTALE either later in the path resolution or in the FOP, then retry resolution with ->lookup() at every level and retry the FOP. This is the same optimistic resolution/retry logic Linux kernel resolver is proposing to use. Change-Id: Iecbc25248754caf0915cd7205910563ff88ce5e7 BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4928 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cluster/dht: Ignore decommissioned subvol in overlap optimizationshishir gowda2013-05-241-0/+7
| | | | | | | | | | Change-Id: Ib727948c6e21b19fd509f258ff0aea1c5d1a84d1 BUG: 966845 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.org/5056 Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* nfs: Unable to resolve FHRajesh Joseph2013-05-241-10/+8
| | | | | | | | | | | | | | | | | | | | Bug (965435): while deleting files/directory from multiple machines nfs server logs show "Unable to resolve FH" error. Cause: The error is shown whenever the server receives rmdir/remove call and the file/directory is already deleted. Server always shows "Unable to resolve FH" irrespective of what is the actual error. Fix: The error message seems little misleading therefore changed the error message to display the actual cause. Change-Id: I4f9c151f737317d618278c59d9f66fe9f46350b8 BUG: 965435 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/5057 Reviewed-by: Santosh Pradhan <spradhan@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Give up biglock during rpc conn cleanupKrishnan Parthasarathi2013-05-231-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | glusterd could deadlock after a peer-detach command as follows, 1) glusterd_friend_cleanup function 'flushes' out messages in the rpc layer's queue, that haven't received a response. At this point, glusterd has already acquired the big lock. 2) The side-effect of flushing out the messages is that the corresponding call backs are called. Call backs themselves are executed after acquiring the big lock. This results in the big lock being acquired in a nested manner (in the same thread), which causes a deadlock. This can also happen during brick/NFS/SHD disconnect in volume-stop. Change-Id: Iab3aad143cd8ebbab53ea0b69687f0e7627dc8a9 BUG: 965533 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/5061 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* tests: Change 'volume create' to 'volume create force'John Smith2013-05-231-4/+6
| | | | | | | | | | | Using 'force' when creating volumes prevents errors when creating bricks in the root partition. This fixes test bug-823081.t for bug-962226 Change-Id: I00996e1ab76713084076507d0aebdb65edc806c8 BUG: 962226 Signed-off-by: John Smith <lbalbalba@gmail.com> Reviewed-on: http://review.gluster.org/5036 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com>
* rpm: automatically load the fuse module on EL5Niels de Vos2013-05-223-4/+16
| | | | | | | | | | | | | | | | | | | | | | | The fuse module needs to be loaded before /dev/fuse can be used. On RHEL6 and Fedora the module is loaded on demand. RHEL5 needs to load the module manually. This change add a script under /etc/sysconfig/modules/ that loads the fuse module on boot and packages it in the EL5 version of glusterfs-fuse. One of the features of GlusterFS is to not depend on additional fuse userspace. The conditional requires on /usr/bin/fusermount is not needed, this command is never called in the current version (even though is it referenced in the sources). Change-Id: I77028dade54771cb49cea68a517100f73763dc85 BUG: 947830 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/5070 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* xlator: NULL terminate volume_options structSantosh Kumar Pradhan2013-05-222-5/+7
| | | | | | | | | | | | | | | | | Problem: volume_options struct for open-behind and quick-read xlators were not NULL terminated. Fix: Make them NULL terminated. Change-Id: I2615a1f15c6e5674030a219a99ddf91596bf346b BUG: 965995 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/5064 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* syncop: synctask shouldn't yawn, it could miss a 'wake'Krishnan Parthasarathi2013-05-212-26/+6
| | | | | | | | | Change-Id: I7731fd33ca0c925cc52f8d105275b44fc625a1e2 BUG: 948686 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/5058 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* md-cache: Make options structure NULL terminated.Krishnan Parthasarathi2013-05-201-0/+1
| | | | | | | | | Change-Id: I8aa4f90ba7e1eecf3f978be04f8550049275464f BUG: 765785 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4994 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* syncop: Remove task from syncbarrier's waitq before 'wake'Krishnan Parthasarathi2013-05-201-7/+5
| | | | | | | | | | | | | | | | Removing task from syncbarrier's waitq after wake could result in a subsequent syncbarrier_wake, wake'ing up the already running task. This fix makes the removal from waitq and wake 'atomic' The root cause and the fix are similar in spirit to what was observed in synclock's waitq implementation. Change-Id: I7dd9e6ad5945742bcda20eb5a06a9376bb18528e BUG: 948686 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/5047 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* quick-read: prune cache on write/[f]truncateAnand Avati2013-05-201-0/+43
| | | | | | | | | | | | | Cache needs to be pruned on write and [f]truncate. The lack of this is causing Samba ping-pong test to return wierd 'data increment' values during startup. Change-Id: I9cd6a839bcd02de738d78638211b78f382f58e0a BUG: 953694 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/5033 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: Increase wait time for nfs mount.Vijay Bellur2013-05-201-2/+5
| | | | | | | | | Change-Id: I61815b502c90314ea6924e3046fb9b396ff56e8b BUG: 927616 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5050 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* syncop: Update synctask state appropriatelyKrishnan Parthasarathi2013-05-202-2/+5
| | | | | | | | | | | | | | | | | | | | * Earlier, SYNCOP macro, the only consumer of synctask_yield, would set the task->state to SYNCTASK_SUSPEND. Today, we have glusterd having its own wrapper macros which don't set task's state. There is also the syncbarrier and synclock framework, which also participate in a synctask's scheduling (and need to keep a task's state up to date). It only makes more sense to leave a synctask's state to the synctask library, since its an internal affair. * Need to 'yawn' before 'yield' to avoid re-running tasks to set task->woken appropriately. Change-Id: Ic7a59e6ebcc46f03e53223ca237668d45a3cba40 BUG: 948686 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4985 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* configure.ac: build glupy with installed pythonKaleb S. KEITHLEY2013-05-194-28/+24
| | | | | | | | | | | | | | IOW with more than just python2.6. Python2.7 is certainly what's on the vast majority of non-RHEL systems that are out there. Also our rpm.t regression test will build on epel-5 under mock; RHEL5 has Python2.4. Change-Id: I09c95c1fb6b3498e910ad239c4f0af7f786c3700 BUG: 961856 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/5007 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* configure.ac: enable-debug change breaks _hardened_buildKaleb S. KEITHLEY2013-05-191-7/+5
| | | | | | | | | | | | | | | See RHBZ 955283, and http://fedoraproject.org/wiki/Packaging:Guidelines#PIE The previous change for BZ 851092 in commit 058a736f9e36238c284ca80e7ed5f62434655019 breaks the ability to enable _hardened_build in release-3.4 and master BUG: 851092 Change-Id: Ib298a492fee22dd82042af704fe8cdd34c3e100e Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/4998 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Tests: changing calls from 'fstat' to 'fstat64' fixes these tests on 32 bit ↵John Smith2013-05-193-6/+6
| | | | | | | | | | | platforms: bug-858242.t, bug-808400*.t Change-Id: Ifd85c711a8d16eb3ef17bd1c585acdc34121b12d BUG: 962226 Signed-off-by: John Smith <lbalbalba@gmail.com> Reviewed-on: http://review.gluster.org/5034 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* rpc-transport/rdma: reap async events in a dedicated thread.Raghavendra G2013-05-172-2/+52
| | | | | | | | | | | | * Also sets srq_limit of srq to 10, so that we'll receive an event when we are about to empty the receive buffer list. BUG: 765051 Change-Id: I5436166ea21fc963ee15088fc2df743ec4b96ba7 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.org/4378 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* rpc-transport/rdma: use rdma-cm for connection establishment.Raghavendra G2013-05-177-1739/+1174
| | | | | | | | | | | | Till now gluster used tcp/ip based communication channel with gluster specific protocol to exchange infiniband addresses. Change-Id: I9de4db398a0e2af51d3d2d68c2fe42168102b190 BUG: 765051 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.org/149 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* locks: fix leaking entrylk lock structureAnand Avati2013-05-161-0/+2
| | | | | | | | | | | | | When entrylk lock requests are blocked and granted aysnchronously, the entrylk lock structure was getting leaked. Change-Id: Ie3f29f550730189f27745d991b029e50c63e63da BUG: 962350 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4991 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/dht: Don't do extra unref in dht-migration checksPranith Kumar K2013-05-162-5/+36
| | | | | | | | | | | | | | | | | | | Problem: syncop_open used to perform a ref in syncop_open_cbk so the extra unref was needed but now syncop_open_cbk does not take a ref so no need to do extra unref. Fix: remove the extra fd_unref and let dht_local_wipe do the final unref. Change-Id: Ibe8f9a678d456a0c7bff175306068b5cd297ecc4 BUG: 961615 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4974 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: Set op_errstr to error string received from peerKrutika Dhananjay2013-05-161-0/+4
| | | | | | | | | | | | ... in case of volume op failure on remote host Change-Id: I7177dc02369dffa82f217496559532d18b7c7c7a BUG: 963628 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/5018 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* client: Reset remote-port on first disconnect from brickKrishnan Parthasarathi2013-05-161-5/+9
| | | | | | | | | | Change-Id: I8940358788a7c4f8be81d705749f668a43422b8e BUG: 962930 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4988 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* rpc-transport: Moved unix socket options function to rpc-transportKrishnan Parthasarathi2013-05-166-66/+67
| | | | | | | | | | | | | This change removes the asymmetry in the 'layer' (read rpc, transport etc) in which transport options were being filled for inet and unix sockets. Change-Id: Iaa080691fd5e4c3baedffa97e9c3f16642c1fc12 BUG: 955919 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4850 Reviewed-by: Raghavendra G <raghavendra@gluster.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: Fix misleading log messages of the kind "Node <n> responded to <n>"Krutika Dhananjay2013-05-163-10/+13
| | | | | | | | | | | | | | | | | | | | | PROBLEM: glusterd logs coming from glusterd_xfer_friend_add_resp() (wrongly) indicate that a node responded to itself, although it actually responded to one of its peers. FIX: Make glusterd_xfer_friend_add_resp() distinguish between remote host and self and print the appropriate hostname. Change-Id: I2a504eeb058c08a0d378443888eb6f1dc7edc76f BUG: 963537 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/5017 Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: Start bricks on glusterd startup, only onceKrishnan Parthasarathi2013-05-154-5/+7
| | | | | | | | | | | | | | | The restarting of bricks has been deffered until the cluster 'stabilizes' itself volumes' view. Since glusterd_spawn_daemons is executed everytime a peer 'joins' the cluster, it may inadvertently restart bricks that were taken offline for say, maintenance purposes. This fix avoids that. Change-Id: Ic2a0a9657eb95c82d03cf5eb893322cf55c44eba BUG: 960190 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4973 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* syncop: Remove task from synclock's waitq before 'wake'Krishnan Parthasarathi2013-05-151-6/+6
| | | | | | | | | | | | | Removing task from synclock's waitq after wake could result in a subsequent unlock, wake'ing up the already running task. This fix makes the removal from waitq and wake 'atomic'. Change-Id: Ie51ccf9d38f2cee84471097644aab95496f488b1 BUG: 948686 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4987 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* tests: Ensure portmap registration before nfs mount.Vijay Bellur2013-05-151-1/+6
| | | | | | | | | Change-Id: I12a660a7dfbe4a2d0428910d762434043395fe02 BUG: 927616 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/5012 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* tests: basic/rpm.t leaves /var/tmp/rpm-tests.* directoriesKaleb S. KEITHLEY2013-05-151-0/+1
| | | | | | | | | | | | When the test is terminated early because nothing changed that requires this test, the /var/tmp/rpm-tests.xxxxxx is not removed. BUG: 963333 Change-Id: I98d44ca34f14d62da9d836c41a9015cfb520ff96 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/5015 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount/fuse: enable fuse real async dio when availableBrian Foster2013-05-153-0/+9
| | | | | | | | | | | | | | | | | | | | | fuse has support for optimized async. direct I/O handling via the FUSE_ASYNC_DIO init flag. Enable FUSE_ASYNC_DIO when advertised by fuse. performance/write-behind: fix dio hang Also fix a hang observed during aio-stress testing due to conflicting request handling in write-behind. Overlapping requests are skipped in pick_winds and may never continue when the conflicting write in progress returns. Add a wb_process_queue() call after a non-wb request completes to keep the queue moving. BUG: 963258 Change-Id: Ifba6e8aba7a7790b288a32067706b75f263105d4 Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.org/5014 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glupy patch by Ram, Justin: Add/Modify fops, structure types, utility fnsRam Raja2013-05-138-162/+3773
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Extend the following fops with Python: * open * readv * writev * opendir * readdir * readdirp * stat * fstat * statfs * setxattr * getxattr * fsetxattr * fgetxattr * removexattr * fremovexattr * link * unlink * readlink * symlink * mkdir * rmdir Add fd_t, inode_t and iatt_t structure types. Modify loc_t structure type; Alter the data types of the following attributes - inode, parent, gfid, pargfid. Modify uuid2str function, which returns a string equivalent for a ctype object representing a gfid, to make use of python's 'uuid' module for accurate representation of uuids. by Justin Clift: Adjust debug-trace.py to work with Python 2.6 Work around 'zero length field name in format' bug in negative.py's uuid2str function Fix indentation errors in negative.py, glupy.h, glupy.c, gluster.py Change-Id: If0fcfb2866e21c0380a973f8ffab9ea7b6a4cd5d BUG: 961856 Signed-off-by: Ram Raja <rraja@redhat.com> Reviewed-on: http://review.gluster.org/4907 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Justin Clift <jclift@redhat.com> Tested-by: Justin Clift <jclift@redhat.com>
* glusterd: Perform NULL check on rsp.op_errstr before using itKrutika Dhananjay2013-05-131-1/+1
| | | | | | | | | | Change-Id: Id18b215a91cf016964ea98d2f414293b82167d24 BUG: 962362 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4992 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* rpcsvc: fix dangerous setting of pointer on free'd structureAnand Avati2013-05-131-1/+0
| | | | | | | | | | | | | | | | | | | | The current code is setting @req->hdr_iobuf = NULL _after_ calling actor_fn() on @req. Calling actor_fn() takes away all guarantees of whether @req is still a valid object or destroyed. Unfortunately most of the times the object is allocated from mem-pool an a mem_put() still keeps the arena allocated (no crash). However once the mem-pool is full and allocation falls back to malloc()/free() the code actually becomes dangerous. This resulted in random crashes when the system load is high (when there were sufficient outstanding calls that @rpc pool got full) Change-Id: I4398c717aa0e2c5f06733212b64dd79e7b2a4136 BUG: 884452 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4990 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: remove-brick: prevent removal from a replicate volume.Ravishankar N2013-05-133-2/+58
| | | | | | | | | | | | Prevent the removal of brick(s) from a plain replicate volume and display the error message at the CLI. Change-Id: I8e182404564147329d8cd364b7c7931d19f14570 BUG: 961669 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/4975 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: Fix uuid to hostname conversion for 'volume status'Kaushal M2013-05-121-3/+4
| | | | | | | | | | Change-Id: I46c41c29c2d11652f6d8ccd5637be0ac9774fc1d BUG: 927648 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4873 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Set op-version on startup based on install statusKaushal M2013-05-121-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | If the current installation of glusterfs doesn't have a stored op-version and is, a. a fresh install, then set op-version to maximum b. an upgrade from release which didn't have op-version support, set it to minimum. The install status is detected using the peer-uuid. If both peer-uuid and op-version are not present in the store, the installation is fresh. If peer-uuid is present, but op-version is absent in the store, the installation has been upgraded from a version which didn't support op-versions. By setting the initial op-version as above, we can ensure that a. features are not enabled accidentally during upgrades b. a fresh install starts with all possible features enabled. Change-Id: I52aed9ebeb5d3823c81e65f739a78a924ecf7e12 BUG: 954256 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4867 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glupy: Importing Jeff's glupy project into glusterfsRam Raja2013-05-1011-1/+789
| | | | | | | | | | Change-Id: I3891ef6eaf6ede7c8cbedc3298ce2501a69b2b05 BUG: 961856 Original-author: Jeff Darcy <jdarcy@redhat.com> Signed-off-by: Ram Raja <rraja@redhat.com> Reviewed-on: http://review.gluster.org/4906 Reviewed-by: Justin Clift <jclift@redhat.com> Tested-by: Justin Clift <jclift@redhat.com>
* object-storage: final removal of ufo codePeter Portante2013-05-1060-5907/+2
| | | | | | | | | | | | | | | | | | | See https://git.gluster.org/gluster-swift.git for the new location of the Gluster-Swift code. With this patch, no OpenStack Swift related RPMs are constructed. This patch also removes the unused code that references the user.ufo-test xattr key in the DHT translator. Change-Id: I2da32642cbd777737a41c5f9f6d33f059c85a2c1 BUG: 961902 (https://bugzilla.redhat.com/show_bug.cgi?id=961902) Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4970 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Luis Pabon <lpabon@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* gluster/CLI: crash upon executing "peer status" commandSantosh Kumar Pradhan2013-05-101-0/+9
| | | | | | | | | | | | | | | | | | | | | | | Problem: While doing "gluster peer status", cli_cmd_peer_status_cbk() creates the frame and passes as arg to gf_cli_list_friends() which sets frame->local to GF_CLI_LIST_PEERS flag (value: 0x1). It expects gf_cli_list_friends_cbk() [invoked through cli_cmd_submit()] to reset frame->local to NULL. But if cli_cmd_submit() fails some where before gf_cli_list_friends_cbk() gets invoked, then the flag value remains in frame->local and causes a SEGV while destroying the stack i.e. [CLI_STACK_DESTROY => cli_local_wipe()]. Fix: In gf_cli_list_friends(), if cli_cmd_submit() fails, then reset the value of frame->local to NULL. Change-Id: Ied19f07eaf67e3bd42c75cdc2ff3729b0789e632 BUG: 961691 Signed-off-by: Santosh Kumar Pradhan <spradhan@redhat.com> Reviewed-on: http://review.gluster.org/4976 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Give up big lock before performing any RPCKrishnan Parthasarathi2013-05-071-1/+13
| | | | | | | | | Change-Id: Ib0a772dc1cb9afc8adccd8f7092f480d2b525ea0 BUG: 960580 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4964 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nfs3-server: call truncate fop only if necessaryMichael Brown2013-05-071-1/+2
| | | | | | | | | | | * nfs3svc_setattr_cbk: only truncate if requested size != current size Change-Id: I3d89e4d2b0710118f90cf5bf9cfdea61d8877491 BUG: 960725 Signed-off-by: Michael Brown <michael@netdirect.ca> Reviewed-on: http://review.gluster.org/4917 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* extras: /etc/init.d/glusterd should create a lockfile under /var/lock/sybsysNiels de Vos2013-05-071-0/+6
| | | | | | | | | | | | | Without a lockfile under /var/lock/subsys, the glusterd service is not stopped on shutdown or reboot. Change-Id: I9dc9b4204c5c39879c22191b2e8a2b81a4f3a58a BUG: 960476 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/4960 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Club missing entry, missing gfid self-healsPranith Kumar K2013-05-072-45/+50
| | | | | | | | | | | | | | | | | | | | | Problem: gfid-self-heal always assigns the gfid(GFID-1) it gets from lookup. Between the time of lookup to triggering the gfid-self-heal the entry could have changed. Now lets say there is a case where one of the files of the replica subolumes already has a gfid (GFID-2) and the other does not. In that case healing should happen with GFID-2 instead of GFID-1. Fix: Missing-entry-self-heal already handles all these cases. So removed separate handling of gfid-self-heal. Change-Id: Ie96261e9036c8f3cb4cad89347f9bf7b681cdc1a BUG: 767585 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/2670 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>