summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* All: License message changeVarun Shastry2012-09-13160-1053/+923
| | | | | | | | | | | | License message changed for server-side, dual license GPLV2 and LGPLv3+. Change-Id: Ia9e53061b9d2df3b3ef3bc9778dceff77db46a09 BUG: 852318 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3940 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfs SEGV on Fedora 17 from UFO fallocate(2) callKaleb S. KEITHLEY2012-09-131-14/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An upload of a file will cause the volume's glusterfs to SEGV when it fields a FUSE_FALLOCATE op. Swift inspects libc to determine if there is a symbol for fallocate(2) and if so will use it. And while the libc in RHEL 6 does have fallocate(2), the version of fuse in RHEL 6 does not support fallocate, and things are handled gracefully elsewhere (the kernel perhaps?) N.B. fallocate was added to version 7.19 of fuse. Fedora 17 and later (and maybe earlier too) has 7.19. RHEL 6 still has 7.13. Glusterfs uses the 7.13 version <linux/fuse.h> (in contrib/fuse-include/fuse_kernel.h) Thus on Fedora 17, with both fallocate(2) in libc and fallocate support in fuse, the fallocate invocation is dispatched to glusterfs, but the dispatch table (fuse_std_ops in xlators/mount/fuse/src/fuse-bridge.c) is too short for one thing; the fallocate opcode (43) indexes beyond the end of the table, and even when that doesn't directly cause a SEGV, the NULL pointer at that location does cause a SEGV when attempting to call the function through the pointer. BUG: 856704 Change-Id: I148acbf1265f01a15bd158f227c8a7cb9365606e Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com> Reviewed-on: http://review.gluster.org/3938 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* fuse-bridge: Pass unknown option down to fuseLubomir Rintel2012-09-126-4/+44
| | | | | | | | | | | | | | | | | | In Linux, certain "filesystem-specific" options (passed in string form in last argument to mount(2)), such as "rootcontext" or "context" are in fact common to all filesystems, including fuse. We should pass them down to the actual mount(2) call untouched. This is achieved by adding "fuse-mountopts" option to mount/fuse translator and adjusting the mount helper to propagate it with unrecognized options as they are encountered. BUG: 852754 Change-Id: I309203090c02025334561be235864d8d04e4159b Signed-off-by: Lubomir Rintel <lubo.rintel@gooddata.com> Reviewed-on: http://review.gluster.org/3871 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* dht: improve dht_fix_layout_of_directory for better re-assignmentAnand Avati2012-09-121-145/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Jeff Darcy wrote: > AFAICT, the fix-layout code doesn't do the same rotation that the > new-directory code does. Therefore, the new bricks always claim > completely predictable hash ranges for every directory, leading to > either a 0-1-2-3 pattern or a 1-0-2-3 pattern. In other words, a > file whose hash falls into the second quarter of the range will always > be assigned to brick 2, and a file whose hash falls into the fourth > quarter will always be assigned to brick 3. The rest will be split > according to the original pattern. Put still another way, instead of > same-named files in different directories being spread across N bricks, > they might be spread across only two bricks (bad) or totally > concentrated on one brick (worse) regardless of N. The current dht_fix_layout_of_directory() code, in an attempt to maximize overlap of new layout with existing layout (to minimize movement of data) fails to do a good job of randomizing new assignment even when it could do a better job. In an example where we expand from 2 nodes to 4 nodes, the current possibilities are limited in the following way - (theoretical hash range: 00 - 99) OLD 1 ----- server1: 00 - 49 server2: 50 - 99 NEW 1 ----- server1: 00 - 24 server2: 50 - 74 server3: 25 - 49 server4: 75 - 99 OLD 2 ----- server1: 50 - 99 server2: 00 - 49 NEW 2 ------ server1: 50 - 74 server2: 00 - 24 server3: 25 - 49 server4: 75 - 99 The above shows that when add-brick from 2 bricks to 4 bricks, server3 and server4 always get the _same_ hash range no matter what the original hash range assignment was. The fix in this patch is first do the standard new directory assignment to a directory (with rotation etc.) and then do the reassignment to maximize overlap. This way newly added servers still get random ranges and existing servers have a probability of getting either of the quarters which were part of its half previously. The same principles hold for all add-brick from M to M+N. Change-Id: I0cbbf3bfa334645728072d66aaaa80120d0b295f BUG: 853258 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3883 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* event: peel out poll and epoll specific code into separate filesAnand Avati2012-09-124-836/+920
| | | | | | | | | | | code re-org, no change in logic. Change-Id: Ib1cb3d3f4cf8989a916df7476479c26570d07a84 BUG: 821087 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3932 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* cli: Added special key "group" for bulk volume set.Krishnan Parthasarathi2012-09-123-33/+148
| | | | | | | | | | | | | | | | | | | gluster volume set VOLNAME group group_name - where group_name is a file under /var/lib/glusterd/groups containing one key, value pair per line as below, key1=value1 key2=value2 [...] - the command sets key1 to value1 and so on. Change-Id: Ic4c8dedb98d013b29a74e57f8ee7c1d3573137d2 BUG: 851237 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3831 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Detect python > 2.5, make sure MKDIR_P is substitutedEmmanuel Dreyfus2012-09-093-1/+356
| | | | | | | | | | | | | | | | | | | | | | gluster build machine generate configure scripts unable to detect python > 2.5 This change include a more recent python.m4 so that newer python can be correctly detected. Build.gluster.com also produces a configure that fails to subsitute MKDIR_P, leading to bugs at make install. Works this around by introducing mkdirp.m4 from aclocal-1.11, with the autoconf version test removed because build.gluster.com also has an outdated autoconf. And we need a bit from a recent autoconf NB: this patchset changes nothing since the last one, I just fix title in gerrit. BUG: 764655 Change-Id: I3ffac50cc7a10cb9e56dd490dbc2b550bba3fabd Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/3888 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Expect setmntent(3) to return NULLKrishnan Parthasarathi2012-09-081-0/+8
| | | | | | | | | | | | - Closed the mtab FILE * using endmntent(3) Change-Id: I5e1ebb7f092abda638cfbb5524da693dcac6c872 BUG: 851109 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3920 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: work around rsync argument overflowCsaba Henk2012-09-071-3/+8
| | | | | | | | | | | | | instead of passing the files to be synced as args to rsync, have rsync read them on stdin with '-0 --files-from=-' Change-Id: Ic3f71a0269941ce50051af8adfad183a52a79b01 BUG: 855306 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.org/3917 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/dht: handle percent option for 'min-free-disk'Amar Tumballi2012-09-071-0/+11
| | | | | | | | | | | | | | | * with the init option cleanups, setting of 'conf->disk_unit' was reset, which made it not set the '%' in the option. * bring a global check, which makes the option assume its percent, as long as value is < 100. Change-Id: I00bd1395a309cdc596a2b2b80304c6d98696a24a Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 852889 Reviewed-on: http://review.gluster.org/3918 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount/fuse: add mount-option "enable-ino32" for the native clientNiels de Vos2012-09-067-30/+67
| | | | | | | | | | | | | | By default the GlusterFS-native client uses 64-bit inodes. Some 32-bit applications can not handle these correctly. Introduce a client-side mount option "enable-ino32" which causes the FUSE-client to squash the 64-bit inodes into a 32-bit value. Change-Id: I3296d16528bfb50457b9675f6b8701234ed82ff0 BUG: 850352 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/3885 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* storage/posix: Make posix_fremovexattr anon fd friendly.Pranith Kumar K2012-09-061-4/+1
| | | | | | | | | | | | | | | | | | | | | Problem: For anonymous fds posix_fremovexattr fails to work because the open never happens and the fd-ctx is not set with the fd-number. Fix: Use posix_fd_ctx_get which opens and sets the fd-number in the fd-ctx for anonymous fds. Tests: Added a syncop call in glustershd to test this change and it worked fine. Change-Id: I9629190a87eb27a7a1578e4fe732a5eb1248f30c BUG: 854331 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3903 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: Ignore noauto and _netdev optionsLubomir Rintel2012-09-061-0/+3
| | | | | | | | | BUG: 827121 Change-Id: Icab4ca9adecc7b9d62e3d5e7d161c442f16ad940 Signed-off-by: Lubomir Rintel <lubo.rintel@gooddata.com> Reviewed-on: http://review.gluster.org/3873 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* afr: add option description of 'open'.Jules.Wang2012-09-061-0/+2
| | | | | | | | | Signed-off-by: Jules Wang <lancelotds@163.com> Change-Id: I6c7dd337c758e82e9d58d4d65f53b5aa72ac5dfb BUG: 764890 Reviewed-on: http://review.gluster.org/3895 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libglusterfs: Implementation of syncop_fsyncdirPranith Kumar K2012-09-062-0/+29
| | | | | | | | | | Change-Id: I832b9c0bfbe804fbca98dc9e8fbe7d3174fecc82 BUG: 854326 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3902 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: fix mountbroker option parsing routineCsaba Henk2012-09-061-8/+2
| | | | | | | | | | | | Properly adjust it to the new dict API as of http://review.gluster.org/3829. Change-Id: I8f55d2b1d590b15000984f4862c52b3cd226cef8 BUG: 850917 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.org/3914 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* posix: adjust new xattrops to new dict APICsaba Henk2012-09-061-4/+4
| | | | | | | | | | | | | | | | - http://review.gluster.org/3909 introduces new xattrops - http://review.gluster.org/3829 changes the dict API The new xattrops has been written against the old dict API, but been committed after the dict API change, resulting in a build error. Change-Id: I10b9acc79927f3505b5e13116653fb9a584ffd31 BUG: 850917 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.org/3915 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* storage/posix: Add or_array/and_array op for xattropPranith Kumar K2012-09-062-2/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Problem: For set/reset of outcast (ALL changelog bits set per transaction type i.e. data/mdata/entry) from afr the capability of OR/AND in xattrop is needed in posix. Otherwise marking outcast will only be possible in self-heals where appropriate locks are held so that no other transaction is in progress, so exact number can be computed with which when XATTROP_ADD happens all bits will be set for that changelog. Fix: Implemented new xattrop-op OR_ARRAY, AND_ARRAY. Made checks in __add_array to work well with __or_array. Tests: From Afr code made an OR_ARRAY with ALL bits set and it reflected on the changelog xattrs. changelog incrementing did not have any effects on the all-set changelog. From Afr code made an AND_ARRAY with 0 and it reflected in the changelog xattrs. Change-Id: Ie89c78a43d05789e3a8fa03d2422b52083ae80b9 BUG: 847671 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3909 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/distribute: remove gf_log() from statedump functionsAmar Tumballi2012-09-061-3/+0
| | | | | | | | | Change-Id: I83cccab6819d6a74e96c2717ca539fa1568cac89 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 843822 Reviewed-on: http://review.gluster.org/3912 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mgmt/glusterd: Typo in the error message of the volume stopVarun Shastry2012-09-061-2/+2
| | | | | | | | | Change-Id: I86e4fdb48d9b29789f3446b8c0925eb81cf220c9 BUG: 852999 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3892 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* cli: sanitize exit valueCsaba Henk2012-09-061-1/+1
| | | | | | | | | | | | | | | The pattern established in http://review.gluster.com/3218 as of which cli exits with negated return value of the command instrumentation function should be uniformly followed. (Prior to this commit whether cli exits with 255 or 1 on failure depended on the way of invocation.) Change-Id: Icbab1f435042b3321c689fa785109bf87195d86d BUG: 765214 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.org/3913 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* mount/fuse: If gfid is not present assign gfidPranith Kumar K2012-09-061-1/+1
| | | | | | | | | Change-Id: I2fb8c607694eb8bbe5ec0f67d8db794066a89ca4 BUG: 821138 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3854 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core/statedump: parse the file and set the path of the statedump filesRaghavendra Bhat2012-09-062-15/+119
| | | | | | | | | | | | | | | | | | | | * As of now "gluster volume set statedump-path" option sets the path of the statedump files for brick processes only. If SIGUSR1 is sent directly to all the gluster processes instead of using gluster cli command, then some of the statedumps will still be in /tmp (such as nfs server, glustershd). * This patch makes glusterfs processes search for the file /tmp/glusterdump.options and consider the options given in it. There if path key is set, then all the processes use that path when SIGUSR1 is sent or cli statedump command is executed. (Note that after taking statedump, if /tmp/glusterdump.options file is removed, then the default way is resumed). Change-Id: I2e8fbfb4823318512e03b234e90d3a3888724ddc BUG: 851175 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/3907 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* libglusterfs/dict: make 'dict_t' a opaque objectAmar Tumballi2012-09-0637-413/+486
| | | | | | | | | | | | | | | * ie, don't dereference dict_t pointer, instead use APIs everywhere * other than dict_t only 'data_t' should be the valid export from dict.h * added 'dict_foreach_fnmatch()' API * changed dict_lookup() to use data_t, instead of data_pair_t Change-Id: I400bb0dd55519a7c5d2a107e67c8e7a7207228dc Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 850917 Reviewed-on: http://review.gluster.org/3829 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc/socket: Wrong Log-File Error-MessageVarun Shastry2012-09-051-1/+2
| | | | | | | | | | | | | | | Problem: The port changed in rpc-clnt.c:rpc_clnt_reconfig was not being updated to the variable peerinfo.identifier before the logging. Change-Id: Ic56a74738c6f7664e9719b125a014126cea69141 BUG: 847211 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3894 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Shishir Gowda <sgowda@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* License change to 2 additional files.Varun Shastry2012-09-052-31/+12
| | | | | | | | | | Change-Id: I4689602cbea0e46498d10b8785bcde86d369e75d BUG: 852318 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3880 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* build: Don't use python-ctypes on SLESNiels de Vos2012-09-051-1/+5
| | | | | | | | | | | | | | There is no python-ctypes on SLES 11, so don't require is for building the RPM. Change-Id: I3399318c1d2a603bb8d228ed4f1b5cbcb7a3a9c3 BUG: 854503 CC: Jörg Petersen <joerg.h.petersen@googlemail.com> Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/3906 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Honour configure --localstatedir and --sysconfdirEmmanuel Dreyfus2012-09-052-4/+5
| | | | | | | | | | | | | | Makes sure /etc/glusterd to /var/lib/glusterd migration does nonour configure --localstatedir and --sysconfdir. BUG: 764655 Change-Id: I65a5f96424d67531e81e75b084265bd4e6e30f29 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/3890 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Made volume reset recognize options in <domain>.<specifier> formatKrutika Dhananjay2012-09-051-3/+5
| | | | | | | | | | | | | | | | | | | PROBLEM: Volume reset command does not reset options when specified in <domain>.<specifier> format. FIX: Changed glusterd_options_reset to use "key" (as opposed to "key_fixed") to fetch "value" in a way that ensures "key" ALWAYS holds the option name in its fully qualified form, irrespective of whether the option was specified in its fully qualified format or in short form. Change-Id: Ibc3a87f4d29cb09e34b54c4b5ead564fefade350 BUG: 847846 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/3901 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Csaba Henk <csaba@redhat.com>
* glusterd: Removed pattern match lookup logic on volume optionsKrutika Dhananjay2012-09-051-43/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In light of the comments received on the following patch, http://review.gluster.com/#change,3860 this change knocks off the pattern match lookup logic that once enabled wildcard entries to be used for volume options. Here's a bit on the history of the macro "pattern_match_options", coming straight from the author's(Csaba) mouth: "So, the history of pattern_match_options is as follows: i. In the volume option table we used to be able to have wildcard entries like auth.addr.*.allow and there was a special lookup logic to support that, cf. http://github.com/gluster/glusterfs/commit/v3.1.0qa40~19 ii. However, later on we stopped using this mechanism: http://github.com/gluster/glusterfs/commit/v3.1.0qa40~9 iii. Later on we added the code that allowed the usage of option names both in fully qualified (<domain>.<specifier>) and short (<specifier>)forms: http://github.com/gluster/glusterfs/commit/v3.1.0qa41~10. At this point, maintaining support for wildcard table entries became more difficult (~ error prone), so that part was placed under the macro pattern_match_options and -- given that we made no use of the feature -- a simple direct lookup logic was introduced. I chose to keep the pattern matching logic in the code because I was not really sure about the future of it and thought we might want wildcarded table entries later. ..." Change-Id: I261735143891931e8150c36fe5b33ae74b1c663d BUG: 847846 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/3893 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Csaba Henk <csaba@redhat.com>
* cli: Do not print brick info for non-replicate volumeVenkatesh Somyajulu2012-09-031-0/+3
| | | | | | | | | | Change-Id: I5e91df64ededd78371c0cd4d900f93ab4a0298ee BUG: 852406 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/3867 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pranithk@gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli, glusterd: Changes to 'peer status' xml outputKaushal M2012-09-012-4/+21
| | | | | | | | | | | | | | Glusterd now returns the status of a peer as both a string and a number. The xml output for peer status has been modified, such that the <status> element now contains the status number and a new <statusStr> element contains the status string. Change-Id: I0d4b74b84a991893d1029b8408d66ff078bbd254 BUG: 847760 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/3868 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* Add missing contrib/libgen files to distributionEmmanuel Dreyfus2012-08-304-8/+10
| | | | | | | | | | BUG: 764655 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Change-Id: I3f49eb4a1a186cb2d178539ada6a05c8c1aa8265 Reviewed-on: http://review.gluster.org/3882 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Don't stop entry/data self-heal on metadata split-brainPranith Kumar K2012-08-292-12/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Problem: Entry/Data self-heal is orthogonal to meta-data self-heal. meta-data split-brain should not affect entry/data self-heal. Fix: Prevented aborting rest of the self-heals when metadata split-brain happens. Tests: 1) Simulated meta-data split-brain then checked data-self-heal succeed on regular file, entry-self-heal succeed on dir. 2) Reset meta-data change-log on one of the subvols and checked that meta-data self-heal also completes. 3) Executed self-heal sanity script. Change-Id: I05ca222d855d3a6000703e3775471d0f874d35d6 BUG: 851451 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3853 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <obdurodon@gmail.com> Reviewed-by: Anand Avati <avati@redhat.com>
* dht/rebalance: set the correct ownership on the dst file.shishir gowda2012-08-281-0/+8
| | | | | | | | | | | | | | | Currently, the dst file created has root:root ownership, till migration is completed. During this phase, open fails on the dst file if uid/gid is non-root. Setting the dst_file to the correct ownership fixes the issue Change-Id: Icfec89eb10dc866cdee38dab17695fe21174ef99 BUG: 852361 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.org/3861 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Fixed incorrect assumptions in rpcsvc actors of glusterdKrishnan Parthasarathi2012-08-282-17/+26
| | | | | | | | | Change-Id: Iabfcb401de9d658e32433aa1e8c87b329cbd2cf7 BUG: 851109 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3864 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfsd: rpcsvc actors must return success after an attempt to submit replyKrishnan Parthasarathi2012-08-281-8/+12
| | | | | | | | | | | | | | rpcsvc attempts to send "error reply" using the req object. If actor has already performed rpcsvc_submit_generic, then req is destroyed. So if the actor returned -1 (RPCSVC_ACTOR_ERROR) on failing to submit reply, then req would be 'free'd' twice and will result in a crash eventually. Change-Id: I5eae19570202bbe5e154e9cb03390cfeb9b5f223 BUG: 851410 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3863 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* All: License message changeVarun Shastry2012-08-28160-2302/+895
| | | | | | | | | | | | | | | | | | The license message is changed to Copyright (c) 2008-2012 Red Hat, Inc. <http://www.redhat.com> This file is part of GlusterFS. This file is licensed to you under your choice of the GNU Lesser General Public License, version 3 or any later version (LGPLv3 or later), or the GNU General Public License, version 2 (GPLv2), in all cases as published by the Free Software Foundation. Change-Id: I07d2b63ed5fbbbd1884f1e74f2dd56013d15b0f4 BUG: 852318 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/3858 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* init.d: Fix init.d on Redhat, so it does not always return 0.Thomas Oulevey2012-08-281-1/+5
| | | | | | | | | | | | | * Installing gluster with puppet, it gives an error if service "hasstatus => true" is used. * Introduced a $RETVAL variable set to previous command return value. Change-Id: I186ec59f892f04f25c06478315ca85183cb6232a BUG: 836007 Signed-off-by: Thomas Oulevey <thomas.oulevey@cern.ch> Reviewed-on: http://review.gluster.org/3847 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* afr: Avoid excessive logging in self-heal.Krishnan Parthasarathi2012-08-236-22/+25
| | | | | | | | | | | | | | - (Excessive) Logging has been very useful as 'bread-crumbs' in many a root-cause analyses. This patch aims at avoiding logging when the information could be reconstructed using the xattrs, statedump, and/or "volume heal" CLI commands. Change-Id: Iebc6b10ae18f0dd9704bdc6dd03bcfe0f2a09abd BUG: 844804 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3805 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-233-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* socket: code cleanupAmar Tumballi2012-08-232-312/+333
| | | | | | | | | | | | | * for more review friendly way * reduce the level of indirections at each line. Change-Id: I82ace7683fb281d97a64da724f054ece28215054 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 764890 Reviewed-on: http://review.gluster.org/3839 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* posix-acl: make use of 'umask' flag passed as argument in fopAmar Tumballi2012-08-232-8/+25
| | | | | | | | | | | | | | | | | | * currently "umask" is reffered only from xdata dictionary, instead we should utilize fop argument. * not taking of setting of "umask" in fuse for now, considering the backward compatibility with earlier releases. * dict_del() the "umask" and "mode" keys from xdata dict as the fop after reaching posix layer tries to set every entry in xdata as xattr on file/dir. Change-Id: I7199b05a5bde132df20e7812a99bc02ef7b988ce Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 850873 Reviewed-on: http://review.gluster.org/3843 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* epoll: whitespace cleanup and remove unused variableAnand Avati2012-08-221-19/+18
| | | | | | | | Change-Id: Idd7269f8b3a6dfaf931b378128eff93088b3be73 BUG: 821087 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3841 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* fuse: make background queue length configurableAmar Tumballi2012-08-226-57/+166
| | | | | | | | | | | | | | | | * also make 'congestion_threshold' an option * make 'congestion_threshold' as 75% of background queue length if not explicitely specified * in glusterfsd.c, moved all the fuse option dictionary setting code to separate function Change-Id: Ie1680eefaed9377720770a09222282321bd4132e Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 845214 Reviewed-on: http://review.gluster.org/3830 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Brian Foster <bfoster@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* syncop: Added scaling down logicPranith Kumar K2012-08-202-5/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | RCA: Whenever the self-heald tests are done with more than 16 replicates The number of sync procs goes to > 2. These threads never die. Fix: Added scaling down logic in syncops so that the threads terminate themselves whenever the extra thread is idle for ~10 minutes. Minimum number of threads is still 2. Tests: Added logs for launching and terminating procs, made timeout to 6 seconds and ran volume-heal in a while loop. After logs say max number of procs are launched, attached process to gdb and verified that the number of syncop threads are 16. Stopped volume-heal and observed the logs for terminating the procs. Attached gdb to process again to check that the syncop threads are just 2. Did this 5 times. Things worked fine. Which procs were terminated was random. No proc structure was erroneously re-used. Procs never exceeded 16 and were never < 2. Change-Id: I61dd9c25cc478ac8cbda190bee841a995b93c55c BUG: 814074 Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Reviewed-on: http://review.gluster.org/3195 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* NetBSD build fixEmmanuel Dreyfus2012-08-201-1/+1
| | | | | | | | | BUG: 764655 Change-Id: I65009625dfa627e0ca3b7ff2784b778d26ec04b1 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/3837 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpcsvc: remove .vector_actor and related changesAnand Avati2012-08-2011-194/+177
| | | | | | | | | | | | | The .vector_actor method of rpcsvc_actor_desc is defunct now after rpc unification. Remove the field and all related usage of it. Change-Id: I53048cebeae78f50259e8c4a7fec3497691fe388 BUG: 762935 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3832 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* Self-heald: Prevent logging of errno ENOENTVenkatesh Somyajulu2012-08-201-4/+4
| | | | | | | | | Change-Id: Ie56228dfbdc7e519a344681487164a835488a470 BUG: 835423 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/3826 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: Proper xml output for "gluster peer status"Kaushal M2012-08-203-5/+148
| | | | | | | | | | Change-Id: I5d72d3844aba0417652498f4dc706b4a68d36bd8 BUG: 847760 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/3814 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <krishnan.parthasarathi@gmail.com> Reviewed-by: Anand Avati <avati@redhat.com>