223 Commits

Author SHA1 Message Date
krishna
6c7a89321a RPC unify code change
Change-Id: Ibe18a2a63fd023ac57652c4dfc8ac8a69d983b83
BUG: 3112
Signed-off-by: krishna <krishna@gluster.com>
Reviewed-on: http://review.gluster.com/116
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
2011-07-29 03:37:07 -07:00
Amar Tumballi
58ccea4401 rpc: in client connection init(), return the proper error code
without the proper error code, rpc won't know if transport is successfully
loaded or not.

Change-Id: Idc3ad56d2f47cf1e81ba39f90a7f7b47305d7d9a
BUG: 3260
Reviewed-on: http://review.gluster.com/112
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
2011-07-27 02:14:37 -07:00
Gaurav
48665f87f5 Glusterd: Remove dependency on AI_ADDRCONFIG for AF_UNSPEC
Change-Id: I0a22b2cc5a0ea1a57633fddabad54aca7b3d4e86
BUG: 2456
Reviewed-on: http://review.gluster.com/102
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Csaba Henk <csaba@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-07-27 01:40:25 -07:00
Rajesh
73eca3be5c rpc-transport/socket: avoid logging socket read fails
An option, transport.socket.read-fail-log was added in glusterd.
This can also be added to any translator which uses socket.c.
A gf_boolean_t flag(read_fail_log) is added in socket_private_t.
Using this, logging of socket read failures can be controlled.
The options is set to 'off' in glusterd.vol by default.

Change-Id: I85cf4afc1f534f5f51018449d5d84baef18fce23
BUG: 3156
Reviewed-on: http://review.gluster.com/22
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
2011-07-25 09:25:25 -07:00
shishir gowda
65cc08d80d glusterd: Add bind-insecure xlator-option for glusterd
This is required if the number of connections from the glusterd
increases.

Change-Id: Iff78773f593a8bfae13ec9eec52c5a67ea936ef2
BUG: 3142
Signed-off-by: shishir gowda <shishirng@gluster.com>
Reviewed-on: http://review.gluster.com/11
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Pavan T C <tcp@gluster.com>
2011-07-24 11:45:14 -07:00
Gaurav
f50e5eb777 Glusterd: IPV6 support for glusterfs.
Signed-off-by: Gaurav <gaurav@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2456 (IPv6 support for glusterd)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2456
2011-07-14 01:31:36 -07:00
Raghavendra G
64316c419f rpc-transport/rdma: call ibv_fork_init to make rdma work with fork.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 3091 (rebalance fails with "transport endpoint not connected" in 3.2.1 rdma set-up)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3091
2011-07-01 01:26:09 -07:00
Vishwanath
83d1f9642e spelling corrections in glusterfs code
Signed-off-by: Vishwanath S Bhat <vishwanath@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2903 (Last spelling errors in source code)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2903
2011-06-23 21:50:20 -07:00
Amar Tumballi
c9854677fc gluster volume create: option for stripe + replicate volume
So RAID01 like option is a possibility

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

BUG: 3040 (need a way to create volumes with 'stripe+replicate' setup..)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=3040
2011-06-23 21:30:53 -07:00
Gaurav
58cf35b353 CLI : Display possible options in proper format.
Signed-off-by: Gaurav <gaurav@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2598 (Volume access option suceeds with any string value)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2598
2011-06-19 20:41:27 -07:00
Amar Tumballi
0101eb0b64 logging: fill proper domain names at places where it is missing
also changed some error messages where it was not explicit

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

BUG: 2346 (Log message enhancements in GlusterFS - phase 1)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
2011-06-16 22:02:13 -07:00
Amar Tumballi
e3a061d6fa gluster rebalance: bring in a 'force' option
* also correct the free space available logic to check the size
  without the file in migration (this considers the sparse files too)

* 'force' option will bypass the free-space check logic, hence will
  cleanup all the linkfile

* 'force' option is valid only with 'migrate-data' option

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

BUG: 2258 (enhance gluster volume rebalance)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258
2011-06-16 22:01:59 -07:00
Amar Tumballi
e1aa1e0e20 rdma: fix the excessive logs
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2346 (Log message enhancements in GlusterFS - phase 1)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
2011-06-16 09:15:39 -07:00
Amar Tumballi
a7a2b82189 build warning fixes
mainly fixes all the sockaddr related 'strict aliasing' warnings

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

BUG: 2550 (build warnings)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2550
2011-06-16 09:15:33 -07:00
Amar Tumballi
e719518e56 fixing some build issues in Mac OS X
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2966 (MacOSX compile failure: duplicate symbol _k)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2966
2011-06-16 09:15:28 -07:00
Amar Tumballi
2b53a40350 rpc-transport/rdma: don't return '0' in case of un-initiated rdma_connect()
needed to handle the re-configuration of the port in client protocol. If
there is a successful 'connect()' after the query port, the remote-port
value gets reset to '0'. In this case, if the connect() return 0 for
already connected socket, the query_portmap will keep happening in a loop.

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

BUG: 2294 (Currently there is no way through cli to make a volume listen on both the transports (socket/rdma))
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2294
2011-06-08 11:17:24 -07:00
shishir gowda
d720547e9e client_bind: When allow-insecure xlator option is set, donot bind.
There is no need to bind a client, as connect will assign a port.

Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2868 (Add xlator-option to support insecure-bind for clients)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2868
2011-05-31 09:10:54 -07:00
Gaurav
793aba82fa RPC : Valid typecasting for ipv4 and ipv6 in rpcsvc_get_listener_port.
Signed-off-by: Gaurav <gaurav@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2956 (Invalid typecating for ipv4 and ipv6 in rpcsvc_get_listener_port.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2956
2011-05-31 05:11:14 -07:00
Anand Avati
b0c07f4db5 rpc: NetBSD portability fixes
NetBSD's <dirent.h> does a #defiine d_ino d_fileno. Since glusterfs
declares structs with d_ino members, we must include <dirent.h> early
so that d_ino get preprocessed into d_fileno conssitently.

Also define proper xdr types for NetBSD.

Thanks to: Emmanuel Dreyfus <manu@netbsd.org>

Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2923 (NetBSD port)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2923
2011-05-30 04:49:03 -07:00
Anand Avati
beb2b28ff1 rpc: TCP_KEEPALIVE undeclared in NetBSD
Works around "error: 'TCP_KEEPALIVE' undeclared" on NetBSD

Thanks to: Emmanuel Dreyfus <manu@netbsd.org>

Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2923 (NetBSD port)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2923
2011-05-30 04:48:39 -07:00
Anand Avati
7f1c2eb4d4 rpc: use AI_ADDRCONFIG selectively
NetBSD does not have AI_ADDRCONFIG. This patch has a side effect: glusterfsd
listens on IPv6 adresses only by default. Option transport.socket.bind-address
in volume server-tcp must be used to listen on an IPv4 address.

Thanks to: Emmanuel Dreyfus <manu@netbsd.org>

Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2923 (NetBSD port)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2923
2011-05-30 04:48:25 -07:00
Amar Tumballi
dd55755e0c rpc-clnt: consider the (re-)configured port for only one connect() call
this way, if remote_port is set due to queryport, that can fall back
to default port (or 'option remote-port' value) when it disconnects.

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

BUG: 2709 (issues with port (re-)configuration in client protocol)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2709
2011-05-30 02:08:07 -07:00
Vijay Bellur
b4fc412a46 rpc: Introduce option for listen()'s backlog
Signed-off-by: Vijay Bellur <vijay@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2941 (glusterd breaks when starting ~100 volumes)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2941
2011-05-30 01:49:24 -07:00
Venky Shankar
2cd8411a02 cli log level command and per translator log level
Signed-off-by: Venky Shankar <venky@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2714 (implement cli log level command)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2714
2011-05-20 11:01:49 -07:00
shishir gowda
357df32e16 Introduce client-allow-insecure xlator-option.
Allows glusterfs clients to bind to any port and does not restrict it
to 1024.

This is a xlator-option only, and is not supported in volume set cmd.
The reason is, few clients may choose this, and few may not. Hence
only supported as a xlator-option during mount time.

For this to work with glusterfs, server.allow-insecure should be set
to on

Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2868 (Add xlator-option to support insecure-bind for clients)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2868
2011-05-12 09:29:21 -07:00
Csaba Henk
97fdc05ab8 glusterd / cli / rpc: move geo-replication reply parameters into dict
Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2785 (gsyncd logs on slave side go to /dev/null)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
2011-05-09 13:26:48 -07:00
Csaba Henk
0dd8c38d17 geo-replication: revamp CONFIG command
Drop the config_type RPC req field, use just a "subop" key in the param dict.

Signed-off-by: Csaba Henk <csaba@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2785 (gsyncd logs on slave side go to /dev/null)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
2011-04-21 00:39:50 -07:00
Csaba Henk
184fba3788 cli: implement "system:: getwd" command
Signed-off-by: Csaba Henk <csaba@lowlife.hu>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2785 (gsyncd logs on slave side go to /dev/null)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2785
2011-04-19 02:30:18 -07:00
Kaushik BV
4b813b3d14 mgmt/glusterd: unify the geo-replication status rpc messages.
the intelligence of determining the type of status command is now at glusterd,
rather then explicitly setting it while parsing at cli.

Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2536 (gsync service introspection)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2536
2011-04-17 21:40:59 -07:00
Kaushik BV
93cb168fb3 mgmt/glusterd: Implementation of volume gsync status [master [slave]]
Changes made in the path of gsync start/stop as well, where we
maintain a list of  active gsync sessions, hence gsync stop could be
executed at all nodes.
A new dict in glusterd_volinfo_t added to maintain an active list
of gsync slaves running on each master.

Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2536 (gsync service introspection)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2536
2011-04-14 01:00:55 -07:00
Pranith Kumar K
7cf0dbcd30 mgmt/glusterd: Remove excessive INFO logs
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2346 (Log message enhancements in GlusterFS - phase 1)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
2011-04-13 01:04:11 -07:00
Amar Tumballi
ba365f725a remove excessive logs due to log enhancement
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>

BUG: 2346 (Log message enhancements in GlusterFS - phase 1)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
2011-04-13 00:38:47 -07:00
Pavan T C
b65f54c9aa Loosen restrictions on hostnames
Signed-off-by: Pavan T C <tcp@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2249 (Problems with hostname validation)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2249
2011-03-29 04:14:35 -07:00
Pranith K
8a15f00cd8 rpc: Don't warn on failure to bind to privileged port
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2582 (allow option to accept messages from insecure ports)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2582
2011-03-26 08:38:59 -07:00
Pranith K
3f37921807 rpc: Provide an option to allow insecure ports
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2582 (allow option to accept messages from insecure ports)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2582
2011-03-26 08:38:55 -07:00
Gaurav
9bd4f25b6b CLI : Validate options farmework.
Signed-off-by: Gaurav <gaurav@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2064 (NFS options are removed upon glusterd restart)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2064
2011-03-23 04:55:29 -07:00
Amar Tumballi
6167c66758 spelling errors fixed across the code base
recieve -> receive
maintainence -> maintenance
verison -> version
commited -> committed

Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2262 (Spelling errors in source)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2262
2011-03-22 04:02:10 -07:00
Amar Tumballi
e02171f1b8 rpc-transport: log enhancement
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2346 (Log message enhancements in GlusterFS - phase 1)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
2011-03-17 11:57:51 -07:00
Amar Tumballi
02d8dcbb5c rpc-transport: whitespace cleanup
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2346 (Log message enhancements in GlusterFS - phase 1)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
2011-03-17 11:57:47 -07:00
Amar Tumballi
d4aae8327a rpc/rpc-lib : log enhancements
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2346 (Log message enhancements in GlusterFS - phase 1)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
2011-03-17 11:57:43 -07:00
Amar Tumballi
abc2a6b0b9 glusterfsd: log enhancement
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2346 (Log message enhancements in GlusterFS - phase 1)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2346
2011-03-17 11:57:39 -07:00
shishir gowda
3d1fc9ebe2 TOP: cli, rpc/xdr related changes
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2516 (Implement gluster volume top command)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2516
2011-03-16 02:35:30 -07:00
Mohammed Junaid Ahmed
8221c3cae1 rpc: QUOTA rpc related changes.
Signed-off-by: Junaid <junaid@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2473 (Support for volume and directory level quota)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2473
2011-03-16 00:04:44 -07:00
Kaushik BV
9043b0f8b9 mgmt/Glusterd: Make use of regexp pattern-matching sections to set a sane value for remote-gsyncd
Signed-off-by: Kaushik BV <kaushikbv@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2427 (set a proper default for remote syncdaemon)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2427
2011-03-14 04:57:00 -07:00
Raghavendra G
5a8edf3fc4 rpc-transport/rdma: handle cases where peer is NULL in send_completion.
- There can be valid cases where peer is NULL - For eg., race b/w pollin
    received on handshake socket and as a result transport getting disconnected
    and handling of a send/recv completion on the same qp for some previous
    read/write - in send/recv_completion_process. Hence we should be checking
    for a valid peer pointer before accessing it.

Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 2514 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2514
2011-03-12 05:10:29 -08:00
Pranith K
34bf8de743 mgmt/glusterd: gluster profile implementation
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 1965 (need a cmd to get io-stat details)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1965
2011-03-10 08:09:47 -08:00
Pranith K
970b22e377 rpc/xdr: Add gluster profile and brick op structures
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 1965 (need a cmd to get io-stat details)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1965
2011-03-10 08:09:42 -08:00
Pranith K
d23585307a rpc: Changes for handling unix domain sockets avoid race
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>

BUG: 1965 (need a cmd to get io-stat details)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1965
2011-03-10 08:09:30 -08:00
Amar Tumballi
4175d3e8e2 gluster rebalance: give option to split the command
the 'gluster volume rebalance <VOLNAME> start' is enhanced with two more options:

* 'gluster volume rebalance <VOLNAME> fix-layout start' (for fixing layout only)
* 'gluster volume rebalance <VOLNAME> migrate-data start' (for migrating data only)

Also the old way of running rebalance in one shot will still work fine

* 'gluster volume rebalance <VOLNAME> start'

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

BUG: 2258 (enhance gluster volume rebalance)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2258
2011-03-01 15:10:40 -08:00
Amar Tumballi
ae578f0c65 gluster rebalance: get the proper/exact error msg to cli
introduce a new field in XDR structure, and hence change the version
of program.

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

BUG: 1922 (Volume not present wrong message displayed on command line)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1922
2011-03-01 15:10:35 -08:00