summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* glusterd, cli: handle uuid conflicts in probe gracefullyRaghavendra Bhat2012-07-023-3/+24
| | | | | | | | | | | | | | | | | | | | | | | A commonly faced problem among glusterfs users is: after a fresh installation of glusterfs in a virtual machine, the VM image is cloned to make multiple instances of the server. This breaks glusterd because right after glusterfs installation on the first boot glusterd would have created the node UUID and this gets inherited into the clone. The result is wierd behavior at the time of peer probe where glusterd does not (yet) deal with UUID collisions in a user friendly way. With this patch the peer which got the probe request will compare the uuid of the machine which send the probe request with its own uuid and send the proper error to cli if the uuids are same. Change-Id: I091741ec863431fb6480a09a3f4c68a0906a3339 BUG: 811493 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3612 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc: Fixed ping timer algo.Krishnan Parthasarathi2012-06-301-1/+0
| | | | | | | | | | | | | | | | | | | | | The purpose of the ping timer is to assert the absence of any evidence the server is possibly alive. The current implementation updates the 'last_sent' timer in the following points in time, - rpc_clnt_submit: when rpc messages are being queued at the transport layer. (wrong!, since we have no way to determine if server actually received the message) - rpc_clnt_notify: when client receives pollout event on sending a message on the 'wire'. (correct, since it indicates ACK from server) The fix removes the 'incorrect' update of 'last_sent'. Change-Id: I56af7b15c3672673696977a7c50ee66eafa4ec55 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/3625 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/dht: Remove dht dependency on glusterfsd-mgmtshishir gowda2012-06-295-7/+36
| | | | | | | | | | | | | | | glusterfs_ctx->notify can be used by any xlator to talk to glusterfsd-mgmt. Note- This is for any rpc communication initiated by the xlator, and not from glusterd. Change-Id: Ic0e4af106fe1e98d797ca621facda8839b87598a BUG: 835757 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.com/3618 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* localtime and ctime are not MT-SAFEKaleb S. KEITHLEY2012-06-2922-265/+227
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There are a number of nit-level issues throughout the source with the use of localtime and ctime. While they apparently aren't causing too many problems, apart from the one in bz 828058, they ought to be fixed. Among the "real" problems that are fixed in this patch: 1) general localtime and ctime not MT-SAFE. There's a non-zero chance that another thread calling localtime (or ctime) will over-write the static data about to be used in another thread 2) localtime(& <64-bit-type>) or ctime(& <64-bit-type>) generally not a problem on 64-bit or little-endian 32-bit. But even though we probably have zero users on big-ending 32-bit platforms, it's still incorrect. 3) multiple nested calls passed as params. Last one wins, i.e. over- writes result of prior calls. 4) Inconsistent error handling. Most of these calls are for logging, tracing, or dumping. I submit that if an error somehow occurs in the call to localtime or ctime, the log/trace/dump still should still occur. 5) Appliances should all have their clocks set to UTC, and all log entries, traces, and dumps should use GMT. 6) fix strtok(), change to strtok_r() Other things this patch fixes/changes (that aren't bugs per se): 1) Change "%Y-%m-%d %H:%M:%S" and similar to their equivalent shorthand, e.g. "%F %T" 2) change sizeof(timestr) to sizeof timestr. sizeof is an operator, not a function. You don't use i +(32), why use sizeof(<var>). (And yes, you do use parens with sizeof(<type>).) 3) change 'char timestr[256]' to 'char timestr[32]' where appropriate. Per-thread stack is limited. Time strings are never longer than ~20 characters, so why waste 220+ bytes on the stack? Things this patch doesn't fix: 1) hodgepodge of %Y-%m-%d %H:%M:%S versus %Y/%m/%d-%H%M%S and other variations. It's not clear to me whether this ever matters, not to mention 3rd party log filtering tools may already rely on a particular format. Still it would be nice to have a single manifest constant and have every call to localtime/strftime consistently use the same format. Change-Id: I827cad7bf53e57b69c0173f67abe72884249c1a9 BUG: 832173 Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.com/3568 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: improvements in the output of rebalance statusRaghavendra Bhat2012-06-261-9/+9
| | | | | | | | | | Change-Id: I14149dc0eef9236fb089cc1404166efee46ddd1b BUG: 834263 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3608 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* libglusterfs: Fix sizet validation for cache-sizeKaushal M2012-06-191-7/+5
| | | | | | | | | | | | | Validation of 'cache-size' option will not fail when given value is greater than max. Values lesser than min will cause validation to fail. Change-Id: I9c744b5ace10604d5a814e6218ca0d83c796db80 BUG: 831568 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3570 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol/client: Re-open should not have O_CREAT|O_TRUNC|O_EXCLPranith Kumar K2012-06-194-11/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RCA The bug is observed in 3.2.x because posix xlator changes the uid/gid of file as per frame->root-uid/gid if O_CREAT flag is set in open fop. Posix does not do this in 3.3.x so that bug does not appear anymore but this issue exposed the actual bug in client xlator re-open. Re-open of a file on re-connection should not perform re-open with the same flags at the time of open/create/opendir. Imagine a case where a file is opened with O_TRUNC|O_RDWR and some data is written to it, now if the brick goes down and comes back the file will be truncated. When I tested this case, the file is not truncated because locks xlator resets O_TRUNC unconditionally. Client xlator re-open bug and locks xlator bug cancel each other. Fix Reset O_CREAT|O_TRUNC|O_EXCL flags in re-open. Locks xlator should not reset O_TRUNC. Additional changes Removed wbflags as it is not assigned at all. Testcases Automated go program is at: ://bugzilla.redhat.com/show_bug.cgi?id=807976#c2 Change-Id: I0080344fdda2e62e7c976c35a5bf5f1fa8838891 BUG: 807976 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3582 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/marker: use buf->ia_gfid in all the lookup callbacksRaghavendra Bhat2012-06-192-10/+23
| | | | | | | | | | | | | | | | | * In general use buf->ia_gfid for gfid instead of inode's gfid in the callbacks of the fops where new inode is created (such as create, mkdir, mknod, symlink). In the callback path inode would not be having the gfid within it, if it is not yet linked to the inode table which happens in protocol/server. Change-Id: I75b348ad152a1bcd634a4c2db34aca97956ccb21 BUG: 822067 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3567 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Don't reset split-brain when data-self-heal is offPranith Kumar K2012-06-193-2/+4
| | | | | | | | | BUG: 804606 Change-Id: I8cefcb6efa687fac4ad412403c085b3767218f72 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3586 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* debug/io-stats: if some dict operation fails then goto out instead of proceedingRaghavendra Bhat2012-06-171-2/+8
| | | | | | | | | | | Change-Id: I9c6d9b48c6162f6be2b405bacfc97605909c4e5e BUG: 769826 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3569 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Treat EEXIST as success in hardlinkPranith Kumar K2012-06-141-0/+12
| | | | | | | | | BUG: 831151 Change-Id: I6ecc099cf5f3ae58b19dfb00ed0b3f9959e711e5 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3571 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli: Change cli output for heal commandsPranith Kumar K2012-06-131-5/+22
| | | | | | | | | | | Change-Id: I05011ba7c1fe79867e151672622e9d8669884dd2 BUG: 826406 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3544 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaushal M <kaushal@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc-transport/rdma: decode and handle RDMA_ERROR msgs.Raghavendra G2012-06-132-43/+55
| | | | | | | | | | | | | | RDMA_ERROR msgs are resulted as part of failure to decode requests or failure to send reply (for eg., reply being bigger than a msg that can be sent inline, but client has not provided any write-chunks to rdma-write into). Change-Id: I0184cfb5ff8f49ed892767345e32e6c7b01c49e7 BUG: 822337 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/3474 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* debug/io-stats: do not store the string allocated from stack into dictRaghavendra Bhat2012-06-131-49/+55
| | | | | | | | | | | | | | * Unlock if some error happens after the lock is held * White space cleanup Change-Id: If90d9a9ae91c485bb21b1ad222af445981edb77b BUG: 769826 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3565 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* gsyncd / geo-rep : failover/failbackCsaba Henk2012-06-133-66/+341
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit is based on Venky Shankar <vshankar@>'s original implementation. Let us first quote Venky's description, then we summarize changes to his work. ------ First version of failover/failback. Failback mechanism uses two exclusive modes: * blind-sync This mode works with xtime pairs (both master and slave) to identify candidated to sync the original master from the slave * wrapup-sync This mode is similar to the normal working of gsyncd except that orphaned entities in the gluster volume are not assigned xtimes. This prevents un-necessary transfer of data for such entities. Modes can be enabled via: gluster volume geo-replication M S config special_sync_mode blind gluster volume geo-replication M S config special_sync_mode wrapup To turn off the special modes (i.e. to revert to normal gsyncd behaviour) use: gluster volume geo-replication colon-d0 192.168.1.2::colon-d config \!special_sync_mode ------ Code has been refactored to meet following goals: - make checkpointing work with special sync modes - move out sync mode related conditionals from the crawl loop and make all decisions to be made at startup time - be intrusive to the crawl loop to smallest possible degree (we will have to change/revisit it for other reasons, and the complexity of that should not increase) So, xtime parsing/updating/evaluation that's specific to the certain special modes are represented as mixin classes; basic operation logic is in an abstract base class. On startup, special-sync-mode tunable is dynamically dispatched to the corresponding mixin and the actual master class is derived from the chosen mixin and the ABS. Change-Id: Ic9b8448f31ad4239a8200dc689f7d713662a67de BUG: 830497 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3541 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* geo-rep: checkpointingCsaba Henk2012-06-136-30/+397
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - gluster vol geo-rep M S conf checkpoint <LABEL|now> sets a checkpoint with LABEL (the keyword "now" is special, it's rendered to the label "as of <timestamp of current time>") that's used to refer to the checkpoint in the sequel. (Technically, gsyncd makes a note of the xtime of master's root as of setting the checkpoint, called the "checkpoint target".) - gluster vol geo-rep M S conf \!checkpoint deletes the checkpoint. - gluster vol geo-rep M S stat if status is OK, and there is a checkpoint configured, the checkpoint info is appended to status (either "not yet reached", or "completed at <timestamp of completion>"). (Technically, the worker runs a thread that monitors / serializes / verifies checkpoint status, and answers checkpoint status requests through a UNIX socket; monitoring boils down to querying the xtime of slave's root and comparing with the target.) - gluster vol geo-rep M S conf log-file | xargs grep checkpoint displays the checkpoint history. Set, delete and completion events are logged properly. Change-Id: I4398e0819f1504e6e496b4209e91a0e156e1a0f8 BUG: 826512 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3491 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Venky Shankar <vshankar@redhat.com>
* mgmt/glusterd: fix the infinite loop in lazy uuid generationRaghavendra Bhat2012-06-132-1/+3
| | | | | | | | | | | | | | | | | * This is how the lazy uuid generation leads to infinite loop of function calls. MY_UUID -> glusterd_uuid_init -> glusterd_retrieve_uuid -> MY_UUID * Also while starting glusterd if valgrind option is not given in the volfile, then reset the ret variable to 0. Change-Id: Ief719f436d8a264a591ee6aefc6da3c0f6c75e8f BUG: 811493 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3564 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cli: Fix time_t conversionsPranith Kumar K2012-06-121-5/+12
| | | | | | | | | | BUG: 828058 Change-Id: I2511a0473d9310d3a51d0994f415a5d319bfc98b Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3550 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* swift: Donot display async_pending container.Mohammed Junaid2012-06-111-1/+1
| | | | | | | | | | | | async_pending container is for internal, should not be exposed to the users on a GET. Change-Id: I460242667ae0cb5e96d4c63296f0bae4bb83b28e BUG: 829137 Signed-off-by: Mohammed Junaid <junaid@redhat.com> Reviewed-on: http://review.gluster.com/3547 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cluster/stripe: implement the coalesce stripe file formatBrian Foster2012-06-076-102/+882
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The coalesce file format for cluster/stripe condenses the striped files to a contiguous layout. The elimination of holes in striped files eliminates space wasted via local filesystem preallocation heuristics and significantly improves read performance. Coalesce mode is implemented with a new 'coalesce' xlator option, which is user-configurable and disabled by default. The format of newly created files is marked with a new 'stripe-coalesce' xattr. Cluster/stripe handles/preserves the format of files regardless of the current mode of operation (i.e., a volume can simultaneously consist of coalesced and non-coalesced files). Files without the stripe-coalesce attribute are assumed to have the traditional format to provide backward compatibility. extras/stripe-merge: support traditional and coalesce stripe formats Update the stripe-merge recovery tool to handle the traditional and coalesced file formats. The format of the file is detected automatically (and verified) via the stripe-coalesce attributes. BUG: 801887 Change-Id: I682f0b4e819f496ddb68c9a01c4de4688280fdf8 Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.com/3282 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: generate node UUID lazilyAnand Avati2012-06-0713-62/+70
| | | | | | | | | | | | | | | | | | | | | | | | | | | | A commonly faced problem among glusterfs users is: after a fresh installation of glusterfs in a virtual machine, the VM image is cloned to make multiple instances of the server. This breaks glusterd because right after glusterfs installation on the first boot glusterd would have created the node UUID and this gets inherited into the clone. The result is wierd behavior at the time of peer probe where glusterd does not (yet) deal with UUID collisions in a user friendly way. This patch is for the 'prevention' of the issue. The approach here is to avoid generating a UUID on the first start of glusterd, but instead generate a node UUID only when a node UUID is found to be necessary. This naturally avoids the creation of node UUID on first boot and prevents the issue to a large extent. This issue also needs a 'cure' patch, which gives more meaningful error messages to the user and provides CLI to recover from the situations (gluster peer reset?) Change-Id: Ieaaeeaf76ed35385844e98a8e23fc3dd8df5a208 BUG: 811493 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3533 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* io-cache,quick-read: bring down log levelAnand Avati2012-06-072-4/+5
| | | | | | | | | | | | | | | | | | log messages were unnecessarily in INFO level. The two functions with the same name were non-static and actually the quick-read's call landed in the io-cache's version: 2012-06-07 17:02:29.848667] I [io-cache.c:1549:check_cache_size_ok] 0-single-master-io-cache: Max cache size is 33791991808 [2012-06-07 17:02:29.848751] I [io-cache.c:1549:check_cache_size_ok] 0-single-master-quick-read: Max cache size is 33791991808 Changed them to static declaration. Change-Id: Id9daf9593b2832e4c261f95eac6181efea8899a5 BUG: 765227 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3536 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* libglusterfs : Fix validation for integer volume options.Kaushal M2012-06-073-10/+39
| | | | | | | | | | | | | | | | | | | | | Integer volume options which specified only the min value as 0, would not be validated during "volume set". The range check for an option happened only if both min and max were not 0. In the above case, even though a minium was specified, the range check did not happen as both min and max were 0. To allow forced validation in such cases, a new member, "validate", has been added to volume_options_t. This member takes the values GF_OPT_VALIDATE_BOTH, GF_OPT_VALIDATE_MIN and GF_OPT_VALIDATE_MAX (GF_OPT_VALIDATE_BOTH is the default). Change-Id: I351de0eedb6028120e5c0b073ee5d9c141dee717 BUG: 809847 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3084 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount.glusterfs: Add support for {attribute,entry}-timeout optionsKaushal M2012-06-061-0/+11
| | | | | | | | | | Change-Id: Ib41a2537ac86513a008029fca818951706a144f7 BUG: 829279 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3530 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Check for null gfid_reqPranith Kumar K2012-06-061-1/+1
| | | | | | | | | | | | | | gfid_req is set only by the fuse xlator. Fresh lookups performed by self-heal-daemon, rebalance will not have gfid at all. Change-Id: I6712e3063067ecc5f19956e75d28c86bfc19fc65 BUG: 829203 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3529 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol/client: Remember the gfid of opened fdPranith Kumar K2012-06-063-112/+107
| | | | | | | | | | | | | | | | This is needed when the fresh lookup triggers self-heal, gfid won't be present in inode yet. Similar situation happens with Rebalance as it does not perform inode_link. Added similar fix for re-opendir. Removed inode from fdctx and removed some duplication of code. Change-Id: Ic94e5738c8585ed86801d2eed9ddab1015246710 BUG: 826080 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3517 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc-transport/socket: fix the state machine for XDATA readingAnand Avati2012-06-062-11/+40
| | | | | | | | | | | | | | | | | The socket state machine was broken for reading XDATA on the server. This code was structured such that when there was a partial read in a particular state, some variables would remain uninitialized in the next 'run' of the state machine. Also did some re-org of the state machine with two more states to make the code more readable and similar in state-breakup pattern to the other states. Change-Id: Ia32c78d4b9567bb08c6df8dc9fd6f05749d312a4 BUG: 829062 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3524 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com>
* mount/fuse: use correct fdctx to inherit direct-io-values from.Raghavendra G2012-06-061-1/+1
| | | | | | | | | | Change-Id: Ifea178f4dbe57720c16dc3851b262952f3d81159 BUG: 762533 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/3531 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: nfs.disable fix for "volume set help"Kaushal M2012-06-061-7/+12
| | | | | | | | | | | | | Fixes volgen to include "nfs.disable" in output of "volume set help". Also fixes some incorrect entries in glusterd_volopt_map. Change-Id: Ica5edf1ece31f9daa040fcdf559c1643ecdfd568 BUG: 828027 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3509 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* rpc: avoid an invalid free of item on a listJeff Darcy2012-06-051-0/+1
| | | | | | | | | | | | | If we actually "consumed" vol_opt by putting it on THIS->volume_options, it's still in use and we shouldn't free it before returning. Change-Id: I8ef3e4ce8a8b9f2552faa3345f1686e173d1aa10 BUG: 829104 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3528 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfsd: further fd leak fixes for graph changeCsaba Henk2012-06-051-0/+6
| | | | | | | | | Change-Id: I8e23d6bb95cddbb3862c524d79d1a956956b7a51 BUG: 789278 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3527 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: Fix error output for peer probe on address validation failureKaushal M2012-06-051-0/+2
| | | | | | | | | | | | | Displays an error message and sets proper return value on failure of address validation in peer probe. Change-Id: I5ced5524040e19a95dc832b6f676874983d0f2a7 BUG: 817648 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3520 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Use linkat(2) when linking on symlinkEmmanuel Dreyfus2012-06-051-0/+18
| | | | | | | | | | | | | | link(2) behavior is not standardized when it comes to symlink. BSD links to the symlink target (and fails if it does not exist), Linux links to the symlink itself. Use linkat(2) instead of link(2) in order to get a portable behavior. BUG: 764655 Change-Id: If7f6f17b48a4ccf8827c3795ec147306df6b5542 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.com/3507 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: coverity fixes (mostly resource leak fixes)Amar Tumballi2012-06-0521-49/+162
| | | | | | | | | | | currently working on obvious resource leak reports in coverity Change-Id: I261f4c578987b16da399ab5a504ad0fda0b176b1 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 789278 Reviewed-on: http://review.gluster.com/3265 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Set errstr for duplicate add-brickKaushal M2012-06-051-0/+3
| | | | | | | | | | | | Sets op_errstr when add-brick is given a duplicate brick. Change-Id: I7b8f8139f9f09834a71a5abc725692b145896830 BUG: 803336 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3519 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* replicate: default read_child to a local brick if there is one.Jeff Darcy2012-06-057-5/+165
| | | | | | | | | | | Controlled by the "choose-local" option (on by default). Change-Id: I560f27c81703f2c9c62fdb51532c8eb763826df7 BUG: 806462 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3005 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* fuse: be good at suicideCsaba Henk2012-06-051-1/+1
| | | | | | | | | | | | | We get hung on the exit path if we kill only the current thread on AUTH_FAILED. Kill indeed the current process. Change-Id: I36042f245a22bd2a284df37fd6d3a3e0b76f81e9 BUG: 826975 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3523 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Self-heald: inode_link files while crawlingPranith Kumar K2012-06-051-5/+10
| | | | | | | | | Change-Id: I559a3ff507b9487b1dfca7871c188a05d89ea6d6 BUG: 826580 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3515 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* posix: fix the 'ENOENT' logs for setxattr()Amar Tumballi2012-06-041-6/+7
| | | | | | | | | | | | | | from marker, setxattr() is attempted on the path even after the unlink() happens if the fd is still active. In such cases, we should not be logging the failures. Change-Id: Icdd9c951f0d331cdda0bec42ae343302b2dbafde BUG: 766611 Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.com/3514 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount.glusterfs: update the glusterd WORKDIRAmar Tumballi2012-06-041-1/+1
| | | | | | | | | Change-Id: I70d091611d314598412b5315adcbe1b5147a8773 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 824231 Reviewed-on: http://review.gluster.com/3513 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libglusterfs: valid_host_name() fixKaushal M2012-06-031-1/+1
| | | | | | | | | | | | Fix valid_host_name() to allow single character hostnames. Change-Id: I72527ecedec52fa47336d95b0586eb18dac6273d BUG: 827403 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3508 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol/client: do not ignore the xdata received for some fopsRaghavendra Bhat2012-06-031-0/+11
| | | | | | | | | | | | | opendir, fsetattr, fsync, lk were sending NULL xdata to the server even though it (xdata) had values within it. Change-Id: Ic274ab903c5c1e443409dd250ede80cd85d10b36 BUG: 826923 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3502 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Use inet as default listenerEmmanuel Dreyfus2012-06-015-27/+18
| | | | | | | | | | | | | This patch was proposed by Anand Babu Periasamy on gluster-devel@ It fixes the inet/inet6 mismatch between client/glusterfsd/glusterd at mine BUG: 764655 Change-Id: I172570aa58ea08c4c74cfd28f121d3d4e02a55e0 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.com/3319 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Anand Babu Periasamy <abperiasamy@gmail.com> Reviewed-by: Anand Babu Periasamy <abperiasamy@gmail.com>
* glusterd-volgen: by default include 'cluster/distribute' in volfileAmar Tumballi2012-06-011-6/+9
| | | | | | | | | | | | | | | | | | | include 'cluster/distribute' even if there is just one brick in the volume, that way, the directories would have some of the required extended attributes on it before a 'add-brick'. this fixes the issues of applications getting errored out when a 'add-brick' is done when a volume had only one brick before. Change-Id: Ie9d559e6b26aafd3d67908ab20a006e4e5e70d73 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 815227 Reviewed-on: http://review.gluster.com/3213 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com> Reviewed-by: Raghavendra G <raghavendra@gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: let commands specify the exit value in batch modeCsaba Henk2012-06-012-4/+4
| | | | | | | | | | | | | | | | | | | | | | Old behavior: when cli is ran in batch mode (sequence of commands are fed to it in stdin), if a command returns an error (ie. -1), the cli exits upon it with 255 (-1 on 8 bit). New behavior: consider any non-zero return from cli commands as error and use the negative of that return value as exit value, thus giving control to cli commands over the exit value, while (as of the existing command set) adhering to the convention of exiting with 1 on error. Spotted upon stumbling upon mount/umount commands which did want to exit with 1 on error but that was not possible as of old behavior. Change-Id: I6f41191cdc718c3e676cfae1e404152f4cb715c5 BUG: 765214 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3218 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount.glusterfs: enhance option 'transport=' for 'rdma'Amar Tumballi2012-06-011-0/+10
| | | | | | | | | Change-Id: I9e05cc8f4b73c6a83a4be956423f4e209237c215 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 798163 Reviewed-on: http://review.gluster.com/2855 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/locks: update user_flock structure before insertingPranith Kumar K2012-06-011-0/+3
| | | | | | | | | | Change-Id: Idfa00e4f3263d50b327f5a2c6f13ec68ffc8fbee BUG: 805994 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3048 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol/client: provide a buffer for storing reply of readlink.Raghavendra G2012-06-011-7/+46
| | | | | | | | | | | | | since a readlink response can be bigger than size of rdma-msges that can be inlined, we need to provide a buffer where server can do an rdma-write of response. Change-Id: I6ab06c3a94702f810ab0c57b409aaaf35cc93057 BUG: 822337 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/3464 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: fix issues with volume reset handlingCsaba Henk2012-06-012-22/+35
| | | | | | | | | | | | - properly resolve shortened key names - make sure user gets decent feedback Change-Id: I94b75f34b29cb71fb1a2edf17c3f1bf841bb552a Signed-off-by: Csaba Henk <csaba@redhat.com> BUG: 826958 Reviewed-on: http://review.gluster.com/3500 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: regenerate brick vol-files on upgradePranith Kumar K2012-06-012-4/+8
| | | | | | | | | | | | | If upgrade/downgrade option is set in glusterd it terminates after the volfiles are regenerated. No need for 'sleep 10' hack anymore. BUG: 825872 Change-Id: I12e666eb871aad7e7efa954b9307993952745d92 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3482 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>