summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* glusterd: makefile typo fix.Amar Tumballi2012-06-011-1/+1
| | | | | | | | | | | | instead of /var/lib/glusterd, symlink was pointing to /var/log/glusterd Change-Id: I485ad8d6cc8535378179621dea7539328d22454c Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 824231 Reviewed-on: http://review.gluster.com/3503 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: xlator option framework cleanupsCsaba Henk2012-06-012-8/+7
| | | | | | | | | | | | | | | | | | | | | | - Upon init/reconf, if an option is not in the opt dict, and a default value is neither specified, null it out. With this, the xlator config data that comes out of init/reconf becomes deterministic in terms of the xlator option declarations and the incoming option value dictionary. (Needed for correct operation of volume reset.) - We can rely bravely on the guarantee given by init/reconf as of which no NULL value is passed to the converter functions. Drop the spurious null check of not_null(), and rebaptize it to pass(). Change-Id: Ifa068bcc0275456c01ed00a3a315a985eb262e49 BUG: 765147 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3505 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nfs/nlm: when setting nlmclnt->rpc_clnt, do not overwrite old rpc_clntKrishna Srinivas2012-06-011-18/+5
| | | | | | | | | Change-Id: I01a1c0c0c8d3402b8fe061258001eea2c0029e83 BUG: 819518 Signed-off-by: Krishna Srinivas <ksriniva@redhat.com> Reviewed-on: http://review.gluster.com/3419 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Add server-side aux-GID resolution.Jeff Darcy2012-06-016-8/+217
| | | | | | | | | Change-Id: I09bcbfa41c7c31894ae35f24086bef2d90035ccc BUG: 827457 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3241 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol/server: do not wind opendir call if fd creation failsRaghavendra Bhat2012-06-013-3/+13
| | | | | | | | | | | | | | If resolve fails in some fd based operation, then do not use fd to get gfid (fd might be NULL). Use the gfid present in resolve structure. Change-Id: I1058274a2f9b4e58a76e4e6019e7c5ce1906d365 BUG: 827376 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3504 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Optimize for small dicts, and avoid an overrun.Jeff Darcy2012-06-012-33/+68
| | | | | | | | | | | | | | | | | | | | As dicts get used more and more in the I/O path (especially for xattrs and the new xdata feature), removing some of their inherent inefficiency becomes more important. This patch addresses some of the issues around allocating data_pair_t structures separately. Along the way, I found that the way we're allocating the "members" hash table was subtly wrong, and could lead to a memory overrun. This is a latent bug because nobody uses dict_get_new_full that way, but I added an assert to guard against that possibility. One beneficial side effect is that we now save four pointers' worth of space per dict, offsetting the extra space used for the new members. Change-Id: Ie8c3e49f1e584daec4b0d2d8ce9dafbc76fb57b2 BUG: 827448 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3040 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol/client: do not access the local object after being freedRaghavendra Bhat2012-05-311-2/+2
| | | | | | | | | | Change-Id: I2d3aeb084168b9ed68a670b91e09126917f82968 BUG: 826588 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3494 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mgmt/glusterd: self-heals should be on in glustershdPranith Kumar K2012-05-311-0/+8
| | | | | | | | | BUG: 825740 Change-Id: I44829fb985f9c394b1e240e8ee7f8d026593add9 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3481 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/dht: set conf->defrag to NULL after freeing the defrag structureRaghavendra Bhat2012-05-311-2/+3
| | | | | | | | | | | | | Also no need to free the xlator object after rebalance is over, as the process is about to be killed. Change-Id: I6973e43c0353b5de61c0b39e52a22c618be361f4 BUG: 826584 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3495 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/distribute: set the inode layout in readdirp_cbk() for filesAmar Tumballi2012-05-311-0/+16
| | | | | | | | | | | | with this, inode-linking it in readdirp_cbk will be neater. Change-Id: Ie2cd646438f851e1755e9b6a3fc9898059bee359 Signed-off-by: Amar Tumballi <amar@gluster.com> BUG: 816140 Reviewed-on: http://review.gluster.com/2717 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* replicate: add hashed read-child method.Jeff Darcy2012-05-317-18/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Both the first-to-respond method and the round-robin method are susceptible to clients repeatedly choosing the same servers across a series of opens, creating hot spots. Also, the code to handle a replica being down will ignore both methods and just choose the first remaining (which is not an issue for two-way but can be otherwise). The hashed method more reliably avoids such hot spots. There are three values/modes. 0: use the old (broken) methods. 1: select a read-child based on a hash of the file's GFID, so all clients will choose the same subvolume for a file (ensuring maximum consistency) but will distribute load for a set of files. 2: select a read-child based on a hash of the file's GFID plus the client's PID, so different children will distribute load even for one file. Mode 2 will probably be optimal for most cases. Using response time when we open the file is problematic, both because a single sample might not have been representative even then and because load might have shifted in the hours or days since (for long-lived files). Trying to use more current load information can lead to "herd following" behavior which is just as bad. Pseudo-random distribution is likely to be the best we can reasonably do, just as it is for DHT. Change-Id: I798c2760411eacf32e82a85f03bb7b08a4a49461 BUG: 802513 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/2926 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* distribute: support user-specified layouts.Jeff Darcy2012-05-314-3/+15
| | | | | | | | | | | | | The new type is DHT_HASH_TYPE_DM_USER=1 (on disk in network byte order) and we treat it the same as DHT_HASH_TYPE_DM except that we don't stomp on it during rebalance. Change-Id: I893571a9b89577acdea2fe868915b18d3663fd77 BUG: 807312 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3004 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mgmt/glusterd: Do shd validation for replicate volumesPranith Kumar K2012-05-311-1/+13
| | | | | | | | | | | | Staging needs to build graphs for replicate volumes in stopped state as well. Change-Id: I6474cd0fc43c9fa1916826d4a452f301fe7fe811 BUG: 823128 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3489 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Csaba Henk <csaba@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* storage/posix: Prevent gfid handle leaksPranith Kumar K2012-05-311-4/+6
| | | | | | | | | | | | | | | | | | | | The case which can lead to gfid handle leaks: Self-heal removes directory '/d' with 10 files in it, in brick b1. This dir is renamed to <landfill>/<hashval of '<brick-path>/d'> by posix. Before the janitor thread could remove the directory, self-heal could remove another directory with same path '/d'. Then again the rename to same path is done by posix as before. The gfid-handles of the old '/d', 10 files in it are not unlinked. To prevent such problems, rename the directory to be removed to <landfill>/<gfid-str>. Change-Id: Iad13708e1ebcc5222b64c058aa9a2d372e1bfa5b BUG: 811970 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3159 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* storage/posix: Move landfill inside .glusterfsPranith Kumar K2012-05-318-66/+116
| | | | | | | | | Change-Id: Ia2944f891dd62e72f3c79678c3a1fed389854a90 BUG: 811970 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3158 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd-hooks: added support for separate namespace for 'volume set' keysAmar Tumballi2012-05-312-0/+32
| | | | | | | | | | | | | | | | | | | | | | The keys in the above mentioned namespace could be used by hook scripts to peform tasks on 'special' keys as defined by the storage admin. The choice of the key and its semantics of it are outside the scope of glusterd. It is the responsibility of the storage admin to keep the meaning of the key(s) consistent. If a user gives a command like 'gluster volume set <VOLNAME> user.for-this-key do-this" scripts would get 'user.for-this-key=do-this' as argument. Change-Id: I5509e17d99e4ddd8bf5df968dcd51ff9a80dc3ab Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 825902 Reviewed-on: http://review.gluster.com/3443 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: cut out a standalone socket path calculation routineCsaba Henk2012-05-312-7/+16
| | | | | | | | | Change-Id: If5f196c9154ea59e37b83d3e4cad445fee6e9d45 BUG: 826512 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3490 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com>
* logging: change the 'logfile' value in a locked regionAmar Tumballi2012-05-301-88/+91
| | | | | | | | | | | | | | 'logfile' is a global variable, and it can change if log-rotate command is issued. currently 'fprintf(logfile)' happens in a locked region where as the 'fclose(logfile)' can happen outside the locked region causing racy behavior. Change-Id: I40871e5c365303b7c602e2c302b085d64f6b945f Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 826032 Reviewed-on: http://review.gluster.com/3493 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol: do not log getxattr/ENODATA as warningAnand Avati2012-05-292-2/+2
| | | | | | | | | | | | When SELinux is enabled, most of the files do not have labels and result is a ton of unnecessary logs Change-Id: I0e781e2fb6bcfb3fb12298175a41f7b981af9c39 BUG: 811217 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3486 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* fuse: make SELinux support configurableAnand Avati2012-05-296-16/+44
| | | | | | | | | | | | | | Make support for SELinux labels (extended attributes) configurable and disabled by default as it can cause significant performance penalty when enabled (it need not be enabled unless specially crafted policies are set -- which is not by default) Change-Id: I97bc4b1c26cf055fd520e9bf2d49e52b14fe7515 BUG: 811217 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.com/3484 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* glusterd: change working-directory from /etc/glusterd to /var/lib/glusterdAmar Tumballi2012-05-295-4/+15
| | | | | | | | | | | | as it is changed in RPM based install (using spec file), makes sense to do it everywhere, even in source install Change-Id: Ibe5ebd860b1529aca295b79d683a3b2e6797506c Signed-off-by: Amar Tumballi <amar@gluster.com> BUG: 824231 Reviewed-on: http://review.gluster.com/3338 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* performance/md-cache: make cache timeout reconfigurable via cliRaghavendra Bhat2012-05-292-3/+4
| | | | | | | | | | Change-Id: I73685bf73a14435884d3489343bbe71c331eb2a5 BUG: 825638 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.com/3458 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* server protocol : logging and negative case logic fixesAmar Tumballi2012-05-291-555/+558
| | | | | | | | | | | | | | | | | | | | | * log 'resolve' gfid, instead of inode gfid, which fails to log for everything which fails to resolve. * in case of 'op_ret == -1' never look into xdata or any other argument. * bring uniformity in the _cbk() code. BUG: 821139 This patch is not complete fix for above mentioned bug, but is useful the debug it properly Change-Id: I159becdde70720cba072e494f70951395dc6868f Signed-off-by: Amar Tumballi <amarts@redhat.com> Reviewed-on: http://review.gluster.com/3437 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* swift: Fix for multiple mounts on the same mount point.Mohammed Junaid2012-05-294-16/+43
| | | | | | | | | | | | | | | | | | When swift server receives multiple requests on a volume and if the volume is not mounted before hand, for each request swift tries to mount the GlusterFS volume on the mount point. This process is racy and may mount multiple times on the same mount point. Also added a new option object_only in fs.conf which should be enabled only if the user requires ReST interface and will have better performance. By default it is set "off". Change-Id: Ie1718554c5aaf577e823bbd84da8e78d803e954d BUG: 821310 Signed-off-by: Mohammed Junaid <junaid@redhat.com> Reviewed-on: http://review.gluster.com/3477 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd: Run post hooks on a different threadKrishnan Parthasarathi2012-05-296-6/+238
| | | | | | | | | | | | | | | | | | | | This change ensures post hooks can 'wait' if need be and _not_ prevent glusterd from being able to run other operations meanwhile. Also ensures that post hook scripts are 'serialized' between transactions. ie, post hook scripts of txn1 are completed before post hook scripts of txn2 are started, where txn1 happens before txn2. Change-Id: Iaeb676737d8c67e7151127c8d1fd8c2891e10aee BUG: 806996 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/3450 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* nfs/nlm: statedump of locksRajesh Amaravathi2012-05-282-0/+53
| | | | | | | | | | | | | | This change allows statedump of nlm locks giving number of clients, number of locks each client holds and the files on which lock(s) is/are held. Change-Id: I6341c12ec58005ef71b93b316b527e610ff7ee8f BUG: 824804 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/3432 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* storage/posix: readdirp enhancementsAnand Avati2012-05-281-45/+61
| | | | | | | | | | | | - avoid multiple calls to posix_istat(). use cheaper posix_pstat() - code re-org Change-Id: I4a2e32626ade49b7d18158952849c6fe7bd6875c BUG: 816140 Reviewed-on: http://review.gluster.com/3460 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* build: Update licensing in buildspecVijay Bellur2012-05-281-5/+9
| | | | | | | | | Change-Id: I1d3348a99dad621608eccb08a71c85766e9ae451 BUG: 820551 Signed-off-by: Vijay Bellur <vijay@gluster.com> Reviewed-on: http://review.gluster.com/3469 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libglusterfs: Fix incorrect NULL checkVijay Bellur2012-05-281-1/+1
| | | | | | | | | Change-Id: I22e1bf1669e639b5097b2b56c90b47e8b733a34d BUG: 825197 Reviewed-on: http://review.gluster.com/3467 Reviewed-by: Amar Tumballi <amarts@redhat.com> 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-2710-6/+376
| | | | | | | | | | 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: Replace-brick should create dst brick path only on 'dst' node.Krishnan Parthasarathi2012-05-272-1/+4
| | | | | | | | | Change-Id: I61e6f8aa44dfef85c7cd98f40b176b796422c4b2 BUG: 824302 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/3415 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc-transport/rdma: logging enhancementsRaghavendra G2012-05-271-72/+210
| | | | | | | | | Signed-off-by: Raghavendra G <raghavendra@gluster.com> Change-Id: I07f00fb768dfdabdc04b43fdb8a0609098cd1838 BUG: 822337 Reviewed-on: http://review.gluster.com/3445 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd/geo-rep: do away with unneded function exportsCsaba Henk2012-05-272-29/+27
| | | | | | | | | Change-Id: I0c0b500bcb0b183ae445800fd334cd838b8af0d3 BUG: 764890 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3455 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd/geo-rep: cleanup and fixesCsaba Henk2012-05-271-35/+54
| | | | | | | | | | | | | | | | | - fix the hilarious fd leak of "geo-rep status" - instead of "corrupt", which can trip up users to think their data is in danger, use the term "defunct" to describe the condition when gsyncd is dead/unresponsive - don't use buffered I/O when unnecessary - stop using PATH_MAX for sizing buffers that don't hold paths - some cleanups wrt. memory management Change-Id: I396aacc45dc06a002318b19c60c44041fa9fa18d BUG: 764268 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3454 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* glusterd / geo-rep : fix rotating slave log fileVenky Shankar2012-05-261-22/+52
| | | | | | | | | | | | | Attempt to rotate log files for slave that are local. Remote slaves (identified by the 'ssh' scheme) are ignored. Change-Id: I89959278c0eefffabc6a6702d4ef661cf52644a6 BUG: 821443 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.com/3444 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* Switch to GNU basename_r() and dirname_r()Emmanuel Dreyfus2012-05-242-167/+244
| | | | | | | | | | | | | | | | | | | | | | | | | BSD basename() and dirname() return static storage, hence they are not thread safe, while GNU flavors are. glusterfs assumes the GNU behavior. As a fix, we added a BSD-derived, thread-safe version of basename_r() and dirname_r() in contrib/libgen. BSD systems can use it instead of their built in versions. Unfortunately, there are more reliance on GNU behavior in glusterfs. There are place where free() is called on static storage returned by basename(), place where a second call to dirname() overwrite the string obtained once, and so forth. Each of these problems can be fixed, but it is likely to be a pandora box. We need to accept that glusterfs heavily rely on GNU behavior, and switch contrib/libgen's basename_r() and dirname_r() to the GNU version. This change does just that. BUG: 764655 Change-Id: Id874b9c7aacd9aa3a7a4bd6a92a9633f5b2d6ac0 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.com/3430 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* geo-rep / gsyncd: further cleanup refinementsCsaba Henk2012-05-244-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Regarding issue of leftover ssh control dirs: If master side worker is stuck in connection establishment phase, have the monitor kill it softly (ie. first by SIGTERM, to let it cleanup). This is trickier than sounds on first hearing, because if worker is stuck in waiting for a RePCe answer (in threading.Condition().wait()), then SIGTERM is ignored (more precisely, Python holds it back for the wait and resends it to itself when wait is over). So instead of signalling the worker only, we send TERM to the whole process group -- that brings down the ssh connection, which wakes up the waiting worker, which then can cleanup. Only problem is that monitor is also in the process group and it should not coomit a suicide. That is taken care by setting up a one-time SIGTERM handler in the monitor. - Regarding slave gsyncd stuck in chdir: Slave gsyncd is usually well behaved: if master does not send keepalives, it takes care to exit. However, if a hang occurs in early phase, when slave is to change to the gluster mountpoint, no timeout is set up for that (and unlike on master side, neither is there an external actor like the monitor to do that). So, to manage this scenario, we do the chdir in a (supposedly) short lived thread, and in the main thread we wait for the termination of this thread. If that does not happen within the time limit, main thread calls for cleanup and exit. (This logic explicitely takes the appropriate action in the cases when chdir succeeds or when hangs; but what about the remaining case, when chdir fails? Well in that case the chdir thread's exception handler will put the process to cleanup and exit route.) Change-Id: I6ad6faa9c7b1c37084d171d1e1a756abaff9eba8 BUG: 786291 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3376 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd-portmap: adhere to IANA standards while assigning brick portsAmar Tumballi2012-05-243-12/+33
| | | | | | | | | | | RFC 6335 Change-Id: Iafbba70d24db95807ae73d27c96288d18d7232e5 Signed-off-by: Amar Tumballi <amar@gluster.com> BUG: 824233 Reviewed-on: http://review.gluster.com/3339 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* nfs/nlm: avoid duplicate replies for nlm proceduresRajesh Amaravathi2012-05-241-102/+76
| | | | | | | | | | | | | | | | | The way NLM handles errors and corresponding response messages has been simplified to avoid duplicate replies in case of failures. Also, unlock_cbk and unlock_fd_resume functions are moved in with other unlock functions. Change-Id: I94100aa3c8de95dabebed4598651bbcd49d95782 BUG: 824316 Signed-off-by: Rajesh Amaravathi <rajesh@redhat.com> Reviewed-on: http://review.gluster.com/3414 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishna Srinivas <krishna@gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd/remove-brick: Reset decommission stats on all nodesshishir gowda2012-05-244-6/+19
| | | | | | | | | | | | | | | | Decommissioning is started only on nodes where the bricks which are being decommissioned are present. The stats were reset only when decommission was started. Hence stale stats were being shown on nodes where the bricks were not present. BUG: 822778 Change-Id: I2d839f877d4e040b463bebde5ba753b7265ab633 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/3425 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* geo-rep / gsyncd: add "--super" to rsync invocationCsaba Henk2012-05-242-2/+1
| | | | | | | | | | | | | | | | | | | | This forces rsync to perform supposedly privileged operations on unprivileged slaves (like chown(2)). For consistent behavior (with gsyncd's "chown" RPC call that's being used for symlinks and directories), we also pass "--numeric-ids" to rsync. Also took the chance to retire gsyncd's "--rsync-extra" option which was there for debugging purposes (related to a resolved issue). Change-Id: I4ee4d0d3a8c4e0f6746d34d7722c8a567a67491c BUG: 822121 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.com/3426 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: decrement changelog when fdctx is absentPranith Kumar K2012-05-241-0/+2
| | | | | | | | | Change-Id: I9d76ddbd2cf8e4e8e4ad70529ba3a70178489a68 BUG: 765194 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3435 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc: fix the vecsizer issueAmar Tumballi2012-05-244-10/+15
| | | | | | | | | | | | | | | | | | | * currently, we needed 'base-address' of the header for glusterfs writev vecsizer and 'current-address' of the buffer which is reading the data on socket, for nfs write vecsizer. * nfs write issues started coming after http://review.gluster.com/3182 was pushed into repo, now fixed. * fixed by sending both as argument for vecsizer from the transport Change-Id: I6db360ce265ce5f083f1794ebdb3867f8cfad9ec Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 824472 Reviewed-on: http://review.gluster.com/3431 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd/rebalance: Display run-time of rebalance processshishir gowda2012-05-2410-15/+121
| | | | | | | | | | | | | | | | | Added run-time value field to cli output of rebalance/remove-brick. A new cluster/distribute boolean option rebalance-stats when set to ON, time taken for migration of each file is logged. With rebalance-stats OFF (default), rebalance logs will only have entries showing time spent in each directory. Change-Id: I02a8918621120068cd71ffaf2999d30b3a2d10a2 BUG: 821987 Signed-off-by: shishir gowda <shishirng@gluster.com> Reviewed-on: http://review.gluster.com/3303 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount.glusterfs : multiple fixesAmar Tumballi2012-05-231-3/+7
| | | | | | | | | | | | | | | | * made log-level and other string comparisons be case insensitive * fixed wrong spelling, wrong command usage in case of brick inode computation * used 'cut' instead of 'tr' as piping the result to read was not working fine in few cases. Change-Id: I9caab481cfd80000b8ef9de7a44006729c88cc1b Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 823403 Reviewed-on: http://review.gluster.com/3413 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Disconnected bricks of 'stale' volume before deleting it.Krishnan Parthasarathi2012-05-231-2/+5
| | | | | | | | | | | | | | | If glusterd_delete_bricks is called before glusterd got the DISCONNECT event from the brick that was stopped, then glusterd_brick_rpc_notify would dereference a free'd brickinfo. This can happen if the brick had not been disconnected before. Change-Id: I6c07ec50f6739422a14478a549edd06c4c0ce913 BUG: 802015 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.com/3183 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
* cluster/afr: Release inodelk on erase changelog failuresPranith Kumar K2012-05-231-0/+3
| | | | | | | | | Change-Id: I58271e1ac5a116b5bc717d7cad9f03eb7dc8a1a4 BUG: 811551 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.com/3417 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol/client: use correct xlator object while creating framesRaghavendra G2012-05-231-2/+2
| | | | | | | | | | | during reopening files and reacquiring locks. Change-Id: I29f42fcfa9e782ce9e323e53024e5034029914a7 BUG: 822337 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/3420 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Fix build error from recent FUSE changes.Jeff Darcy2012-05-231-1/+1
| | | | | | | | | Change-Id: Ia878949d00b1ef188b18c853763918b83521ee34 BUG: 762389 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.com/3423 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Revert "fuse-resolve: consider cases where an entry should be resolved even ↵Anand Avati2012-05-231-6/+0
| | | | | | | | | | | when parent belongs to active itable." This reverts commit 595bc33c1d0a3a6fe3d54d3eb876ac0b336d9dea Change-Id: I6c67404d4ff0bc83cfac83d786bc6e66d221a84a Reviewed-on: http://review.gluster.com/3422 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>