summaryrefslogtreecommitdiffstats
path: root/rpc
Commit message (Collapse)AuthorAgeFilesLines
* 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-175-1735/+1153
| | | | | | | | | | | | 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>
* rpc-transport: Moved unix socket options function to rpc-transportKrishnan Parthasarathi2013-05-164-60/+61
| | | | | | | | | | | | | 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>
* 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>
* rpc-lib: fix printf args when printing XIDMichael Brown2013-05-062-7/+7
| | | | | | | | | | | | | * Prior to change, XID is sometimes logged with wrong format string * Incorrect (0x%ux): generates output of "XID: 0x1920499352x" * Correct (0x%x): generates output of "XID: 0x72787e98" Change-Id: Id60b673a4356a4815cdb67303612181ac5624fe3 BUG: 960153 Signed-off-by: Michael Brown <michael@netdirect.ca> Reviewed-on: http://review.gluster.org/4949 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Revert "glusterd: Fix spurious wakeups in glusterd syncops"Krishnan Parthasarathi2013-05-042-38/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit efa154bb0a4cac34d5a9610ec25d38eebe495f22. -- Following is Avati's analysis (edited) from gerrit -- The claim of the patch (being reverted) is that it in some cases cbkfn is missed. This is wrong analysis. cbk_fn is _always_ called. The patch treats ret > 0 as a "missed cbk". ret > 0 only means socket submission was not complete, and is queued to submit asynchronously when POLLOUT is raised. This is sufficient to guarantee that cbkfn is going to be called (either the socket errors or submission succeeds and reply eventually arrives). This commit also removes spurious barrier_wake(s). call backs are guaranteed to be called even if the transport is disconnected. This means, a 'wake' would be called if rpc_clnt_submit is called. Also, we count both successful and failed operations in a particular batch of operations for the synctask_barrier_wait. So, calling synctask_barrier_wake on failure of rpc_clnt_submit (say, due to network failure) would result in a spurious wake. Change-Id: I7d508c2a54b74a65b82f097742206bc777afc53a BUG: 948686 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4922 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Fix spurious brick disconnectsEmmanuel Dreyfus2013-04-291-0/+9
| | | | | | | | | | | | | | | | Spurious disconnect were caused by a race condition inside rpc_transport_ref()/rpc_transport_unref() that allowed the refcount to drop to zero while the transport was still in use. The race condition is made possible because of an uninitiaized mutex produced when socket_server_event_handler() copies the transport BUG: 764655 Change-Id: I34fe097a0ac21b0dbf58f5eed84880e3fd9814f2 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/4900 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: add a command 'gluster pool list [--xml]'Niels de Vos2013-04-261-1/+2
| | | | | | | | | | | | | | | | | * unlike 'gluster peer status', which lists only info about peers, this command lists localhost also in the list, so the sorted output from all the nodes should match. * made the output script friendly by keeping it one output per line. Change-Id: I853656753b35c617debbcceecbb71c8d6dd3c334 BUG: 764638 Original-review: http://review.gluster.org/4221 Original-author: Amar Tumballi <amarts@redhat.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/4862 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Fixed spurious wakeups in glusterd syncopsKrishnan Parthasarathi2013-04-122-7/+38
| | | | | | | | | | | | | glusterd syncops perform a barrier_wake whenever rpc_clnt_submit returned -1. This is based on the wrong assumption that the cbkfn wasn't called. This would result in one more wakeup than there ought to be. Change-Id: I591e67c267f0e26d1145bf8fb5feeb2c13a751a1 BUG: 948686 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4802 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* rpc-lib: Move defaulting to socket message to debug levelRaghavendra Talur2013-04-021-1/+1
| | | | | | | | | | | | | | | | | | Problem: For every gluster cli operation from command line rpc init process is required. During init process we print "no transport type set, defaulting to socket" message at WARNING level, which is not necessary. Solution: Moved the log level to DEBUG. Change-Id: I73f4644264368b0f6c11a77ef66595018784ce79 BUG: 928204 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/4727 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc/nfs: cleanup legacy code of general optionsRajesh Amaravathi2013-04-023-452/+132
| | | | | | | | | | | | | | | | | | Removing the code which handles "general" options. Since it is no longer possible to set general options which apply for all volumes by default, this was redundant. This cleanup of general options code also solves a bug wherein with nfs.addr-namelookup on, nfs.rpc-auth-reject wouldn't work on ip addresses Change-Id: Iba066e32f9a0255287c322ef85ad1d04b325d739 BUG: 921072 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4691 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* rpc: disable root-squash dynamically upon volume set commandRaghavendra Bhat2013-04-011-2/+7
| | | | | | | | | Change-Id: I2ba9ca339ffbe07cb74833165a46a941225b623d BUG: 927616 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4722 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* socket: Make non-ssl sockets perform non-blocking connect()Krishnan Parthasarathi2013-03-221-0/+12
| | | | | | | | | Change-Id: Icb60cf7ad3ea7ca0eeb12fd19b95a6b340857bb2 BUG: 920916 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4670 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc-transport: fix glusterd crash when rdma.so missingRajesh Amaravathi2013-03-211-2/+4
| | | | | | | | | | | Add checks before trying to delete vol_opt from list and free Change-Id: I2858f58518394beb8f74fa477be81d7bdd38304f BUG: 924215 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4704 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* socket: Associated IP:port information with error logs to make debugging easierKrishnan Parthasarathi2013-03-201-3/+4
| | | | | | | | | Change-Id: I4e7268f74b392c5cee8c7b8fc4bb5ab41d74dd04 BUG: 922780 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4686 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* rpc: before freeing the volume options object, delete it from the listRaghavendra Bhat2013-03-201-6/+6
| | | | | | | | | | | | | | | | | | | | | | * Suppose there is an xlator option which is considered by the xlator only if the source was built with debug mode enabled (the only example in the current code base is run-with-valgrind option for glusterd), then giving that option would make the process crash if the source was not built with debug mode enabled. Reason: In rpc, after getting the options symbol dynamically, it was stored in the newly allocated volume options structure and the structure's list head was added to the xlator's volume_options list. But while freeing the structure the list was not deleted. Thus when the list was traversed, already freed structure was accessed leading to segfault. Change-Id: I3e9e51dd2099e34b206199eae7ba44d9d88a86ad BUG: 922877 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4687 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* rpc: For AF_UNIX sockets, do not set keepalive option.Venkatesh Somyajulu2013-03-181-2/+3
| | | | | | | | | | | Change-Id: I65df52e89fe7783ff00c2b7a49be571d15e8f0d0 BUG: 920009 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/4684 Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc: change dict key for fqdnRajesh Amaravathi2013-02-181-2/+2
| | | | | | | | | | | | | changed the key from "client.fqdn", which could be wrongly construed as belonging to protocol/client, to "fqdn". Change-Id: Ib5f4a875a00b99cd903a29da19bafeb70baaab4e BUG: 906119 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4536 Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* rpc: bring in root-squashing behavior in rpcRaghavendra Bhat2013-02-174-2/+44
| | | | | | | | | | | | | | | | | | * requests coming in as root are converted to nfsnobody * with open-behind some acl checks wont happen and nfsnobody can read the file "whose owner is root and other users do not have permission to read the file". This is becasue open-behind does not send the open to the brick and sends success to the application, thus the acl related tests on the file wont happen which would have prevented the file from being opened. Change-Id: I73afbfd904f0beb3a2ebe807b938ac2fecd4976b BUG: 887145 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4516 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Use proper libtool option -avoid-version instead of bogus -avoidversionAnand Avati2013-02-072-2/+2
| | | | | | | | | | Change-Id: I1c9541058c7d07786539a3266ca125a6a15287d8 BUG: 859835 Signed-off-by: Anand Avati <avati@redhat.com> Original-author: Kacper Kowalik (Xarthisius) <xarthisius.kk@gmail.com> Signed-off-by: Kacper Kowalik (Xarthisius) <xarthisius.kk@gmail.com> Reviewed-on: http://review.gluster.org/3967 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* rpc: get hostnames of client to allow FQDN based authenticationRajesh Amaravathi2013-02-061-0/+20
| | | | | | | | | | | | | | If FQDNs are used to authenticate clients, then from this commit forth, the client ip(v4,6) is reverse looked up using getnameinfo to get a hostname associated with it, if any, thereby making FQDN-based rpc authentication possible. Change-Id: I4c5241e7079a2560de79ca15f611e65c0b858f9b BUG: 903553 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4439 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nfs/nlm: use req's uid and gid for open_and_resumeRajesh Amaravathi2013-02-061-2/+0
| | | | | | | | | | | | | | | | Previously, NLM was setting the frame->root->{uid,gid} to root by default. This causes permission problems with root squashing for lock calls. Now, we obtain the uid and gid from rpc request. And duplicate #defines are removed from rpcsvc.h Change-Id: I5d6c87aed8d04aab2619bb913408048c0a02d1e7 BUG: 906884 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4466 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpcsvc/dump: return correct return valueRaghavendra G2013-02-061-0/+1
| | | | | | | | | | | | | fix e8d09b9ab9 resulted in rpcsvc_dump returning large non-zero values to caller in case of success. This patch fixes that issue by returning 0 Change-Id: I594703dada74da17b33c98b073627a3378d170c5 BUG: 903113 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.org/4477 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Use client-op-versions during "volume set"Kaushal M2013-02-061-0/+5
| | | | | | | | | | | | | | | The supported op-versions of the client and the name of the requested volume, are saved during server_getspec(). These are used during the staging of volume set. If the option being set is not supported by any of the clients which currently have the volume mounted, then set will fail. Change-Id: I4e6b60b274d5200508762dc0204cfa848a6c0aa4 BUG: 907311 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4424 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpcsvc: Fix memory corruption caused by rpcsvc_dump returning non-zeroRaghavendra G2013-02-051-10/+8
| | | | | | | | | | | | | | | | | | | | The convention followed is that any actor should return non-zero value only if it has not attempted to send the reply back. If an actor returns non-zero, rpcsvc_handle_rpc_call tries to send an error reply. Since, rpcsvc_submit_generic frees the rpc_req, its wrong to invoke it more than once on same rpc_req. When the transport is not connected, rpcsvc_dump used to pass the non-zero value it got from transport to rpcsvc resulting in memory corruption. Hence this patch makes rpcsvc_dump to return 0. Change-Id: I1b6f28969ee546c44d193d3d33debccb65585b69 BUG: 903113 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.org/4183 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* socket: restructure disconnect/poll-thread interactionsJeff Darcy2013-02-032-38/+102
| | | | | | | | | Change-Id: I792c28f52068e4ed666069b740739662685160bc BUG: 906401 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4456 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* socket: null out priv->ssl_ssl on disconnectJeff Darcy2013-01-291-0/+2
| | | | | | | | | | | | | | | | | | | This prevents problems when a socket transport is reused for a non-SSL connection (e.g. glusterd portmapper) after having been used for an SSL connection (e.g. a brick). In that case, ssl_ssl will still be non-null from the first connection, even though the structure it points to has actually been freed. I'm not sure why/how we would reuse a socket transport in this way (the case of SSL after non-SSL has been common for a long time) but recent glusterd changes seem to have had that effect. Change-Id: I46f1ff3c409c122478bf720a7f02d92abcc32bed BUG: 902684 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4449 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* "gcc -pedantic": made 'inline' functions as 'static inline' functionsAmar Tumballi2013-01-235-24/+24
| | | | | | | | | | | | for passing the build with -pedantic flag Change-Id: I80fd9528321e4c6ea5bec32bf5cdc54cc4e4f65e BUG: 875913 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.org/4186 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: fixes for gcc's '-pedantic' flag buildAvra Sengupta2013-01-212-4/+4
| | | | | | | | | | | | | * warnings on 'void *' arguments * warnings on empty initializations * warnings on empty array (array[0]) Change-Id: Iae440f54cbd59580eb69f3ecaed5a9926c0edf95 BUG: 875913 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/4219 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nlm: use virtual ip of server to connect to clientRajesh Amaravathi2013-01-181-0/+11
| | | | | | | | | | | | | | | | | In cases where the servers use virtual ip's, this commit makes sure we use them and not the physical ip. This change also refactors code around nlm4_establish_callback by sending granted msg only after a connection establishment, and removing the separate thread creation. Change-Id: I087362c547a25aa52ef7fc6653845a3863466ee6 BUG: 888283 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4326 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* socket: Don't log readv failures if read-fail-log is falseKrishnan Parthasarathi2013-01-151-7/+11
| | | | | | | | | Change-Id: I6903d62cbc7107eb8498bcd81d07667b36890a02 BUG: 764888 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4377 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* rpc-transport/rdma: use 24008 as default listen port.Raghavendra G2012-12-181-0/+2
| | | | | | | | | | Change-Id: I021d5e2dbe3653d4303b64fe1ada0556cd4b7966 BUG: 878883 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.org/4323 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpcsvc: Add an extra log messageKaushal M2012-12-101-0/+4
| | | | | | | | | | | | Adds an extra log message in rpcvsc_check_and_reply_error(). Also, makes a small change in the test-script. Change-Id: I2b686e6fa86529cc4fbf0066df64057a9784b849 BUG: 884452 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4285 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpcsvc: do a 'iobuf_ref()' on buffer while synctaskizing actorKaushal M2012-12-092-13/+23
| | | | | | | | | | | | | | | | | | Starting rpc actors using synctask causes rpcsvc to return before the actor actually finishes its actions. This would cause the buffer to be unreffed by socket and be possibly reused, before the actor used it, leading to failures in the actor. This patch makes rpcsvc take a ref on the buffer when synctaskizing the actor and store it in the request structure, and then later unref it when the request structure is destroyed. This makes sure that the buffer is not reused before the actor has finished. Change-Id: I8f81e1fef8f3719db220471d2d8ffb8916958956 BUG: 884452 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4277 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Revert "glusterd: add "volume label" command"Anand Avati2012-12-041-1/+0
| | | | | | | | | | | This reverts commit dad16a51ba7e6b1c57529423c57257dbce97ee93 Test script causing "silent" failures during execution. Change-Id: I26dbb8ed22256071cb415cc3aff572ef8372600e Reviewed-on: http://review.gluster.org/4268 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc-transport/socket: implement read-ahead of RPC headersAnand Avati2012-12-042-7/+115
| | | | | | | | | | | | | This reduces the number of read() system calls on the socket to complete the full RPC fragment reading. Change-Id: I421a53af195ead4aad70e09e0172a61ad7912d83 BUG: 821087 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3855 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* glusterd: add "volume label" commandJeff Darcy2012-12-041-0/+1
| | | | | | | | | | | | | | | | | This command is necessary when the local disk/filesystem containing a brick is unexpectedly lost and then recreated. Since 961bc80c, trying to start the brick will fail because the trusted.glusterfs.volume-id xattr is missing, and if we can't start it then we can't replace-brick or self-heal so we're stuck in a permanently degraded state. This command provides a way to label the empty brick with the proper volume ID so that further repair actions become possible. Change-Id: I1c1e5273a018b7a6b8d0852daf111ddc3fddfdc2 BUG: 860297 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4259 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* socket,rdma: before binding to any port check if it is a reserved portRaghavendra Bhat2012-12-032-24/+38
| | | | | | | | | | | | * The list of ports which are reserved is obtained by reading the file /proc/sys/net/ipv4/ip_local_reserved_ports. Change-Id: I3a832f53efbb79dd719b34a30cbaf28269f25816 BUG: 762989 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4131 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* core: remove ref/unref while unwinding framesRajesh Amaravathi2012-11-301-4/+0
| | | | | | | | | Change-Id: Ib196ffdf8122a9510cc7c5953303a6e730091302 BUG: 853373 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.org/4062 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* BD Backend: CLI to create a full/linked clone of a imageM. Mohan Kumar2012-11-291-0/+2
| | | | | | | | | | | | | | | | A new CLI command added to support cloning/snapshotting of a LV device Syntax is: $ gluster bd clone <volname>:<vg>/<lv> <newlv> $ gluster bd snapshot <volname>:<vg>/<lv> <snap_lv> <size> BUG: 805138 Change-Id: Idc2ac14525a3998329c742bf85a06326cac8cd54 Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Reviewed-on: http://review.gluster.org/3719 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* BD Backend: CLI commands to create/delete imageM. Mohan Kumar2012-11-291-0/+8
| | | | | | | | | | | | | | | | | Cli commands added to create/delete a LV device. The following command creates lv in a given vg. $ gluster bd create <volname>:<vgname>/<lvname> <size> The following command deletes lv in a given vg. $ gluster bd delete <volname>:<vgname>/<lvname> BUG: 805138 Change-Id: Ie4e100eca14e2ee32cf2bb4dd064b17230d673bf Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Reviewed-on: http://review.gluster.org/3718 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd, cli: implement gluster system uuid reset commandRaghavendra Bhat2012-11-281-0/+1
| | | | | | | | | | | | | | | | | | | | | | A commonly faced problem among glusterfs users is: after a fresh installation of glusterfs in a virtual machine, the VM image is cloned to make multiple instances of the server. This breaks glusterd because right after glusterfs installation on the first boot glusterd would have created the node UUID and this gets inherited into the clone. The result is wierd behavior at the time of peer probe where glusterd does not (yet) deal with UUID collisions in a user friendly way. To handle it gluster peer reset command is implemented which upon execution changes the uuid of local glusterd. Change-Id: If207dd2ad93ab94ef1a3253f409c21c442975f87 BUG: 811493 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/3637 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mgmt/glusterd: Implementation of server-side quorumPranith Kumar K2012-11-231-2/+4
| | | | | | | | | | | | Feature-page: http://www.gluster.org/community/documentation/index.php/Features/Server-quorum Change-Id: I747b222519e71022462343d2c1bcd3626e1f9c86 BUG: 839595 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3811 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* socket: fix double-free when ssl_setup_connection failsJeff Darcy2012-11-231-1/+2
| | | | | | | | | Change-Id: I893b166da28f4c21e582ed477399c4bc0c1d20e1 BUG: 877903 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4208 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* ACLv3 - Access Control Lists V3Krishna Srinivas2012-11-136-2/+293
| | | | | | | | | | Change-Id: I43e544d6cdeac5e3880141477461e7c22cbf6e91 BUG: 847622 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: http://review.gluster.org/4045 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* socket: fix SSL breakage from re/connect handling changesJeff Darcy2012-11-121-7/+9
| | | | | | | | | Change-Id: Ia1f5aeec5628b61cad8a10a9cdc6d9f1c67ec653 BUG: 873367 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4158 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: op-version handshake implementationKaushal M2012-10-304-60/+129
| | | | | | | | | | | | | Brings in a new rpc program MGMT_HANDSHAKE, which implements the op-version handshake. This is required for bringing in the op-version feature as described in http://www.gluster.org/community/documentation/index.php/Features/Opversion Change-Id: I4333fd2714dbbd3a2a3fca5862cbb3c56615529e BUG: 814534 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/3688 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: do not log rdma not found messages in error modeRaghavendra Bhat2012-10-231-1/+1
| | | | | | | | | | Change-Id: Ie35b05ed2ee004bd6479ccdd3459cbcd9cf8c208 BUG: 867313 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4094 Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* client-handshake: synchronize config.remote_port setting b/wRaghavendra G2012-10-111-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | rpc_clnt_reconnect and client_query_portmap_cbk problem: ------- Theoretically there is a possibility that we could complete querying the remote brick's port number before rpc_transport_connect can return. If rpc_clnt_reconnect happens to be the caller of rpc_transport_connect and we've already got the remote brick's port number by the time rpc_transport_connect returns, without synchronization, rpc_clnt_connect resets config.remote_port to zero even before we have attempted a connection with remote brick. fix: --- By making only poll thread do setting and resetting of config.remote_port, we avoid the race-condition. Change-Id: I51879ba1cac651a80ff5c9c070ec7fe1ceea9e05 BUG: 765051 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.org/4044 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* build: libraries must be in LDADD/LIBADDJeff Darcy2012-10-031-2/+2
| | | | | | | | | | | | | | | | Libraries must not be listed in LDFLAGS, because _order is important_. Details see http://stackoverflow.com/questions/4241683/linker-flags-in-wrong-place http://www.gentoo.org/proj/en/qa/asneeded.xml#doc_chap2_sect3 Change-Id: I0479456d6702748c555031bb20641ce430732ec7 BUG: 862082 Original-author: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4030 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>