summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* geo-rep: Unit tests infrastructure for geo-replicationAravinda VK2015-03-028-0/+137
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Added sample unit test file, $GLUSTER_SRC/geo-replication/tests/unit/test_syncdutils.py Install unittest dependencies, (tox https://tox.readthedocs.org/en/latest/, nose https://nose.readthedocs.org/en/latest/) sudo pip install --upgrade tox nose To run pep8 coding standards tests, cd $GLUSTER_SRC/geo-replication tox -e pep8 To run unit tests, cd $GLUSTER_SRC/geo-replication tox -e py27 py27 is for with Python 2.7+, or py26 for systems with Python 2.6+ Change-Id: Ibdefe2c9d73afda9a7fa1c0db5b126f592b7cb40 BUG: 1177722 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/9290 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Prashanth Pai <ppai@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* protocol/client: defer cleanup of private until RPC notifications are handled.Krishnan Parthasarathi2015-03-022-14/+36
| | | | | | | | | | | | | | | | | | | | | This fix is required for glfs_fini to be able to perform fini on client xlators in a graph. We are deferring freeing of client xlator's private until all RPC related resources are destroyed. This guarantees that client xlator would free RPC related resources provided its private structures are still accessible via its this pointer. 'Weak' property: If there are no epoll threads executing after calling fini() on a client xlator, then all its RPC related resources are guaranteed to be freed. We can now free the corresponding 'this' pointer. Change-Id: Ie00b14dda096ac128e1c37e0032f07d17fd701ce BUG: 1093594 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/9680 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* epoll: Fix a leak in slot allocation.Poornima G2015-03-021-1/+3
| | | | | | | | | | | | | | | | | When the slots_used in a table becomes 0, the table will not get reused, leading to a leak. This patch fixes the leak. Change-Id: Ib86826d287368174ea7ebe0d0d64b2dec574634e BUG: 1093594 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/9725 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Prashanth Pai <ppai@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>
* nfs: prevent logging missing 'system.posix_acl_*' xattrsNiels de Vos2015-03-011-1/+4
| | | | | | | | | | | | | | The nfs.log gets spammed with messages that the system.posix_acl_access and system.posix_acl_default xattrs are not set. The logging happens because the dictionary that contains the xattrs is empty/NULL in case the getxattr() did not return any contents for the ACLs. Change-Id: Id31e30635146599915c6d8674a2dde065f348adc BUG: 1197253 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/9773 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Meghana M <mmadhusu@redhat.com>
* epoll: Fix broken RPC throttling due to MT epollShyam2015-03-013-13/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | The RPC throttle which kicks in by setting the poll-in event on a socket to false, is broken with the MT epoll commit. This is due to the event handler of poll-in attempting to read as much out of the socket till it receives an EAGAIN. Which may never happen and hence we would be processing far more RPCs that we want to. This is being fixed by changing the epoll from ET to LT, and reading request by request, so that we honor the throttle. The downside is that we do not drain the socket, but go back to epoll_wait before reading the next request, but when kicking in throttle, we need to anyway and so a busy connection would degrade to LT anyway to maintain the throttle. As a result this change should not cause deviation in the performance much for busy connections. Change-Id: I522d284d2d0f40e1812ab4c1a453c8aec666464c BUG: 1192114 Signed-off-by: Shyam <srangana@redhat.com> Reviewed-on: http://review.gluster.org/9726 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* rpcsvc: New rpc routines defined to send callback requestsSoumya Koduri2015-03-012-0/+47
| | | | | | | | | | | | | Change-Id: I7f95682faada16308314bfbf84298b02d1198efa BUG: 1188184 Signed-off-by: Poornima G <pgurusid@redhat.com> Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/9534 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* nfs: nfs3_stat_to_fattr3() improvementNiels de Vos2015-02-282-51/+47
| | | | | | | | | | | | | | | | During a review of backorti http://review.gluster.org/9170, Kaleb points out: ick, return-by-value. About 50% slower than passing a pointer to the target struct. Change-Id: I4464e6a4e50d82d446a834892d0308332b7c32d0 BUG: 1197142 Reported-by: Kaleb KEITHLEY <kkeithle@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/9772 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* NetBSD Portability fix: use pkill instead of killallEmmanuel Dreyfus2015-02-281-2/+8
| | | | | | | | | | | NetBSD does not have the killall command. BUG: 1129939 Change-Id: Ie022bfb7efd6288ab19050addcfbd2822fbc78c0 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/9771 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* socket: allow only one epoll thread to read msg fragmentsKrishnan Parthasarathi2015-02-273-3/+18
| | | | | | | | | | | | | | | | | __socket_read_reply function releases sock priv->lock briefly for notifying higher layers of message's xid. This could result in other epoll threads that are processing events on this socket to read further fragments of the same message. This may lead to incorrect fragment processing and result in a crash. Change-Id: I915665b2e54ca16f2ad65970e51bf76c65d954a4 BUG: 1197118 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Signed-off-by: Shyam <srangana@redhat.com> Reviewed-on: http://review.gluster.org/9742 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* Tests: At cleanup time, kill rpc.statd on NetBSDEmmanuel Dreyfus2015-02-271-2/+2
| | | | | | | | | | | | The NFS server cannot start is a rpc.statd is still running. Make sure the cleanup procedure remove any leftover rpc.statd. BUG: 1129939 Change-Id: I03c41b18526583f3304321e4e4a27e99b8fbf1f6 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/9770 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* libglusterfs: Moved common functions as utils in syncop/common-utilsPranith Kumar K2015-02-2713-361/+378
| | | | | | | | | | | | | | | These will be used by both afr and ec. Moved syncop_dirfd, syncop_ftw, syncop_dir_scan functions also into syncop-utils.c Change-Id: I467253c74a346e1e292d36a8c1a035775c3aa670 BUG: 1177601 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/9740 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Anuradha Talur <atalur@redhat.com> Reviewed-by: Ravishankar N <ravishankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Tests: give sane default for NetBSD NFS mount retry countEmmanuel Dreyfus2015-02-271-1/+1
| | | | | | | | | | | | | | | | Default NetBSD NFS retry count is 10000, which means tests will loop for a long time if the server is not available. We fix this by setting a default retry count to 2 (1 seems to low and breaks regression). If mount_nfs is called with a retry option, it will overrride this default. BUG: 1129939 Change-Id: I1ae16f8caa74d6e9af1aa7a55fd111178af0ad78 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/9763 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* libgfapi: In glfs_init() set the cwd to "/".Poornima G2015-02-271-0/+5
| | | | | | | | | | | | | | | | | | | | | Initially, when the cwd is NULL, while resolving a relative path, it was taken to be relative from the root of the volume. But this behaviour changed with the patch: http://review.gluster.org/#/c/9671/ with this patch, if cwd is NULL, all the fops on the files (given relative path) under root directory will fail. Hence, setting the cwd to "/" during glfs_init() itself. Change-Id: I65018f6cd42539d09852069b84099034b9925418 BUG: 1196019 Signed-off-by: Poornima G <pgurusid@redhat.com> Reviewed-on: http://review.gluster.org/9744 Reviewed-by: soumya k <skoduri@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cluster/dht: Propagate an event only after hearing the same from all subvolumesAnoop C S2015-02-261-0/+3
| | | | | | | | | | | | | | | | | In dht_notify(), we propagate each event without checking whether all subvolumes have reported the same event earlier. As a result separate events are being forwarded for each dht-subvolume. This change is to make sure that we propagate a particular event only if all other subvolumes have already reported the same event once earlier. Change-Id: I6c73fa105e967f29648af9e2030f91a94f2df130 BUG: 1176543 Signed-off-by: Anoop C S <achiraya@redhat.com> Reviewed-on: http://review.gluster.org/9322 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* dht: fix for dht_lock_count() compile errorNiels de Vos2015-02-262-2/+2
| | | | | | | | | | | | | | | dht-common.h includes a function definition with "inline", but the function is not declared in the header. Dropping the "inline" compile directive so that linking against .o files works correctly. BUG: 1196650 Change-Id: I105be591125b29cd455769b0c4ff22d6e139227d Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/9760 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* rdma: Fix failure to call rdma_bind_addr if unable to bind privileged port.Mark Lipscombe2015-02-261-1/+8
| | | | | | | | | | | | | | | When unable to bind a privileged port, rdma_bind_addr is not called. This patch fixes that. Change-Id: I175884a5d6a08b93dc62653ee0a6622bfc06e618 Bug: 1195907 Signed-off-by: Mark Lipscombe <mlipscombe@gmail.com> Reviewed-on: http://review.gluster.org/9737 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* mgmt/glusterd: Refactor brick graph generation in volgen.Vijay Bellur2015-02-262-280/+564
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit does the following: 1. Adds several new functions for generation of brick xlator units in a volgen. Each such function takes care of generation of only one xlator in volgen. 2. A new table, server_graph_table, links all individual graph generation functions together. The order of xlator function generators in the table determines the topology of the brick graph. 3. server_graph_builder() invokes individual graph generators by walking through server_graph_table. Addition of debug xlators into the brick graph is also handled by this walk. As a result, a lot of cruft that is present in the exisiting implementation of this function gets cleaned up. 4. get_server_xlator() now makes use of server_graph_table to determine whether a xlator key corresponds to a server xlator or not. Change-Id: I46bb6e331544150302eb5b33c4007917aff2586d BUG: 1188196 Signed-off-by: Vijay Bellur <vbellur@redhat.com> Reviewed-on: http://review.gluster.org/9751 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* cluster/dht: serialize execution of dht_discover_complete andRaghavendra G2015-02-251-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | STACK_DESTROY (frame). In the current code, dht_discover_complete can be invoked because of: 1. attempt_unwind is true 2. we are processing reply from the last subvolume In scenario 1, following race is possible: T1: calls dht_frame_return. T2: calls dht_frame_return. This happens to be last call and hence it invokes dht_discover_complete, goes ahead and destroys frame T1: since attempt_unwind is true, calls dht_discover_complete. However, since frame is already freed, call to dht_discover_complete can result in a crash. The fix is to make sure that destruction of the frame is done only by the thread executing dht_discover_complete. Change-Id: I45765b90c4a9d0af0b33f8911b564d99e12d099e BUG: 1195120 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/9729 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: N Balachandran <nbalacha@redhat.com>
* cluster/afr : provide split-brain info by using getxattrAnuradha2015-02-254-0/+141
| | | | | | | | | | | | | | | | | | | | | | This patch is one part to enable users analyze and resolve split-brain. Problem : To know if a file is in data/metadata split-brain Solution : Performing "getfattr -n afr.split-brain-status <path-to-file>" from the mount provides this information. Also provides the list of afr children to analyse to get more information. Change-Id: I4d9b429794759a906371416cb84c84a212e2c7b9 BUG: 1191396 Signed-off-by: Anuradha <atalur@redhat.com> Reviewed-on: http://review.gluster.org/9633 Reviewed-by: Ravishankar N <ravishankar@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* spec: correcting GlusterFS stringHumble Devassy Chirammal2015-02-251-4/+4
| | | | | | | | | | Change-Id: Ia39d81f89cf783016700c8059f6a788029ee1b13 BUG: 1075417 Signed-off-by: Humble Devassy Chirammal <hchiramm@redhat.com> Reviewed-on: http://review.gluster.org/9749 Reviewed-by: Lalatendu Mohanty <lmohanty@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* README: Adding information about Gluster dev workflowLalatendu Mohanty2015-02-254-3/+10
| | | | | | | | | | | | | | | | | | | | In the README.md (which is automatically rendered in github) there is no information about GlusterFS workflow. So community members send pull requests in github. This patch will put the workflow information, so that it would be easy for community members to know about it by looking at GlusterFS's github mirror. Change-Id: I62718f75aa26a45fe28e3e9399d1aa2338211c73 BUG: 1195336 Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com> Reviewed-on: http://review.gluster.org/9727 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Humble Devassy Chirammal <humble.devassy@gmail.com> Tested-by: Humble Devassy Chirammal <humble.devassy@gmail.com>
* features/index: Add option to track specific xattrs for xattrop64Pranith Kumar K2015-02-244-45/+154
| | | | | | | | | | | This enables trusted.ec.dirty to be tracked in index Change-Id: Ief1619110859f6f9ccee3da229f0688b73e2124b BUG: 1177601 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/9602 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Portability fix: rpc.statd locationEmmanuel Dreyfus2015-02-241-1/+5
| | | | | | | | | | | rpc.statd is in /usr/sbin on NetBSD BUG: 1129939 Change-Id: I6d09e2525cc8242ef3d25d3d5421d57aac711ea4 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/9654 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* ec: Add trusted.ec.dirty xattrXavier Hernandez2015-02-238-121/+297
| | | | | | | | | | | | | | | | | This xattr will be incremented before each data modifying operation and decremented after it. This will add the possibility to detect partially updated writes and refuse them on reads. It will also be useful for interacting with index xlator and have a way to heal dispersed files from the self-heal daemon. Change-Id: Ie644a8dd074ae0f254c809c5863bdb030be5486a BUG: 1190581 Signed-off-by: Xavier Hernandez <xhernandez@datalab.es> Reviewed-on: http://review.gluster.org/9607 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd/snapshot: Fix the ret check in gd_restore_snap_volumeAvra Sengupta2015-02-231-2/+3
| | | | | | | | | | | | | | | | | In gd_restore_snap_volume(), irrespective of the ret value we were trying to do a list_add_tail to new_volinfo variable. There might be cases where this variable might be NULL, and hence cause a crash. Change-Id: I158c5ae655ea27c9a91be3cb9d95a80a3dd05559 BUG: 1194538 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/9719 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* libglusterfs: Added support to set 'frame->root->lkowner'Soumya Koduri2015-02-232-0/+46
| | | | | | | | | | | | | | This support can be used by the clients using SYNCOP framework, to pass unique owners for various locks taken on a file, so that the glusterfs-server can treat them as being locks from different owners. Change-Id: Ie88014053af40fc7913ad6c1f7730d54cc44ddab BUG: 1186713 Signed-off-by: Soumya Koduri <skoduri@redhat.com> Reviewed-on: http://review.gluster.org/9482 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com>
* build, glusterd: Add liburcu to build systemKaushal M2015-02-235-6/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds liburcu related checks to the build system and updates the spec file to require 'userspace-rcu'. liburcu >= 0.7 is required to build GlusterFS, but 0.8 and above is preferred. For cases when liburcu 0.7.x is the available version, some function definitions (currently just one) from liburcu-0.8.6 have been made available in /contrib/userspace-rcu/. This change was developed on the git branch at [1]. This commit is a combination of the following commits on the development branch. a5cd6bd Add userspace-rcu checks to configure.ac fe5ced3 Add URCU libs to glusterd libtool flags 1e43302 Add local definition of cds_list_add_tail_rcu for liburcu-0.7 98da755 Move local definition of cds_list_add_tail_rcu into contrib 8c44dfd Update spec file to include userspace-rcu0466e33 Rename rculist-additional.h to rculist-extra.h 947c7b3 Add rculist-extra.h to dist 19f32ad Address review comments 9605/1 [1]: https://github.com/kshlm/glusterfs/tree/urcu Change-Id: Ifbb617d0dacce8fa01214f894badb9d8cdcaf56f BUG: 1191030 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/9605 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* cli: Provide CLI to create disperse volume with data, redundancy countsPranith Kumar K2015-02-233-102/+226
| | | | | | | | | | Change-Id: Iba44be565c895e26b19b5ff85a886873f6b53e5c BUG: 1177601 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/9616 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* gfapi: handle inode_link failures gracefullyRajesh Joseph2015-02-201-1/+9
| | | | | | | | | | | Bug: 1193757 Change-Id: I73bfb91a6a73ad4f06e8828d2d7efd34d9873888 Signed-off-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-on: http://review.gluster.org/9671 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* Fix for test usst.t and bug-1167580-set-proper-uid-and-gid-during-nfs-access.tvmallika2015-02-202-7/+6
| | | | | | | | | | | | | | | | | | | | | testcase usst.t and bug-1167580-set-proper-uid-and-gid-during-nfs-access.t uses below method to generate random string cat /dev/urandom | tr -dc 'a-zA-Z' | fold -w 8 | head -n 1 Doing a cat on /dev/urandom can consume more CPU usage. Change to: uuidgen | tr -dc 'a-zA-Z' | head -c 8 Change-Id: I9cb562557ae860026fb5e140ed9b5e297b4428d9 BUG: 1163543 Signed-off-by: vmallika <vmallika@redhat.com> Reviewed-on: http://review.gluster.org/9703 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd: nfs,shd,quotad,snapd daemons refactoringAtin Mukherjee2015-02-2046-1750/+2809
| | | | | | | | | | | | | This patch ports nfs, shd, quotad & snapd with the approach suggested in http://www.gluster.org/pipermail/gluster-devel/2014-December/043180.html Change-Id: I4ea5b38793f87fc85cc9d2cf873727351dedffd2 BUG: 1191486 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/9428 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Nekkunti <anekkunt@redhat.com>
* cluster/dht: synchronize with other concurrent healers while healing layout.Raghavendra G2015-02-205-41/+562
| | | | | | | | | | | | | | | | | | | | | | | | | | Current layout heal code assumes layout setting is idempotent. This allowed multiple concurrent healers to set the layout without any synchronization. However, this is not the case as different healers can come up with different layout for same directory and making layout setting non-idempotent. So, we bring in synchronization among healers to 1. Not to overwrite an ondisk well-formed layout. 2. Refresh the in-memory layout with the ondisk layout if in-memory layout needs healing and ondisk layout is well formed. This patch can synchronize 1. among multiple healers. 2. among multiple fix-layouts (which extends layout to consider added or removed brick) 3. (but) not between healers and fix-layouts. So, the problem of in-memory stale layouts (not matching with layout ondisk), is not _completely_ fixed by this patch. Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Change-Id: Ia285f25e8d043bb3175c61468d0d11090acee539 BUG: 1176008 Reviewed-on: http://review.gluster.org/9302 Reviewed-by: N Balachandran <nbalacha@redhat.com>
* Storage/posix : Adding error checks in path formationNithya Balachandran2015-02-191-2/+3
| | | | | | | | | | | | | Modified a few log messages added for this fix. Also set the op_errno in an error check. Change-Id: I87caf2f89031aedad1aaee001aef54896dbecd3b BUG: 1113960 Signed-off-by: Nithya Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/9702 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* geo-rep: Add support for non standard AuthorizedKeysFile locationAravinda VK2015-02-191-9/+32
| | | | | | | | | | | | | | | | | | | | | | In /etc/ssh/sshd_config, AuthorizedKeysFile can be customized using %u and %h variables, %u will be replaced by user name and %h will be replaced by home dir name. Default location is .ssh/authorized_keys For example, AuthorizedKeysFile .ssh/authorized_keys AuthorizedKeysFile %h/.my_secret_dir/authorized_keys AuthorizedKeysFile /etc/ssh/keys/%u/authorized_keys PS: Support only added for %h and %u in sshd_config BUG: 1181117 Signed-off-by: Aravinda VK <avishwan@redhat.com> Change-Id: Ic6ba20f9d202762dfdb6d0c73ea42e7f7c64e177 Reviewed-on: http://review.gluster.org/9436 Reviewed-by: Kotresh HR <khiremat@redhat.com> Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
* geo-rep: Archive Changelogs and avoid generating empty XSync changelogsAravinda VK2015-02-192-5/+79
| | | | | | | | | | | | | | | With this patch, - Hybrid Crawl will not generate empty Changelogs - Archives Changelogs when processed(Hybrid(XSync), History, and Changelog Crawl - Passive worker cleans up its processing directory BUG: 1169331 Change-Id: I1383ffaed261cdf50da91b14260b4d43177657d1 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: http://review.gluster.org/9453 Reviewed-by: Venky Shankar <vshankar@redhat.com> Tested-by: Venky Shankar <vshankar@redhat.com>
* posix: Fix unlink failing under specific conditionPrashanth Pai2015-02-192-1/+54
| | | | | | | | | | | | | | | | | | | | PROBLEM: Files are undeletable when these three conditions are met: 1. File does not have trusted.pgfid.<gfid> xattr set. This won't be set when build-pgfid is off (default). 2. File has hardlink count > 1. 3. build-pgfid option is turned on. FIX: Allow unlink on files not having trusted.pgfid.<gfid> xattr. Change-Id: I58a9d9a1b29a0cb07f4959daabbd6dd04fab2b34 BUG: 1122028 Signed-off-by: Prashanth Pai <ppai@redhat.com> Reviewed-on: http://review.gluster.org/8352 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* client/server: fix reconfigure for event-threads optionKrishnan Parthasarathi2015-02-192-29/+27
| | | | | | | | | | | | | Change-Id: Ica8bca13e4feb941e22651b642b848be165ccc9e BUG: 1104462 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/9648 Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* features/quota : Fix XML output for quota list commandSachin Pandit2015-02-194-155/+303
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sample output: --------------- Sample 1) ---------- [root@snapshot-28 glusterfs]# gluster volume quota vol1 list /dir1 /dir4 /dir5 --xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr/> <volQuota> <limit> <path>/dir1</path> <hard_limit>10.0MB</hard_limit> <soft_limit>80%</soft_limit> <used_space>0Bytes</used_space> <avail_space>10.0MB</avail_space> <hl_exceeded>No</hl_exceeded> <sl_exceeded>No</sl_exceeded> </limit> <limit> <path>/dir4</path> <path>No such file or directory</path> </limit> <limit> <path>/dir5</path> <path>No such file or directory</path> </limit> </volQuota> </cliOutput> Sample 2) --------- gluster volume quota vol1 list --xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr/> <volQuota/> </cliOutput> <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <volQuota> <limit> <path>/dir</path> <hard_limit>10.0MB</hard_limit> <soft_limit>80%</soft_limit> <used_space>0Bytes</used_space> <avail_space>10.0MB</avail_space> <hl_exceeded>No</hl_exceeded> <sl_exceeded>No</sl_exceeded> </limit> <limit> <path>/dir1</path> <hard_limit>10.0MB</hard_limit> <soft_limit>80%</soft_limit> <used_space>0Bytes</used_space> <avail_space>10.0MB</avail_space> <hl_exceeded>No</hl_exceeded> <sl_exceeded>No</sl_exceeded> </limit> </volQuota> </cliOutput> Change-Id: I8a8d83cff88f778e5ee01fbca07d9f94c412317a BUG: 1185259 Signed-off-by: Sachin Pandit <spandit@redhat.com> Reviewed-on: http://review.gluster.org/9481 Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* rdma: free rdma priv data if init failsAtin Mukherjee2015-02-191-0/+2
| | | | | | | | | | | Change-Id: I57b38c8783666e806836dacf3f74cf9f6876070a BUG: 1164079 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/9687 Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* Storage/posix : Adding error checks in path formationNithya Balachandran2015-02-187-20/+289
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Renaming directories can cause the size of the buffer required for posix_handle_path to increase between the first call, which calculates the size, and the second call which forms the path in the buffer allocated based on the size calculated in the first call. The path created in the second call overflows the allocated buffer and overwrites the stack causing the brick process to crash. The fix adds a buffer size check to prevent the buffer overflow. It also checks and returns an error if the posix_handle_path call is unable to form the path instead of working on the incomplete path, which is likely to cause subsequent calls using the path to fail with ELOOP. Preventing buffer overflow and handling errors BUG: 1113960 Change-Id: If3d3c1952e297ad14f121f05f90a35baf42923aa Signed-off-by: Nithya Balachandran <nbalacha@redhat.com> Reviewed-on: http://review.gluster.org/9289 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com>
* cli: volume status for tcp,rdma type volume display only tcp portMohammed Rafi KC2015-02-1810-35/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For tcp,rdma type voumes, there will be two ports, one for tcp and one for rdma. But volume status command only display tcp port. By this change, adding an extra column for rdma port and changing the port to tcp port. Eg: >gluster volume status pathy >For tcp,rdma type volume Status of volume: patchy Gluster process TCP Port RDMA Port Online Pid ------------------------------------------------------------------------------ Brick brickname 49152 49153 Y 14158 >For rdma type volume Status of volume: patchy Gluster process TCP Port RDMA Port Online Pid ------------------------------------------------------------------------------ Brick brickname 0 49153 Y 14158 For tcp type volume Status of volume: patchy Gluster process TCP Port RDMA Port Online Pid ------------------------------------------------------------------------------ Brick brickname 49152 0 Y 14158 >gluster volume status patchy detail Status of volume: xcube2 ------------------------------------------------------------------------------ Brick : Brick brickname TCP Port : 49152 RDMA Port : 49153 Online : Y Pid : 14158 File System : ext4 Device : /dev/mapper/luks-2099dd4a-0050-4cae-ad7b-c6a0498c4e88 Mount Options : rw,seclabel,relatime,data=ordered Inode Size : 256 Disk Space Free : 31.1GB Total Disk Space : 47.9GB Inode Count : 3203072 Free Inodes : 2926789 >gluster volume status xcube --xml <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <cliOutput> <opRet>0</opRet> <opErrno>0</opErrno> <opErrstr>(null)</opErrstr> <volStatus> <volumes> <volume> <volName>xcube</volName> <nodeCount>2</nodeCount> <node> <hostname>hostname</hostname> <path>/home/brick1</path> <peerid>2d7bcb95-3d26-4d4f-b3c6-e2ee01b71662</peerid> <status>1</status> <port>49152</port> <ports> <tcp>49152</tcp> <rdma>N/A</rdma> </ports> <pid>5657</pid> </node> <node> <hostname>NFS Server</hostname> <path>localhost</path> <peerid>2d7bcb95-3d26-4d4f-b3c6-e2ee01b71662</peerid> <status>1</status> <port>2049</port> <ports> <tcp>2049</tcp> <rdma>N/A</rdma> </ports> <pid>5665</pid> </node> <tasks/> </volume> </volumes> </volStatus> </cliOutput> Change-Id: I81aab226edbd400d29cd3f510af4f344dd99ba51 BUG: 1164079 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/9191 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* glusterd: Use correct format specifier for dumping peer hostnameAtin Mukherjee2015-02-171-1/+1
| | | | | | | | | | Change-Id: Ifdde4f8256fa463472959078f53d033e5c55207e BUG: 1139682 Signed-off-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-on: http://review.gluster.org/9665 Reviewed-by: Anand Nekkunti <anekkunt@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com>
* rdma: pre-register iobuf_pool with rdma devices.Mohammed Rafi KC2015-02-175-21/+240
| | | | | | | | | | | | | | | | | | registring buffers with rdma device is a time consuming operation. So performing registration in code path will decrease the performance. Using a pre registered memory will give a bettor performance, ie, register iobuf_pool during rdma initialization. For dynamically created arena, we can register with all the device. Change-Id: Ic79183e2efd014c43faf5911fdb6d5cfbcee64ca BUG: 1187456 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/9506 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* cluster/dht: Fix dht_link to follow files under migrationShyam2015-02-172-19/+253
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently if a file is under migration, a hardlink to that file is lost post migration of the file. This is due to the fact that the hard link is created against the cached subvol of the source and as the source is under migration, it shifts to a linkto file post migration. Thus losing the hardlink. This change follows the stat information that triggers a phase1/2 detection for a file under migration, to create the link on the new subvol that the source file is migrating to. Thereby preserving the hard link post migration. NOTES: The test case added create a ~1GB file, so that we can catch the file during migration, smaller files may not capture this state and the test may fail. Even if migration of the file fails, we would only be left with stale linkto files on the subvol that the source was migrating to, which is not a problem. This change would create a double linkto, i.e new target hashed subvol would point to old source cached subol, which would point to the real cached subvol. This double redirection although not handled directly in DHT, works as lookup searches everywhere on hitting linkto files. The downside is that it never heals the new target hashed subvol linkto file, which is another bug to be resolved (does not cause functional impact). Change-Id: I871e6885b15e65e05bfe70a0b0180605493cb534 BUG: 1161311 Signed-off-by: Shyam <srangana@redhat.com> Reviewed-on: http://review.gluster.org/9105 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: N Balachandran <nbalacha@redhat.com> Reviewed-by: susant palai <spalai@redhat.com> Reviewed-by: venkatesh somyajulu <vsomyaju@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* build: .cmd_log_history should be renamed to cmd_history.log post upgrade.Gaurav Kumar Garg2015-02-171-0/+12
| | | | | | | | | | | | | | | | While upgrading from glusterfs-version < 3.6 to glusterfs-3.6, .cmd_log_history hidden file still present in /var/log/glusterfs/ directory. With this fix it will not have .cmd_log_history hidden file and it will rename it to cmd_history.log file. Change-Id: I2c1658056ddd75ce923f100961205a3b78394466 BUG: 1165996 Signed-off-by: Gaurav Kumar Garg <ggarg@redhat.com> Reviewed-on: http://review.gluster.org/9652 Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@redhat.com>
* rdma: reduce log level from E to WMohammed Rafi KC2015-02-175-2/+72
| | | | | | | | | | | | | | glusterd process, when try to initialize default vol file, will always through an error if there is no rdma device. Changing the log levels and log messages to more appropriately. Change-Id: I75b919581c6738446dd2d5bddb7b7658a91efcf4 BUG: 1188232 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/9559 Reviewed-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* rdma:read multiple wr from cq and ack them in one callMohammed Rafi KC2015-02-171-71/+97
| | | | | | | | | | | | | | | we are reading one work completion request at a time from cq, though we can read multiple work completion requests from cq. Also we can acknowledge them in one call itself. Both will give a better performance because of less mutual exclusion locks are being performed. Change-Id: Ib5664cab25c87db7f575d482eee4dcd2b5005c04 BUG: 1164079 Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com> Reviewed-on: http://review.gluster.org/9329 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* feature/gfid-access: Send a named lookup before trying to create a file.Kotresh HR2015-02-162-10/+55
| | | | | | | | | | | | | | | | | | | Normally a named-lookup is done by the kernel on an entry before it issues a dentry creation fop like create/mknod etc. This will enable cluster translators like dht to maintain internal consistency like deleting a linkto file if no corresponding datafile is present etc. While handling file creation on auxiliary gfid mounts, we issue dentry creation fop without issuing a lookup. If there are stale-linkto files, creation would fail with EEXIST, however access would fail since there is no datafile. A named lookup would cleanup the linkto file allowing create to succeed. Change-Id: I2932107296adac710dd179df7d0946b8697a497a BUG: 1191413 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/9634 Reviewed-by: Raghavendra G <rgowdapp@redhat.com> Tested-by: Raghavendra G <rgowdapp@redhat.com>
* glusterd/geo-rep: Allow replace/remove brick if geo-rep is stopped.Kotresh HR2015-02-1610-96/+156
| | | | | | | | | | | | | | | | | | | | | | | | | | Replace brick: If geo-replication was configured on a volume, replace brick used to fail. This patch allows replace brick to go through if all geo-rep sessions corresponding to that volume is stopped. Remove brick: There was no check for geo-replication for remove brick. Enforce 'remove brick commit' to fail if geo-rep session corresponding to volume is running. Allow 'remove brick commit' only if all of the geo-rep sessions corresponding to that volume is stopped. Code is re-organized for better readability. Change-Id: I02282c2764d8b81e319489c977847e6e437511a4 BUG: 1179638 Signed-off-by: Kotresh HR <khiremat@redhat.com> Reviewed-on: http://review.gluster.org/9402 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Aravinda VK <avishwan@redhat.com> Reviewed-by: ajeet jha <ajha@redhat.com> Reviewed-by: Avra Sengupta <asengupt@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
* cluster/dht: Modify dht-rebalance.c to use trusted.distribute.migrate-dataDan Lambright2015-02-133-5/+25
| | | | | | | | | | | | | | | rather than distribute.migrate-data and work with CLI. The change makes this work both when it is internally driven and from the shell. The problem is further described in bugzilla # 1147107. Change-Id: I4fe04cae661dca25432530ddf5ac6ff2c957d6b3 BUG: 1147107 Signed-off-by: Dan Lambright <dlambrig@redhat.com> Reviewed-on: http://review.gluster.org/9284 Reviewed-by: N Balachandran <nbalacha@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>