490 Commits

Author SHA1 Message Date
Rajesh Amaravathi
2da18b6724 transport/socket: configuring tcp window-size
Till now, send and recieve buffer window sizes for sockets
were set to a default glusterfs-specific value.
Linux's default window sizes have been found to be better
w.r.t performance, and hence, no more setting it to any
default value.

However, if one wishes, there's the new configuration option:
   network.tcp-window-size <sane_size>
which takes a size value (int or human readable) and will set
the window size of sockets for both clients and servers.
Nfs clients will also be updated with the same.

Change-Id: I841479bbaea791b01086c42f58401ed297ff16ea
BUG: 795635
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.com/2821
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-29 02:10:44 -08:00
Amar Tumballi
67104b716a mempool: adjustments in pool sizes
* while creating 'rpc_clnt', the caller knows what would be the ideal
  load on it, so an extra argument to set some pool sizes

* while creating 'rpcsvc', the caller knows what would be the ideal
  load of it, so an extra argument to set request pool size

* cli memory footprint is reduced

Change-Id: Ie245216525b450e3373ef55b654b4cd30741347f
Signed-off-by: Amar Tumballi <amarts@redhat.com>
BUG: 765336
Reviewed-on: http://review.gluster.com/2784
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-22 04:23:48 -08:00
Amar Tumballi
bca46fd46b rpc/clnt: handle PARENT_DOWN event appropriately
Change-Id: I4644e944bad4d240d16de47786b9fa277333dba4
BUG: 767862
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Reviewed-on: http://review.gluster.com/2735
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-21 01:42:42 -08:00
Pranith Kumar K
81ab6622d4 cluster/afr: Add commands to see self-heald ops
Change-Id: Id92d3276e65a6c0fe61ab328b58b3954ae116c74
BUG: 763820
Signed-off-by: Pranith Kumar K <pranithk@gluster.com>
Reviewed-on: http://review.gluster.com/2775
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-20 21:23:37 -08:00
Krishna Srinivas
ed20369794 NLM - Network Lock Manger V4
Change-Id: Ic31b8bb10a28408da2a623f4ecc0c60af01c64af
BUG: 795421
Signed-off-by: Krishna Srinivas <ksriniva@redhat.com>
Reviewed-on: http://review.gluster.com/2711
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-02-20 07:26:51 -08:00
Mohammed Junaid
f764516c2e protocol/client,server: fcntl lock self healing.
Currently(with out this patch), on a disconnect the server cleans up
the transport which inturn closes the fd's and releases the locks acquired on
those fd's by that client. On a reconnect, client just reopens the fd's but
doesn't reacquire the locks. The application that had previously acquired
the locks still is under the assumption that it is the owner of those locks
which might have been granted to other clients(if they request) by the server
leading to data corruption.

This patch allows the client to reacquire the fcntl locks (held on the fd's)
during client-server handshake.

* The server identifies the client via process-uuid-xl (which is a combination
  of uuid and client-protocol name, it is assumed to be unique) and lk-version
  number.

* The client maintains a list of process-uuid-xl, lk-version pair for each
  accepted connection. On a connect, the server traverses the list for a
  matching pair, if a matching pair is not found the the server returns
  lk-version with value 0, else it returns the lk-version it has in store.

* On a disconnect, the server and client enter grace period, and on the
  completion of the grace period, the client bumps up its lk-version number
  (which means, it will reacquire the locks the next time) and the server will
  distroy the connection. If reconnection happens within the grace period, the
  server will find the matching (process-uuid-xl, lk-version) pair in its list
  which guarantees that the fd's and there corresponding locks are still valid
  for this client.

Configurable options:
  To set grace-timeout, the following options are
    option server.grace-timeout value
    option client.grace-timeout value

  To enable or disable the lk-heal,
    option lk-heal [on|off]

gluster volume set command can be used to configurable options
Change-Id: Id677ef1087b300d649f278b8b2aa0d94eae85ed2
BUG: 795386
Signed-off-by: Mohammed Junaid <junaid@redhat.com>
Reviewed-on: http://review.gluster.com/2766
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-20 04:45:31 -08:00
Amar Tumballi
c0b8e886ca iobuf: use 'iobuf_get2()' to get variable sized buffers
added 'TODO' in places where it is missing.

Change-Id: Ia802c94e3bb76930f7c88c990f078525be5459f5
Signed-off-by: Amar Tumballi <amar@gluster.com>
BUG: 765264
Reviewed-on: http://review.gluster.com/388
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-20 00:46:27 -08:00
shishirng
7ba1e1ed45 cluster/dht: Rebalance will be a new glusterfs process
rebalance will not use any maintainance clients. It is replaced by syncops,
with the volfile. Brickop (communication between glusterd<->glusterfs process)
is used for status and stop commands.

Dept-first traversal of dir is maintained, but data is migrated as and when
encounterd.
fix-layout (dir)
do
        Complete migrate-data of dir
        fix-layout (subdir)
done

Rebalance state is saved in the vol file, for restart-ability.
A disconnect event and pidfile state determine the defrag-status

Signed-off-by: shishirng <shishirng@gluster.com>
Change-Id: Iec6c80c84bbb2142d840242c28db3d5f5be94d01
BUG: 763844
Reviewed-on: http://review.gluster.com/2540
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
2012-02-19 01:31:19 -08:00
Rajesh Amaravathi
df12073c4c cli/glusterd: volume status modification
* Method of getting mount details of brick has been
  changed from direct reading of /etc/mtab to using
  libc's <mntent.h>, providing a fairly portable
  version independent of different linux distributions.
  It is only supported on Linux though.

* Wrong fs type (rootfs for /) in fedora-based
  distributions has been fixed.

* Allows options (detail, mem, fd, et al) to "all" volumes.

* Use of the fnmatch's GNU extension flag,
  FNM_LEADING_DIR is restricted to Linux hosts only.
  In case of non-Linux hosts, partial match functionality
  is absent.

Change-Id: I102ce808c192ef635c2536a2167101be0aa0fc50
BUG: 786367
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.com/2705
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-18 00:03:00 -08:00
Krishnan Parthasarathi
acb691f890 cli, glusterd : Added support for clear-locks command.
Change-Id: I8e7cd51d6e3dd968cced1ec4115b6811f2ab5c1b
BUG: 789858
Signed-off-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/2552
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-17 04:50:55 -08:00
Amar Tumballi
7fa06c4ce1 protocol: remove the 'path<>' from rename() and link()
missed it in the previous round of cleanup, path is completely
useless in resolve function.

Change-Id: I1aef0f5276afb77dfacfcc0c337ac80b4fcacc55
Signed-off-by: Amar Tumballi <amar@gluster.com>
BUG: 790298
Reviewed-on: http://review.gluster.com/2756
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-02-16 22:49:15 -08:00
Kaushal M
26800453aa cli: Enable output in XML
This patch enables gluster cli to output data in xml format. XML output can be
obtained by passing "--xml" as an argument.

A new "volume list" command, which lists the volumes present in a cluster, has
been added. This can be used for obtaining a quick list of volumes.

Several commands, including "volume top", "volume profile", "volume status" and
"volume info", "volume list", have custom XML output routines. Other commands
use either one of the 2 generic output routines, cli_xml_output_str() &
cli_xml_output_dict().
NOTE: When using "all" for "volume status" and "volume info" the XML output will
have multiple roots.

Change-Id: I6117baa02ec06fda116177dbd401f66521263ac6
BUG: 790713
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/2753
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2012-02-15 21:45:27 -08:00
Amar Tumballi
5f002b5418 protocol xdr: remove 'path<>'
client was sending 'path' on wire, which gets ignored on server
side, and also doesn't get freed up, which causes memory leak.

also with not having path on wire, the xdr size on wire most of the
time can remain constant, which helps in allocating RDMA buffers.

Change-Id: Ie0d36a670be60b02fd1e925c6f977b1a71def5cd
BUG: 790298
Signed-off-by: Amar Tumballi <amar@gluster.com>
Reviewed-on: http://review.gluster.com/2744
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-02-14 04:34:06 -08:00
Amar Tumballi
69a7f2fea2 rpc : fix the leak with glusterfs v2 auth structure conversion
both 'groups' and 'lkowner' were getting leaked after the conversion

Change-Id: Iab7cc1cf5afdad18ead9f33e6ccf98e0a934a09a
BUG: 790298
Signed-off-by: Amar Tumballi <amar@gluster.com>
Reviewed-on: http://review.gluster.com/2746
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-02-14 04:27:29 -08:00
Amar Tumballi
0e6df0100e core: add an extra flag to readv()/writev() API
needed to implement a proper handling of open flag alterations
using fcntl() on fd.

Change-Id: Ic280d5db6f1dc0418d5c439abb8db1d3ac21ced0
Signed-off-by: Amar Tumballi <amar@gluster.com>
BUG: 782265
Reviewed-on: http://review.gluster.com/2723
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@redhat.com>
2012-02-14 01:09:02 -08:00
Jeff Darcy
635f3bc0f8 Fix case where we free a definitely-NULL iobuf
Change-Id: I7097386b41c8881f875c9cc3e41354df5c904dea
BUG: 789118
Signed-off-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-on: http://review.gluster.com/2732
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Harshavardhana <fharshav@redhat.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
2012-02-10 02:59:23 -08:00
Kaushal M
623919a78a cli: Extend "volume status" with statedump info
This patch enhances and extends the "volume status" command with information
obtained from the statedump of the bricks of volumes.

Adds new status types : clients, inode, fd, mem, callpool
The new syntax of "volume status" is,
 #gluster volume status [all|{<volname> [<brickname>]
                         [misc-details|clients|inode|fd|mem|callpool]}]

Change-Id: I8d019718465bbc3de727653a839de7238f45da5c
BUG: 765495
Signed-off-by: Kaushal M <kaushal@redhat.com>
Reviewed-on: http://review.gluster.com/2637
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
2012-01-27 04:20:04 -08:00
Amar Tumballi
e987525257 protocol: allow extra data in all the 'fops' over wire
Change-Id: I3920c68b5b317fc4a4acfd26d64d900bf7bd59d1
BUG: 782265
Signed-off-by: Amar Tumballi <amar@gluster.com>
Reviewed-on: http://review.gluster.com/2511
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
2012-01-25 02:28:07 -08:00
Amar Tumballi
d7ecaaa1ed core: add 'fremovexattr()' fop
so operations can be done on fd for extended attribute removal

Change-Id: Ie026f1b53793aeb4ae33e96ea5408c7a97f34bf6
Signed-off-by: Amar Tumballi <amar@gluster.com>
BUG: 766571
Reviewed-on: http://review.gluster.com/778
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
2012-01-25 02:24:20 -08:00
Amar Tumballi
cf8486cbef core: get xattrs also as part of readdirp
readdirp_req() call sends a dict_t * as an argument, which
contains all the xattr keys for which the entries got in
readdirp_rsp() are having xattr value filled dictionary.

Change-Id: I8b7e1290740ea3e884e67d19156ce849227167c0
Signed-off-by: Amar Tumballi <amar@gluster.com>
BUG: 765785
Reviewed-on: http://review.gluster.com/771
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
2012-01-25 02:03:44 -08:00
Amar Tumballi
b02afc6d00 core: change lk-owner as a 1k buffer
so, NLM can send the lk-owner field directly to the locks translators,
while doing the same effort, also enabled sending maximum of 500 aux gid
over protocol.

Change-Id: I87c2514392748416f7ffe21d5154faad2e413969
Signed-off-by: Amar Tumballi <amar@gluster.com>
BUG: 767229
Reviewed-on: http://review.gluster.com/779
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
2012-01-24 20:14:17 -08:00
Csaba Henk
4e92c58d27 rpc: extend actors with flag signing if privilege is required
Currently we allow the following RPC messages for unprivileged users:
GLUSTER_CLI_GETWD, GLUSTER_CLI_MOUNT, GLUSTER_CLI_UMOUNT

Change-Id: I05414f3ca7cbe47de45c5e5cfba1537efc774e6c
BUG: 781256
Signed-off-by: Csaba Henk <csaba@gluster.com>
Reviewed-on: http://review.gluster.com/2641
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
2012-01-21 05:33:19 -08:00
Niels de Vos
718a274407 trivial: correctly document that GLUSTER_CLI_VERSION=2 matches version 0.0.2
Change-Id: I0d7eb0ac67ad83e5f21b60cc2acc514ac602ea42
BUG: 772469
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.com/2604
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
2012-01-12 21:43:54 -08:00
Rajesh Amaravathi
169c73f28d cli: volume status enhancement
* Support "gluster volume status (all)" option to display all
      volumes' status.

    * On option "detail" appended to "gluster volume status *",
      amount of storage free, total storage, and backend filesystem
      details like inode size, inode count, free inodes, fs type,
      device name of each brick is displayed.

    * One can also obtain [detailed]status of only one brick.

    * Format of the enhanced volume status command is:
      "gluster volume status [all|<vol>] [<brick>] [detail]"

    * Some generic functions have been added to common-utils:

           skipword
           get_nth_word
      These functions enable parsing and fetching
      of words in a sentence.

           glusterd_get_brick_root    (in glusterd)
      These are self explanatory.

Change-Id: I6f40c1e19810f8504cd3b1786207364053d82e28
BUG: 765464
Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com>
Reviewed-on: http://review.gluster.com/777
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
2012-01-12 01:58:26 -08:00
Harshavardhana
7eed1d5ba5 transport/rdma: Add attr_timeout, attr_retry_cnt, attr_rnr_retry
as configurable options

Change-Id: Ifc4710f149be35979746ddfbfb4181638601bc64
BUG: 766040
Signed-off-by: Harshavardhana <fharshav@redhat.com>
Reviewed-on: http://review.gluster.com/766
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-12-20 09:53:17 -08:00
shishir gowda
3853f4ccaf rpc-transport/socket: Donot fail reconnect if error is ENOENT
A AF_UNIX family socket should retry connect if error is ENOENT.

Signed-off-by: shishir gowda <shishirng@gluster.com>
Change-Id: I23b1da12faadc8043d370862bfe29c0c5c223364
BUG: 767932
Reviewed-on: http://review.gluster.com/795
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-12-19 08:53:58 -08:00
Raghavendra G
7ae082e9c5 rpc-transport/rdma: add gf_ prefix to all procedure, variable names
Change-Id: I251be23d2c60b88589f71e7a8c3b1f2b7e3eb3e6
BUG: 3319
Reviewed-on: http://review.gluster.com/148
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
Reviewed-by: Anand Avati <avati@gluster.com>
2011-11-24 00:38:21 -08:00
Niels de Vos
3b2febc1c4 rpc-transport: fix some indentions
Some lines are indented with spaces, others with tabs. When Tabs are not
disaplayd as 8 spaces, the indention is completely messed-up.

Change-Id: I31ddf44c5b7f5fe1c5493adca98e95514f2920bd
BUG: 3822
Signed-off-by: Niels de Vos <ndevos@redhat.com>
Reviewed-on: http://review.gluster.com/742
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
2011-11-23 21:15:47 -08:00
Krishnan Parthasarathi
88ee850e68 rpc: Need to update conn->last_recieved.
This is important for protocol/client's ping_timer to function correctly.

Change-Id: I9f45d701126bb739535d9c5ec280833362bef9ed
BUG: 3816
Reviewed-on: http://review.gluster.com/512
Reviewed-by: Amar Tumballi <amar@gluster.com>
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
2011-11-18 04:26:01 -08:00
Harshavardhana
51a78ad316 glusterfs: An effort to fix all the spell mistakes and typo
in the entire glusterfs codebase.

This patch fixes many of spell mistakes and typo in the entire
glusterfs codebase and all supported modules.

Change-Id: I83238a41aa08118df3cf4d1d605505dd3cda35a1
BUG: 3809
Signed-off-by: Harshavardhana <fharshav@redhat.com>
Reviewed-on: http://review.gluster.com/731
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-11-16 21:08:56 -08:00
Amar Tumballi
a3c49bb260 glusterd: remove some of the stale 'log <CMD>' functions
Change-Id: Ibda7e9d7425ecea8c7c673b42bc9fd3489a3a042
BUG: 3158
Reviewed-on: http://review.gluster.com/726
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
2011-11-16 01:47:18 -08:00
Amar Tumballi
a29ab15988 glusterd/cli: rpc cleanup
no more backward compatibility between glusterd <-> glusterd

Change-Id: Ibfcca1c7e315a90b2639c4cba8da19b11875051a
BUG: 3158
Reviewed-on: http://review.gluster.com/610
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Shishir Gowda <shishirng@gluster.com>
Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-11-16 01:45:24 -08:00
shishir gowda
7a97478dd1 XDR: cli-glusterd xdr consolidation
By using only 1 xdr struct for request and 1 xdr struct for response,
we will be able scale better and also be able to parse the o/p better

For request use-
        gf1_cli_req - contains dict
For response use-
        gf1_cli_rsp - conains op_ret, op_errno, op_errstr, dict

Change-Id: I94b034e1d8fa82dfd0cf96e7602d4039bc43fef3
BUG: 3720
Reviewed-on: http://review.gluster.com/662
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
2011-11-16 01:42:29 -08:00
Raghavendra G
62088ee6a8 rpc-transport/rdma: send correct vector count when both rpc-header and program-header are received through rdma-reads.
Change-Id: I1b0b91eb7216f32a5748325d6dda37f3998302c7
BUG: 3754
Reviewed-on: http://review.gluster.com/697
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-11-15 23:32:59 -08:00
Venky Shankar
bdf20a205a cli: add geo-replication log-rotate command
Rotating geo-replication master/monitor log files from cli.
On invocation, the log file for a given master-slave session
is backed up with the current timestamp suffixed to the file
name and signal is sent to gsyncd to start logging to a new
log file.

Sample commands:

* Rotate log file for this <master>:<slave> session:
gluster volume geo-replication <master> <slave> log-rotate

* Rotate log files for all session for master volume <master>
gluster volume geo-replication <master> log-rotate

* Rotate log files for all sessions:
gluster volume geo-replication log-rotate

Change-Id: I75f641b4e082a04d5373c18583ca4a1d9651d27a
BUG: 3519
Reviewed-on: http://review.gluster.com/529
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Csaba Henk <csaba@gluster.com>
2011-10-20 23:26:23 -07:00
Kaushal M
161ab1b966 glusterd: cleanup unneeded volumes after peer detach
Performs cleanup on the detached peer and in the cluster after a
peer detach, and also adds a new check before starting detach.

Cleanup -
 On the detached peer, cleanup removes the entries of those volumes
on the peer that do not have all their bricks on it. This prevents
these stale volumes from being added to a new cluster when peer is
attached to one.
 In the cluster, all those volumes which have all their bricks on the
detached peer are removed.

Checks-
 Checks if all the peers in the cluster are online and connected,
 except the peer being detached, before starting detach. Using force
 will bypass this check and do detach.

Change-Id: I4fef9ea3cc72ce8c4ce0a82b4ee8a1663a502061
BUG: 1926
Reviewed-on: http://review.gluster.com/431
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
2011-10-01 05:54:56 -07:00
Kaushal M
acea7409a3 glusterd, cli: adds 'force' for 'peer detach'
Adds add a 'force' option to 'peer detach' to forcefully detach a peer from a
cluster, even when the cluster contains volumes with bricks on the peer.

Change-Id: I134df51c16a07345c8869b318141d427b572eba5
BUG: 3549
Reviewed-on: http://review.gluster.com/429
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
2011-10-01 05:54:42 -07:00
Jeff Darcy
abb4cbeea3 Second round of warning suppression.
Used a #pragma to kill ~170 in rpcgen code.  Added GF_UNUSED to deal with
a few more from macros elsewhere.  The remainder are function return values
(mostly context and dict calls) that really should be checked.  Those would
be harder to fix without real understanding of the code where they occur,
so they remain as reminders.

(Patchset 2: deal with older gcc that doesn't handle #pragma GCC diagnostic)

(Patchset 3: fix include paths in generated files)

(Patchset 4: keep up with trunk, squash 9 new warnings)

(Patchset 5: six more, all in AFR)

Change-Id: I29760c8c81be4d7e6489312c5d0e92cc24814b7b
BUG: 2550
Reviewed-on: http://review.gluster.com/378
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-09-29 11:52:30 -07:00
krishna
8b539b2a3d by default make option rpc-auth.addr.namelookup off.
Change-Id: I11c1d55bebfc86c634cf446c50585f6c56c02665
BUG: 3345
Reviewed-on: http://review.gluster.com/204
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-09-27 09:00:48 -07:00
Kaushal M
45172a5415 cli : new volume statedump command
Changes:
        1. Add a new 'volume statedump' command, that performs statedumps of
        all the bricks in the volume and saves them in a specified location.
        2. Add new server option 'server.statedump-path'.
        3. Remove multiple function definitions in glusterd.h

Statedump Information:

The 'volume statedump' command performs statedumps on all the bricks in
a given volume. The syntax of the command is,
        gluster volume statedump <VOLNAME> [type]......

Types include,
        * all
        * mem
        * iobuf
        * callpool
        * priv
        * fd
        * inode
Defaults to 'all' when no type is specified.

The statedump files are created by default in /tmp directory of the
server on which the bricks are present.
This path can be changed by setting the 'server.statedump-path' option.

The statedump files will be named as,
        <brick-name>.<pid of brick process>.dump

Change-Id: I01c0e1a8aad490da818e086d89f292bd2ed06fd4
BUG: 1964
Reviewed-on: http://review.gluster.com/321
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
2011-09-27 06:45:10 -07:00
Kaushik BV
16b7e3bf20 build: Solaris build fixes
Change-Id: Ic47d07a199ecbc42a141e391bbc75096e270e404
BUG: 3446
Reviewed-on: http://review.gluster.com/503
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
2011-09-27 05:44:41 -07:00
Anand Avati
b894944857 rpc: fix wrong wiping of state machine's state
The macro __socket_proto_read() is used to read one sub-header in a fragment
after another. It also has to 'get out' of the state machine's
switch/case construct in two situations -

a) finished reading the full header

b) after a partial read, (and return in the same state at next pollin)

The 'reset' of the state should happen only after a full read of the header
and not if there was a partial read of the header.

Change-Id: I3650a83e1fae0f317cfd1b549835c72e39dc5253
2011-09-25 18:45:12 +05:30
Krishnan Parthasarathi
1fdcbb6187 rpc: No timeouts for lock fops.
As of today, all fops bail out after 30 mins by default. This is not desirable
with lock fops since it could be 'rightfully blocked' for a really long time.
But the client would assume that the lock fop has 'expired' after 30 mins and
clean up its references to the locks.  Later when the locks xlator decides to
grant it, we are left with an orphan (stale) lock .

This fix exempts lock fops from timeouts. Only on network disruptions both
client and server decide to 'clean up' the locks held.

Change-Id: If1d74ba21113650b976728e9b764c551a0a49e59
BUG: 3617
Reviewed-on: http://review.gluster.com/478
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
2011-09-23 06:11:32 -07:00
Krishnan Parthasarathi
4765dd1a1c glusterd: Implemented cmd to trigger self-heal on a replicate volume.
This cmd is used in the context of proactive self-heal for replicated
volumes. User invokes the following cmd when (s)he suspects that self-heal
needs to be done on a particular volume,
        gluster volume heal <VOLNAME>.

Change-Id: I3954353b53488c28b70406e261808239b44997f3
BUG: 3602
Reviewed-on: http://review.gluster.com/454
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-09-22 09:43:25 -07:00
Gaurav
2e61c86ba8 NFS : Posix compliance fixes.
Change-Id: I4f1d8883a3eedee20557e306815674a6dc062bfe
BUG: 1337
Reviewed-on: http://review.gluster.com/487
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-09-22 04:51:22 -07:00
Vijay Bellur
e017877654 rpc:memcpy data of right size to auth params
Change-Id: I6999e0a1463ee3475f7607990337326b3f008538
BUG: 3587
Reviewed-on: http://review.gluster.com/464
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amar@gluster.com>
2011-09-19 22:00:08 -07:00
krishna
9eec790063 rpc: Use correct variable for volume-specific insecure ports check
Change-Id: Ica59a3154c4e7d980d3477dd3879c7cebe92ad87
BUG: 3515
Reviewed-on: http://review.gluster.com/418
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-09-18 22:17:26 -07:00
Csaba Henk
77cce4c7df rpc: fix up mountbroker xdr defs and regenerate headers
Change-Id: I8a88d2b9228c3614ee7cbaf48782a419e6aee0f6
BUG: 3482
Reported-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-on: http://review.gluster.com/432
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-09-15 21:56:12 -07:00
Amar Tumballi
25daa42911 support for de-commissioning a node using 'remove-brick'
to achieve this, we now create volume-file with
'decommissioned-nodes' option in distribute volume, then just
perform the rebalance set of operations (with 'force' flag set).

now onwards, the 'remove-brick' (with 'start' option) operation tries
to migrate data from removed bricks to existing bricks.

'remove-brick' also supports similar options as of replace-brick.

* (no options) -> works as 'force', will have the current behavior
         of remove-brick, ie., no data-migration, volume changes.

* start  (starts remove-brick with data-migration/draining process,
          which takes care of migrating data and once complete, will
          commit the changes to volume file)
* pause  (stop data migration, but keep the volume file intact with
          extra options whatever is set)
* abort  (stop data-migration, and fall back to old configuration)
* commit (if volume is stopped, commits the changes to volumefile)
* force  (stops the data-migration and commits the changes to
          volume file)

Change-Id: I3952bcfbe604a0952e68b6accace7014d5e401d3
BUG: 1952
Reviewed-on: http://review.gluster.com/118
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-09-13 02:10:12 -07:00
Amar Tumballi
58c5e9feae socket: provide proper arguments to getaddrinfo
-----
from 'man getaddrinfo' :

If hints.ai_flags includes the AI_ADDRCONFIG flag, then IPv4 addresses
are returned in the list pointed to by res only if the local system has
at least one IPv4 address  configured, and IPv6 addresses are only
returned if the local system has at least one IPv6 address configured.
-----

Change-Id: Ie30344daf1bb9d41ac58741b38e83af35cd8b5e9
BUG: 2456
Reviewed-on: http://review.gluster.com/405
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Vijay Bellur <vijay@gluster.com>
2011-09-13 00:04:33 -07:00