summaryrefslogtreecommitdiffstats
path: root/rpc/xdr
Commit message (Collapse)AuthorAgeFilesLines
* ACLv3 - Access Control Lists V3Krishna Srinivas2012-11-136-2/+293
| | | | | | | | | | Change-Id: I43e544d6cdeac5e3880141477461e7c22cbf6e91 BUG: 847622 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: http://review.gluster.org/4045 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: op-version handshake implementationKaushal M2012-10-303-59/+117
| | | | | | | | | | | | | Brings in a new rpc program MGMT_HANDSHAKE, which implements the op-version handshake. This is required for bringing in the op-version feature as described in http://www.gluster.org/community/documentation/index.php/Features/Opversion Change-Id: I4333fd2714dbbd3a2a3fca5862cbb3c56615529e BUG: 814534 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/3688 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* build: remove useless explicit -fPIC -shared fromJeff Darcy2012-10-031-1/+1
| | | | | | | | | | | | | | | | | | | | CFLAGS libtool will automatically add "-fPIC" to the compiler command line as needed, so there is no need to specify it separately. "-shared" is normally a linker flag and has an odd effect when used with libtool --mode=compile, namely that it inhibits production of static objects. For that however, using AC_DISABLE_STATIC is a lot simpler. Change-Id: Ic4cba0fad18ffd985cf07f8d6951a976ae59a48f BUG: 862082 Original-author: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4027 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* build: remove -nostartfiles flagJeff Darcy2012-10-021-1/+1
| | | | | | | | | | | | | | | The "-nostartfiles" is a discouraged option and is documented to potentially result in undesired behavior. Since I see no reason why it should be in glusterfs, remove it. Change-Id: I56f2b08874516ebad91447b2583ca2fb776bb7ab BUG: 862082 Original-author: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4018 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* build: consolidate common compilation flags into one variableJeff Darcy2012-10-011-2/+1
| | | | | | | | | | | | | | | Some -D flags are present in all files, so collect them. This adds -D${GF_HOST_OS} to some compiler command lines, but this should not be a problem. Change-Id: I1aeb346143d4984c9cc4f2750c465ce09af1e6ca BUG: 862082 Original-author: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Jan Engelhardt <jengelh@inai.de> Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4013 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Add support for --enable-debug configure optionDeepak C Shetty2012-08-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | Currently default build adds -g -O2 to CFLAGS unconditionally and there is no way to control them from configure. This patch adds support for --enable-debug option to the configure cmdline. If yes, then only -g is added. If no, then -g -O2 is added. Build defaults to --enable-debug=no. Also fixes couple of Makefile.am's which had -g hardcoded. v2: Adds -O0 for debug=yes case. v3: Added bugID while submitting patch Change-Id: I7505619be6fc683de463a0bd44ba5500b0bedfe1 BUG: 851092 Signed-off-by: Deepak C Shetty <deepakcs@linux.vnet.ibm.com> Reviewed-on: http://review.gluster.org/3822 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Deepak Shetty <dpkshetty@gmail.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* acl: enable handling of FMODE_EXEC flagAmar Tumballi2012-07-271-0/+4
| | | | | | | | | | | | | | | | | | | | | | on linux systems, with open(), we can get below flag as per 'linux/fs.h'. /* File is opened for execution with sys_execve / sys_uselib */ Instead of adding '#include <linux/fs.h>, its better to copy this absolute number into other variable because then we have to deal with declaring fmode_t etc etc.. With the fix, we can handle the file with '0711' permissions in the same way as backend linux filesystems. Change-Id: Ib1097fc0d2502af89c92d561eb4123cba15713f5 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.com/3739 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libgfxdr.so: change licenseAmar Tumballi2012-07-2025-352/+125
| | | | | | | | | Change-Id: I049441e465127195c192443ab0234548d2449e50 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.com/3704 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Bharata B Rao <bharata.rao@gmail.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* remove useless if-before-free (and free-like) functionsJim Meyering2012-07-131-4/+2
| | | | | | | | | | | | See comments in http://bugzilla.redhat.com/839925 for the code to perform this change. Signed-off-by: Jim Meyering <meyering@redhat.com> BUG: 839925 Change-Id: I10e4ecff16c3749fe17c2831c516737e08a3205a Reviewed-on: http://review.gluster.com/3661 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* xdr_vector_round_up: don't let vcount <= 0 cause invalid array referenceJim Meyering2012-07-021-1/+1
| | | | | | | | | Change-Id: I6a69f20fddb7271fe47f80acb97d2198e9998ccc BUG: 789278 Signed-off-by: Jim Meyering <meyering@redhat.com> Reviewed-on: http://review.gluster.com/3605 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nfs/mount: Support MOUNT protocol on UDP. Needed for NLM on solaris clients.Krishna Srinivas2012-05-271-0/+34
| | | | | | | | | | Change-Id: I3f5c35d06827fb267a7dae53d949c61567a945d0 BUG: 799287 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: http://review.gluster.com/3337 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd,cli: Enable errstr for peer detachKaushal M2012-05-183-0/+4
| | | | | | | | | | | | | This patch adds an op_errstr member to the gf1_cli_deprobe_rsp structure to enable return of an errstr to cli. Change-Id: I0cbb6805b05d7cc0603c13d1c1550bb2bd062a7a BUG: 816840 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3307 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd, cli: Enable errstr for peer probeKaushal M2012-05-186-0/+61
| | | | | | | | | | | | | | | | | | | Presently glusterd only returns an errno to cli for peer probe command. This patch allows glusterd to return an errstr as well to cli. An op_errstr member has been added to gf1_cli_probe_rsp and gd1_mgmt_probe_rsp structs to allow this. In case of an error, cli will display the errstr if it was set. If errstr is not set cli will display the error message based on errno. Also, to allow for return of errstr in cases such as handshake failure, an errstr member has been added to the glusterd_peerctx_t struct. Change-Id: Iece2b44a7181555e960d9fe4517ec6cda4cdb385 BUG: 816840 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3262 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nfs/nlm: procedures for PC clientsRajesh Amaravathi2012-05-175-2/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * This change introduces four NLMv4 procedures: NM_LOCK, SHARE, UNSHARE and FREE_ALL. These are used by PC clients (windows/dos) to control access to files. 1. NM_LOCK: this lock is not monitored by statd. 2. SHARE: A share reservation is a lock on the whole file that is taken whenever a file is opened on windows clients. This has ACCESS (N, R, W, RW) and DENY MODE (N, R, W, RW). ACCESS: mode of access requested by the client; DENY MODE: what the requesting client wants to deny other clients. 3. UNSHARE: remove a share reservation obtained by SHARE. Called while closing a file. 4. FREE_ALL: remove all share reservations and locks, both monitored and unmonitored, of the calling client. * lock and nm_lock use a common function with only a flag conveying whether or not to monitor a lock. * NOTES: 1. SHARE reservations are not STACK_WIND'd to subsequent xlators. These are maintained in-memory in the nfs xlator. 2. Consequently, for SHARE reservations to work effectively, all PC clients *must* mount from the same gNfs server. Not doing so will result in different servers maintaining separate SHARE reservations which will not be enforced for obvious reasons. Change-Id: Id4f22670a94ed58691a6a7f4c80aa8c11421a277 BUG: 800287 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/3212 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishna Srinivas <krishna@gluster.com>
* NetBSD build fixesEmmanuel Dreyfus2012-05-151-0/+6
| | | | | | | | | | | | | Last batch of NetBSD build fixes, makes 3.3.0qa40 operational. Round 2: only include <sys/syslimits.h> for NetBSD BUG: 764655 Change-Id: Icd7290f1e340675d763665a0d0c5f95bc14e0c55 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.com/3321 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* NetBSD build fixesEmmanuel Dreyfus2012-05-111-0/+7
| | | | | | | | | | | Change-Id: Ib8183d4b585465d05a7adf3a4ceae93ae1bded15 BUG: 764655 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.com/3238 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* rebalance: handshake_event_notify to make fsd talk to glusterdshishir gowda2012-04-253-0/+62
| | | | | | | | | | | | | | | | | | | Event_notify can be used by others to communicate with glusterd. A cbk event is also added for future use. req has a op, and dict. rsp has op_ret, op_errno, and dict. With this, rebalance process can update the status before exiting. Signed-off-by: shishir gowda <shishirng@gluster.com> Change-Id: If5c0ec00514eb3a109a790b2ea273317611e4562 BUG: 807126 Reviewed-on: http://review.gluster.com/3013 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* NetBSD build fixesEmmanuel Dreyfus2012-04-231-0/+1
| | | | | | | | | | | Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Change-Id: I8f9aabeadd2f842521a82e59594115bd80155d68 BUG: 2923 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.com/3053 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd/remove-brick: Replace ABORT with STOPshishir gowda2012-04-132-2/+2
| | | | | | | | | | | | | | Remove-brick stop now invokes rebalance stop. This leads to a graceful stop of decommissioning. The volfile is also updated (removal of decommission) Change-Id: I5a8f725c0f54439b810ce32d988c21c02229c703 BUG: 811513 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/3126 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd/remove-brick: Remove support for pause optionshishir gowda2012-04-132-5/+3
| | | | | | | | | | | Decommissioning through rebalance has no pause option. Change-Id: I90f165cdb2eccfaefc99365ae4b48d81320fb753 BUG: 811459 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/3123 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* nfs/nlm: dummy actor for FREE_ALL procedureRajesh Amaravathi2012-04-051-22/+25
| | | | | | | | | | | | | | | | | NLM4_FREE_ALL rpc procedure has been provided nlm's null procedure as actor to facilitate windows Nfs mounts. NOTE: windows Nfs needs several other NLM procedures to work. As a result, this patch only makes it possible to do a working mount of a volume with "nolock" option in windows. *Windows mount WITHOUT "nolock" option does NOT work as expected* Change-Id: Ie163982497871312c5bb15f8c141fef460cadc34 BUG: 800287 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/3063 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishna Srinivas <krishna@gluster.com>
* cli,glusterd: more volume status improvementsKaushal M2012-03-292-24/+26
| | | | | | | | | | | | | | | | | | | | | | The major changes are, * "volume status" now supports getting details of the self-heal daemon processes for replica volumes. A new cli options "shd", similar to "nfs", has been introduced for this. "detail", "fd" and "clients" status ops are not supported for self-heal daemons. * The default/normal ouput of "volume status" has been enhanced to contain information about nfs-server and self-heal daemon processes as well. Some tweaks have been done to the cli output to show appropriate output. Also, changes have been done to rebalance/remove-brick status, so that hostnames are displayed instead of uuids. Change-Id: I3972396dcf72d45e14837fa5f9c7d62410901df8 BUG: 803676 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3016 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* core: adding extra data for fopsAmar Tumballi2012-03-223-51/+72
| | | | | | | | | | | | | with this change, the xlator APIs will have a dictionary as extra argument, which is passed between all the layers. This can be utilized for overloading in some of the operations. Change-Id: I58a8186b3ef647650280e63f3e5e9b9de7827b40 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 782265 Reviewed-on: http://review.gluster.com/2960 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli, glusterd, nfs: "volume status|profile|top" for nfs serversKaushal M2012-03-142-1/+3
| | | | | | | | | | | | | | | | | | | | | | Enables usage of volume monitoring operations "volume status", "volume top" and "volume profile" for nfs servers. These operations can be performed on nfs-servers by passing "nfs" as an option in cli. The output is similar to the normal brick outputs for these commands. The new syntaxes for the changed commands are as below, #gluster volume profile <VOLNAME> {start|info|stop} [nfs] #gluster volume top <VOLNAME> {[open|read|write|opendir|readdir [nfs]] |[read-perf|write-perf [nfs|{bs <size> count <count>}]]} [brick <brick>] [list-cnt <count>] #gluster volume status [all | <VOLNAME> [nfs|<BRICK>]] [detail|clients|mem|inode|fd|callpool] Change-Id: Ia6eb50c60aecacf9b413d3ea993f4cdd90ec0e07 BUG: 795267 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/2820 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com>
* NLM - Network Lock Manger V4Krishna Srinivas2012-02-2012-3/+1119
| | | | | | | | | 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>
* protocol/client,server: fcntl lock self healing.Mohammed Junaid2012-02-203-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* cluster/dht: Rebalance will be a new glusterfs processshishirng2012-02-192-19/+7
| | | | | | | | | | | | | | | | | | | | | | | | 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>
* cli/glusterd: volume status modificationRajesh Amaravathi2012-02-182-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* protocol: remove the 'path<>' from rename() and link()Amar Tumballi2012-02-163-16/+0
| | | | | | | | | | | | 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>
* protocol xdr: remove 'path<>'Amar Tumballi2012-02-143-84/+0
| | | | | | | | | | | | | | | 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>
* core: add an extra flag to readv()/writev() APIAmar Tumballi2012-02-143-0/+8
| | | | | | | | | | | | 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>
* cli: Extend "volume status" with statedump infoKaushal M2012-01-272-16/+24
| | | | | | | | | | | | | | | | | 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>
* protocol: allow extra data in all the 'fops' over wireAmar Tumballi2012-01-253-1/+547
| | | | | | | | | 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>
* core: add 'fremovexattr()' fopAmar Tumballi2012-01-253-0/+30
| | | | | | | | | | | 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>
* core: get xattrs also as part of readdirpAmar Tumballi2012-01-253-0/+14
| | | | | | | | | | | | | 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>
* core: change lk-owner as a 1k bufferAmar Tumballi2012-01-249-85/+400
| | | | | | | | | | | | | 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>
* cli: volume status enhancementRajesh Amaravathi2012-01-123-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* glusterd: remove some of the stale 'log <CMD>' functionsAmar Tumballi2011-11-163-56/+0
| | | | | | | | 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>
* XDR: cli-glusterd xdr consolidationshishir gowda2011-11-163-1469/+63
| | | | | | | | | | | | | | | | 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>
* cli: add geo-replication log-rotate commandVenky Shankar2011-10-202-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* glusterd, cli: adds 'force' for 'peer detach'Kaushal M2011-10-013-0/+4
| | | | | | | | | | | 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>
* Second round of warning suppression.Jeff Darcy2011-09-298-0/+48
| | | | | | | | | | | | | | | | | | | | | | 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>
* cli : new volume statedump commandKaushal M2011-09-273-1/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* build: Solaris build fixesv3.3.0qa12Kaushik BV2011-09-278-0/+8
| | | | | | | | 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>
* glusterd: Implemented cmd to trigger self-heal on a replicate volume.v3.3.0qa10Krishnan Parthasarathi2011-09-223-0/+63
| | | | | | | | | | | | | 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>
* rpc: fix up mountbroker xdr defs and regenerate headersCsaba Henk2011-09-153-30/+42
| | | | | | | | | | 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>
* support for de-commissioning a node using 'remove-brick'Amar Tumballi2011-09-133-1/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* glusterd / cli: mount-broker serviceCsaba Henk2011-09-123-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mountbroker is configured in glusterd volfile through a DSL which is restriced enough to be able to appear in the role of the value of a volfile knob. Basically the DSL describes set-theorical requirements against the option set which is sent by the cli (in the hope of getting a mount with these options). If the requirements meet and the volume id and the uid who is to "own" the mount can be unambigously deduced from the given request, glusterd does the mount with the given parameters. The use case of geo-replication is sugared by means of volume options which then generate a complete mount-broker option set. Demo: - add the following option to your glusterd volfile: option mountbroker-root /tmp/mbr option mountbroker.fool EQL(volfile-id=pop*|user-map-root=*|volfile-server=localhost)&MEET(user-map-root=john|user-map-root=jane) - before starting glusterd, create /tmp/mbr owned by root with mode 0755 - with cli, do $ gluster system:: mount fool volfile-id=pop33 user-map-root=jane volfile-server=localhost - on succesful completion (volume pop33 exists and is started, jane is a valid username), the mount path will be echoed to you - you can get rid of the mount by $ gluster system:: umount <mount-path> Change-Id: I629cf64add0a45500d05becc3316f67cdb5b42ff BUG: 3482 Reviewed-on: http://review.gluster.com/128 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* modify to the way we used XDR definitions files (.x files)Amar Tumballi2011-09-0718-3537/+457
| | | | | | | | | | | | | | | | | | | | | | | | Earlier: step 1: copy the existing <xdr>.x files to /tmp step 2: generate '.[ch]' files using 'rpcgen <xdr>.x' step 3: check diff with the to the existing files, add only your part of changes back to the original file. (ignore other changes). step 4: there is another file to write wrapper functions to convert structures to/from XDR buffers, update it with your new structure. step 5: use these wrapper functions in the newly written procedures. step 6: commit :-| Now: step 1: update (mostly adding only) the <xdr>.x file step 2: run '<path-to-src>/extras/generate-xdr-files.sh <xdr>.x' command step 3: implement rpc procedure to handle the request/response. step 4: commit :-) Change-Id: I219f9159fc980438c86e847c6b030be96e595ea2 BUG: 3488 Reviewed-on: http://review.gluster.com/341 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
* rpc/xdr: Fix for Solaris build failurev3.3.0qa4Vijay Bellur2011-08-201-0/+1
| | | | | | | | Change-Id: I4704dfad655a79afb87ab275ba09413f785a97a4 BUG: 3446 Reviewed-on: http://review.gluster.com/280 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Raghavendra Bhat <raghavendrabhat@gluster.com>