summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib
Commit message (Collapse)AuthorAgeFilesLines
* rpc-clnt: handle NULL dereferencesAmar Tumballi2010-09-281-7/+11
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1723 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1723
* mgmt/glusterd: prevent detach of peer with its bricks existing in clusterPranith K2010-09-281-0/+7
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1681 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1681
* mgmt/glusterd: delay probe till connection happensPranith K2010-09-271-0/+2
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1607 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1607
* rpc-clnt: print frame-sent time till microsecond resolution in call_bail.Raghavendra G2010-09-241-1/+4
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
* rpc/rpcsvc: add debug messages when rpc-messages are handed over to/from ↵Raghavendra G2010-09-222-13/+37
| | | | | | | | | | transport. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
* cli, mgmt/glusterd: send errno in case of Peer rejectPranith Kumar K2010-09-211-1/+2
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1653 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1653
* cli, mgmt/glusterd: volume sync commandPranith Kumar K2010-09-201-0/+2
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1310 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1310
* rdma: do event_unregister() in fini() too.Amar Tumballi2010-09-171-0/+1
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1611 (crash in gf_free) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1611
* portmap: make grounds for typed service mappingCsaba Henk2010-09-161-0/+9
| | | | | | | | Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570
* cli: added system:: portmap brick2portCsaba Henk2010-09-161-0/+1
| | | | | | | | Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570
* cli: added system:: getspecCsaba Henk2010-09-161-0/+1
| | | | | | | | Signed-off-by: Csaba Henk <csaba@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1570 (geosync related changes) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1570
* cli, mgmt/glusterd: disallow probe to a clusterPranith Kumar K2010-09-151-0/+1
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1594 (make probe oneway) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1594
* rpc: add ref/unref for rpc clntPranith Kumar K2010-09-152-2/+46
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1594 (make probe oneway) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1594
* rpc-transport.c: handle a double freeAmar Tumballi2010-09-151-1/+5
| | | | | | | | | | * 'this->name' was getting freed in '(transport)->fini()'. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1605 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1605
* memory leak fixes.Raghavendra G2010-09-153-5/+13
| | | | | | | | | | | | | - free memory allocated by libc when decoding request arguments in server and reply in client. - free memory allocated to saved_frames during connection cleanup. - free memory allocated for transport name while creating listeners. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1438 (memory leaks) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1438
* socket: add xfer data countsAmar Tumballi2010-09-141-0/+3
| | | | | | | | | | | | * keeping track of data transfered over wire helps to identify the protocol overhead, and also can help us in debugging more on server loads Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* rpc: print xid of the rpcreq corresponding to frame being bailed out.Raghavendra G2010-09-141-3/+3
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
* mgmt/glusterd: free xdr allocationsPranith Kumar K2010-09-141-4/+4
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1186 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1186
* rpc: in rpc_clnt_destroy(), cleanup the transport tooAmar Tumballi2010-09-131-0/+6
| | | | | | | | | | | * if we don't cleanup the transport, it will trigger false events on the free'd transport which causes crash Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1423 (Crash in gf_timer_call_cancel) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1423
* rpc/rpcsvc: fix invalid free in rpcsvc_create_listeners.Amar Tumballi2010-09-091-10/+9
| | | | | | | | | | | Sending on behalf of Raghavendra G Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 513 (Introduce 0 copy rdma) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=513
* rpc-clnt: fix memory corruption happening while encoding auth data.Raghavendra G2010-09-062-11/+12
| | | | | | | | | | | | | - buffer containing authdata pointed by rpc-request was allocated on stack of procedure rpc_clnt_fill_request, but was being used as source for xdr-encoding in rpc_clnt_record_build_record. Hence by the time auth-data is being copied during encoding of request, it might've been freed and hence contain garbage. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
* cli: Changes for GET_NEXT volume infoVijay Bellur2010-09-021-0/+1
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1255 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1255
* mgmt/glusterd: memory leak fixesPranith Kumar K2010-08-312-0/+4
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1186 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1186
* 'gluster volume log' feature addedAmar Tumballi2010-08-311-0/+6
| | | | | | | | | * 'gluster volume log filename <VOLNAME> [BRICK] <path>' * 'gluster volume log locate <VOLNAME> [BRICK]' * 'gluster volume log rotate <VOLUME> [BRICK]' Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
* Only admin should be able to run gluster commandshishir gowda2010-08-301-0/+29
| | | | | | | | | | | Checking for port number to fail any requests coming in from client. if port is >1024, then fail the requests Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1403 (only admin (uid 0) should be able to run 'gluster' command) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1403
* rpc: server to client callback mechanismAmar Tumballi2010-08-276-7/+335
| | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
* rpcsvc: handle the case of null dereferencingAmar Tumballi2010-08-261-1/+7
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1446 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1446
* rpcsvc: fix double free happening when listener creation fails.Raghavendra G2010-08-261-4/+4
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 513 (Introduce 0 copy rdma) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=513
* storage/posix: calculate the correct size of each dirent in readdir/readdirp.Raghavendra G2010-08-251-0/+1
| | | | | | | | | | | | - In addition to posix, protocol/server also adds a check to make sure that iobuf allocated to hold readdir/readdirp response can hold all the dentries, rpc and proc (readdir/readdirp) header. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1430 (encoding of readdirp response fails occasionally) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1430
* rpcsvc: allow creation of both rdma and socket for a single server transport.Raghavendra G2010-08-232-4/+100
| | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 513 (Introduce 0 copy rdma) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=513
* rpcsvc: decouple creation of listener from rpcsvc_program_register and ↵Raghavendra G2010-08-193-189/+87
| | | | | | | | | | | | | rpcsvc_init. - with this patch every program that wants to register itself with rpcsvc should also create one or more listener(s) and register with portmap (if necessary). Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
* Probe on localhost not neededshishir gowda2010-08-191-0/+5
| | | | | | | | Signed-off-by: shishir gowda <shishirng@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1216 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1216
* rpcsvc: change in port selection criteria for program to listen on.Raghavendra G2010-08-191-4/+5
| | | | | | | | | | | | - give preference to port specified in options over the port in program structure when both are specified. This will enable us to run multiple glusterfs server instances on the same machine. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1396 ([3.1prealpha3] Multiple glusterfs processes fail to start with different port nos) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1396
* rpcsvc: check for listener on default port used by mgmt (6969) while ↵v3.1.0prealpha3Raghavendra G2010-08-181-0/+5
| | | | | | | | | | | | | | | | registering programs. - If programs have not provided a default port, rpcsvc tries to allocate a listener bound to default port. While registering programs, if programs have not given any port information, programs will be associated with either default listener or the one provided in options provided during rpcsvc_init, with latter given more precedence. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
* rpcsvc: unref transport stored in request before putting request structure ↵v3.1.0prealpha2Raghavendra G2010-08-181-1/+2
| | | | | | | | | | back to mem-pool. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
* rpc: add rpc_req structure to request_info structure, used by transport ↵Raghavendra G2010-08-182-14/+11
| | | | | | | | | | layer to get corresponding request to reply received. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
* rpc - cleanup and changes related to rdmaRaghavendra G2010-08-1810-495/+404
| | | | | | | | | | | | - remove rpc_conn_state structure. - add a member to point struct rpc_req in rpc_transport_req structure. This is needed for rdma to store rdma specific per request data. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
* changed GNU General Public License to GNU Affero General Public LicensePranith Kumar K2010-08-1718-51/+71
| | | | | | | | Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1388 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1388
* rpc: move handling of fragment headers to socket.Raghavendra G2010-08-162-71/+5
| | | | | | | | | | | - fragment headers are only specific to tcp and hence should be handled in transport-socket instead of by rpc layer. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
* if frame is NULL, don't continue to destroy it.Amar Tumballi2010-08-131-0/+3
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1272 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1272
* rpc-clnt/socket: rpc_clnt_reconfig() API to support overriding of port numbersAnand V. Avati2010-08-124-24/+47
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1314 (portmapper functionality) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1314
* portmap functionality in glusterdAnand V. Avati2010-08-121-0/+15
| | | | | | | | Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1314 (portmapper functionality) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1314
* rpc: Cleanup reconnect timer while destroying rpc_clntVijay Bellur2010-08-121-4/+25
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1334 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1334
* rpc fixesAmar Tumballi2010-08-122-2/+2
| | | | | | | | | | | * set THIS properly so memory accounting works fine. * also check for few pointers before dereferencing them. Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1317 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1317
* rpc-lib: Solaris build fixesShehjar Tikoo2010-08-105-10/+38
| | | | | | | | Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1178 (Gluster mainline build fails on Solaris) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1178
* remove same process transport shortcutting mechanism in rpcAmar Tumballi2010-08-062-192/+0
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1223 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1223
* fix memory-leak in case of disconnections in RPC serverAmar Tumballi2010-08-062-45/+7
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1227 (memory leak in rpcsvc_conn_alloc) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1227
* changes to rpcRaghavendra G2010-07-287-200/+256
| | | | | | | | | | | | | | | | | | - use mem-pool for requests and saved_frames. - preserve the rpc_req structure till rpc invokes program's reply. This will enable us to store transport specific data that has to last till reply has come (eg., memory regions of chunk lists in case of rdma). - change signature of rpc_clnt_submit to accept rsphdr_vector and rsppayload_vector. The buffers pointed by these vectors will be from iobufs and these iobufs are added to an iobref which should also be passed as an arguement to rpc_clnt_submit. Signed-off-by: Raghavendra G <raghavendra@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 875 (Implement a new protocol to provide proper backward/forward compatibility) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=875
* fix all the clang errors in 'rpc/*'Amar Tumballi2010-07-284-34/+46
| | | | | | | | Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1133 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1133
* cli: Changes to provide proper exit status for gluster commandlineVijay Bellur2010-07-271-2/+4
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1205 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1205