summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* DVM: bug fixes in cli and glusterd for probe, start volumev3.1.0qa2Vijay Bellur2010-07-251-1/+3
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1187 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1187
* rpc/rpc-lib added saved frame's call timestampPranith Kumar K2010-07-201-2/+10
| | | | | | | | | | | it will be good to have the time stamp at which the calls were sent to the server in the gf_log of saved_frames_unwind Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 908 (saved_frames_unwind() : print time stamp of when call was sent to server) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=908
* Changes for volume commandsVijay Bellur2010-07-191-0/+1
| | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 1161 (gluster volume start command segfaults glusterd) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1161
* protocol/lib: rename files to standardized names and placesAnand Avati2010-07-142-2/+141
| | | | | | | | | | | | - move xlators/protocol/lib/* to rpc/xdr/ - rename CLI and glusterd XDR filenames - remove xlators/protocol/lib (libgfproto1.so) Signed-off-by: Anand V. Avati <avati@blackhole.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
* gluster-CLI-and-mgmt-glusterd-added-to-codebaseAmar Tumballi2010-07-082-39/+36
| | | | | | | | | Signed-off-by: Vijay Bellur <vijay@gluster.com> Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 971 (dynamic volume management) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=971
* make DUMP as another programAmar Tumballi2010-07-085-5/+272
| | | | | | | | | | | * on server side, make it a rpc program. * on client its another program at protocol Signed-off-by: Amar Tumballi <amar@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
* NULL dereference fixes in code base after running with 'clang'Amar Tumballi2010-07-021-2/+4
| | | | | | | | | | | | * 212 logical (NULL deref/divide by zero) errors reduced to 28 (27 of them in contrib/ and lex part of codebase, 1 is invalid) * 11 API errors reduced to 0 Signed-off-by: Amar Tumballi <amar@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 966 (NULL check for avoiding NULL dereferencing of pointers..) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=966
* minor fixes in rpc + protocolAmar Tumballi2010-07-011-2/+2
| | | | | | | | | | | | | | | * proper use of mem_acct_init in client.c/server.c * fentrylk_resume to be called instead of finodelk_resume in server_fentrylk(). * handle the case of xdr decoding failure on server by sending the proper error reply to client, so there is no missing frame. * removed unwanted functions from server-helpers.c Signed-off-by: Amar Tumballi <amar@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
* Move rpc to top-levelVijay Bellur2010-06-2818-0/+7019
Signed-off-by: Vijay Bellur <vijay@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