294 Commits

Author SHA1 Message Date
shishir gowda
fabb7e5e5d Cli volume add-brick validation
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 1440 (volume add brick validation)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1440
2010-08-26 07:30:54 -07:00
Raghavendra G
e541154b79 transport/socket: free priv->incoming.request_info if not already freed after reading each message.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 1438 (memory leaks)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1438
2010-08-26 00:09:25 -07:00
shishir gowda
7c7219fd88 Cli volume create validation
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 1185 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1185
2010-08-26 00:09:17 -07:00
Raghavendra G
fb0bb972df storage/posix: calculate the correct size of each dirent in readdir/readdirp.
- 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
2010-08-25 00:41:58 -07:00
Vijay Bellur
df4a7d7576 glusterd: support for volume version and cksum
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 1310 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1310
2010-08-23 02:53:16 -07:00
Raghavendra G
436f2b329f rpcsvc: allow creation of both rdma and socket for a single server transport.
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
2010-08-23 00:23:47 -07:00
Raghavendra G
a5dac1f49e rpcsvc: decouple creation of listener from rpcsvc_program_register and 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
2010-08-19 09:50:32 -07:00
shishir gowda
074f03afb2 Probe on localhost not needed
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
2010-08-19 09:50:19 -07:00
Raghavendra G
b1f5031a3a rpcsvc: change in port selection criteria for program to listen on.
- 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
2010-08-19 02:38:07 -07:00
Raghavendra G
f51252fa0d rpcsvc: check for listener on default port used by mgmt (6969) while 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
2010-08-18 13:00:23 -07:00
Raghavendra G
03df087149 rpcsvc: unref transport stored in request before putting request structure 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
2010-08-18 07:50:32 -07:00
Amar Tumballi
1aa2219484 rpc-transport/socket: proper cleanup and NULL deref checks.
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 1326 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1326
2010-08-18 07:41:53 -07:00
Raghavendra G
0b890833c8 rpc: add rpc_req structure to request_info structure, used by transport 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
2010-08-18 00:37:08 -07:00
Raghavendra G
4e01a54eaa rpc - cleanup and changes related to rdma
- 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
2010-08-18 00:37:03 -07:00
Pranith Kumar K
c8e411f2c4 changed GNU General Public License to GNU Affero General Public License
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
2010-08-17 11:18:23 -07:00
Raghavendra G
fac7244477 rpc: move handling of fragment headers to socket.
- 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
2010-08-16 02:16:29 -07:00
Amar Tumballi
42436eb494 if frame is NULL, don't continue to destroy it.
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
2010-08-13 04:41:25 -07:00
Anand V. Avati
12ce6a962a rpc-clnt/socket: rpc_clnt_reconfig() API to support overriding of port numbers
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
2010-08-12 03:55:16 -07:00
Anand V. Avati
b69a4f1e31 portmap functionality in glusterd
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
2010-08-12 03:55:12 -07:00
Vijay Bellur
aa17ab8aa1 rpc: Cleanup reconnect timer while destroying rpc_clnt
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
2010-08-12 00:45:41 -07:00
Amar Tumballi
d8bb87b4c7 rpc fixes
* 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
2010-08-12 00:14:27 -07:00
Amar Tumballi
0b501ac95e 'gluster volume rebalance' related fixes
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 1307 (gluster volume defrag <VOLNAME> status)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1307
2010-08-11 22:24:32 -07:00
Shehjar Tikoo
6cf8c2114a rpc-lib: Solaris build fixes
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
2010-08-10 02:44:35 -07:00
Pavan Sondur
acdeed002d add pump xlator and changes for replace-brick
Signed-off-by: Pavan Vilas Sondur <pavan@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 1235 (Bug for all pump/migrate commits)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1235
2010-08-06 04:09:07 -07:00
Raghavendra G
b04d963e91 rpc: changes to glusterfs programs that can take an optional payload argument.
- The existing interface required the transport to separate the procedure
    header and procedure payload into two different buffers. Making this
    separation can prove cumbersome for transports like rdma wherein the header
    and payload can be received in a single buffer (For eg., header and payload
    of write fop sent as inline msg using rdma-send). This patch delegates the
    responsiblity of separating out header and payload to programs.

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
2010-08-06 03:37:20 -07:00
Amar Tumballi
21e4580c24 remove same process transport shortcutting mechanism in rpc
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
2010-08-06 03:37:15 -07:00
Amar Tumballi
dc10948a18 fix memory-leak in case of disconnections in RPC server
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
2010-08-06 03:37:01 -07:00
Raghavendra G
40d3ad1585 changes to rpc
- 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
2010-07-28 05:08:26 -07:00
Amar Tumballi
753146c0ff some check added to the variables after GF_CALLOC
handles some NULL dereference problems
(reported by clang when ran with code where '#define GF_CALLOC NULL').

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
2010-07-28 03:34:48 -07:00
Amar Tumballi
0aae2c4657 fix all the clang errors in 'rpc/*'
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
2010-07-28 03:34:44 -07:00
Vijay Bellur
a7795fedd4 cli: Changes to provide proper exit status for gluster commandline
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
2010-07-27 01:20:12 -07:00
Pavan Sondur
f803fae036 cli: Fixes related to get brick-replace to work.
Signed-off-by: Pavan Vilas Sondur <pavan@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
2010-07-27 01:20:08 -07:00
Vijay Bellur
931a59e2b9 DVM: bug fixes in cli and glusterd for probe, start volume
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
2010-07-25 23:29:53 -07:00
Vijay Bellur
be4dee16c1 Changes for Dynamic Volume Management
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 1196 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1196
2010-07-22 23:10:38 -07:00
Amar Tumballi
3e34ad9388 add port as an optional argument to 'probe' command
* there will be just 'one' glusterd per machine, but in case if its
  run on different port, then this option is useful to probe.

Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 1074 (port related issues in 'gluster probe' command)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1074
2010-07-20 20:44:18 -07:00
Pranith Kumar K
24a8879abf rpc/rpc-lib added saved frame's call timestamp
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
2010-07-20 09:46:18 -07:00
Amar Tumballi
00b1846823 'gluster volume defrag' related bug fixes
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>

BUG: 1073 ('gluster defrag <VOLNAME>' fails in mainline)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1073
2010-07-20 09:46:08 -07:00
Vijay Bellur
a6b90707bf Changes for volume commands
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
2010-07-19 05:11:05 -07:00
Anand Avati
47dc8def24 protocol/lib: rename files to standardized names and places
-  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
2010-07-14 15:02:50 -07:00
Amar Tumballi
915adb9c12 gluster-CLI-and-mgmt-glusterd-added-to-codebase
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
2010-07-08 23:28:08 -07:00
Amar Tumballi
c85998fec4 make DUMP as another program
* 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
2010-07-08 02:24:23 -07:00
Amar Tumballi
2f15ffd6b5 NULL dereference fixes in code base after running with 'clang'
* 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
2010-07-02 05:17:03 -07:00
Amar Tumballi
01923eed11 minor fixes in rpc + protocol
* 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
2010-07-01 03:31:51 -07:00
Vijay Bellur
0da2a6d08c Move rpc to top-level
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
2010-06-28 22:20:45 -07:00