summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* POSIX sh uses = and not ==Emmanuel Dreyfus2012-11-051-5/+5
| | | | | | | | | | BUG: 815227 Change-Id: I5a498f1b917fb658914133ee071783e7b8e0d025 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/4151 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* api/examples: updated examples to use new callsAnand Avati2012-11-051-0/+87
| | | | | | | | | | Change-Id: I865d0c52de268b27bbdb8786d3f4af5ef3ce3d9a BUG: 839950 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4023 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* object-storage: use constants for directory namesPeter Portante2012-11-031-2/+4
| | | | | | | | | Change-Id: I6109ee55061eae53c4c6762ca31fb5c4b13f0071 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4140 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* object-storeage: refactor to use one memcache keyPeter Portante2012-11-034-65/+394
| | | | | | | | | | | | | | | Address BZ 868087: https://bugzilla.redhat.com/show_bug.cgi?id=868087 Store all of the data needed to generate the correct set of container and account details in one object, respectively, rather than using three seperate memcache keys. Change-Id: I46bf60c405b37cdb22727965bfd67bc5c410e77c BUG: 868087 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4139 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: 'volume set' changes for op-version supportKaushal M2012-10-315-168/+348
| | | | | | | | | | | | An op-version check is performed for the given keys during stage. The commit phase moves the cluster op-version to the required version if needed. Change-Id: Id5c387094dbec723df736b2ecdc49ff93c179e0e BUG: 814534 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/3780 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli: Mark port as N/A in volume status when process is not onlineKrutika Dhananjay2012-10-303-14/+88
| | | | | | | | | Change-Id: Ie11c7331e3bc58c0f934f424dde4341cdffb9e2c BUG: 861542 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4048 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: op-version handshake implementationKaushal M2012-10-3010-155/+882
| | | | | | | | | | | | | Brings in a new rpc program MGMT_HANDSHAKE, which implements the op-version handshake. This is required for bringing in the op-version feature as described in http://www.gluster.org/community/documentation/index.php/Features/Opversion Change-Id: I4333fd2714dbbd3a2a3fca5862cbb3c56615529e BUG: 814534 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/3688 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Minor refactorings to mark an internal routinePeter Portante2012-10-302-9/+8
| | | | | | | | | | | | | | | Just a couple of changes to mark a routine as internal to this module (leading underscore, helps understand what is part of the utils API and what is not), and use of the positional argument for memcache for consistency and reduction in line count (doing this ahead of another refactoring to keep changes concise). Change-Id: I71581ad6ac4c383b1de787b767be568fc0a87eef Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4138 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* protocols: Suppress getxattr log when errno is ENOENTPranith Kumar K2012-10-282-2/+5
| | | | | | | | | Change-Id: I3f4fe3f382aec5fd142cc409b80bd73aebd8b39b BUG: 861015 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4097 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Reduce the number of stat/fstat system calls madePeter Portante2012-10-252-39/+34
| | | | | | | | | | | | | | | | | | | | | This address BZ 868086, https://bugzilla.redhat.com/show_bug.cgi?id=868086 This refactoring consolidates the code a bit, and uses os.stat calls to get all the information in one call when gathering the metadata for an object. The five stat system calls (invoked via all the os.path.*() calls) have been reduced to one. We also added a unit test for the one new behavior where get_object_metadata() will now throw an OSError exception if it has a problem stat'ing a file that exists. Change-Id: Iad5410c77938af68a47be757a3170abd201adeb0 BUG: 868086 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4112 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* Further reduce extended attribute reads/writesPeter Portante2012-10-254-41/+281
| | | | | | | | | | | | | | | | | | | | | | | More refactoring towards reducing the number of extended attribute reads/writes to the file system. See BZ 868120: http://bugzilla.redhat.com/show_bug.cgi?id=868120 Basically the redundant routines restore_object, restore_account and restore_container have been collapsed to one routine, restore_metadata, which will only write out metadata if the new metadata is different from what was originally read. Along with these changes come a set of unit tests for all the functions related to the routines that are in this module in the call tree where restore_metadata is invoked. Change-Id: I957ee2f8646cbe6df4d4420d3bdfb1f6ac62bdd2 BUG: 868120 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4111 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* Move _add_timestamp() closer to where it is usedPeter Portante2012-10-251-11/+12
| | | | | | | | | | | | Simple refactoring to move _add_timestamp() closer to where it is used ahead of further refactoring changes. Change-Id: I175c5672202f2d961c72d4e2f4a441b47de1ba28 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4110 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* object-storage: reduce the number of getxattr system calls by onePeter Portante2012-10-256-13/+281
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Initial step towards addressing BZ 865619. Prior to the patch, reading metadata for a given object or container involves at minimum three getxattr system calls for objects that use only one xattr key/value pair: 1. (via pyxattr) getxattr() to see if key exists and get its value length (so it can allocate memory for second call below) 2. (from pyxattr) getxattr() to get actual value data 3. (via pyxattr) getxattr() to see if following key exists For objects and containers that only have to use one xattr key/value pair, this patch reduces the number system calls by one. This can be significant given that almost every Swift API operation requires reads of the object or containers metadata. This patch is mostly a change to plugins.utils.read_metadata() to try to unpickle the accumulated metadata as each key/value pair is read, rather than trying to accumulate all the key/value pairs and unpickle at the end. Once we get enough data to form the pickle, we no longer keep trying to get more keys, even if those keys exist. The extra keys can exist when the size of the stored metadata shrinks below a key threshold. See https://bugzilla.redhat.com/show_bug.cgi?id=865619 for more details. See also https://bugzilla.redhat.com/show_bug.cgi?id=865858. This patch also adds a unit test infrastructure, and uses it to test with full coverage, the read_metadata, write_metadata and clean_metadata functions. As a result, we found that an infinite loop would occur in clean_metadata() when an unexpected IOError would occur trying to remove a key (this patch contains a fix). Change-Id: Ia1838c5e73af453b65360c1c525824231aa7c5d4 BUG: 865619 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4109 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* object-storage: Bump size of metadata stored per xattr keyPeter Portante2012-10-251-2/+3
| | | | | | | | | | | | | | | | | | | For Gluster, since we require XFS, and XFS has a max metadata value size of 64 KB, use the increased stored size to reduce the number of system calls, and how often we exit and enter the Python interpreter (via calls to pyxattr module). Today, with the hardcoded 254 byte limit per xattr key/value pair, adding a couple hundred bytes of user specified metadata can translate to up to three xattr key/value pairs (remember that the internal python metadata dictionary is pickled first and then stored in chunks in the keys). Change-Id: I6648106e8fac31f973ce207a6fecbcdab11fa271 BUG: 865493 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4108 Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* core: add STACK_WIND_TAIL for more efficient default_xxx.Jeff Darcy2012-10-252-92/+120
| | | | | | | | | Change-Id: Ic38e2183d1320bb17c014aca33779471c8db5d5f BUG: 867132 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4092 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: Remove brick from brick list on all nodes.Krishnan Parthasarathi2012-10-241-0/+2
| | | | | | | | | Change-Id: I7150691886550b80cf5de11464a36c3254c5d21b BUG: 866916 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4128 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Add OCF compliant resource agents for glusterd and volumesFlorian Haas2012-10-245-1/+481
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These resource agents plug glusterd into Open Cluster Framework (OCF) compliant cluster resource managers, like Pacemaker. The glusterd RA is fairly trivial; it simply manages the glusterd daemon like any upstart or systemd job would, except that Pacemaker can do it in a cluster-aware fashion. The volume RA is a bit more involved; It starts a volume and monitors individual brick's daemons in a cluster aware fashion, recovering bricks when their processes fail. Note that this does NOT imply people would deploy GlusterFS servers in pairs, or anything of that nature. Pacemaker has the ability to deploy cluster resources as clones, meaning glusterd and volumes would be configured as follows in a Pacemaker cluster: primitive p_glusterd ocf:glusterfs:glusterd \ op monitor interval="30" primitive p_volume_demo ocf:glusterfs:volume \ params volname="demo" \ op monitor interval="10" clone cl_glusterd p_glusterd \ meta interleave="true" clone cl_volume_demo p_volume_demo \ meta interleave="true" ordered="true" colocation c_volume_on_glusterd inf: cl_volume_demo cl_glusterd order o_glusterd_before_volume 0: cl_glusterd cl_volume_demo The cluster status then looks as follows (in a 4-node cluster; note the configuration above could be applied, unchanged, to a cluster of any number of nodes): ============ Last updated: Fri Mar 30 10:54:50 2012 Last change: Thu Mar 29 17:20:17 2012 via crmd on gluster02.h Stack: openais Current DC: gluster03.h - partition with quorum Version: 1.1.6-3.el6-a02c0f19a00c1eb2527ad38f146ebc0834814558 4 Nodes configured, 4 expected votes 8 Resources configured. ============ Online: [ gluster02.h gluster03.h gluster04.h gluster01.h ] Clone Set: cl_glusterd [p_glusterd] Started: [ gluster02.h gluster03.h gluster04.h gluster01.h ] Clone Set: cl_volume_demo [p_volume_demo] Started: [ gluster01.h gluster02.h gluster03.h gluster04.h ] This is also a way of providing automatic glusterd and brick recovery in systems where neither upstart nor systemd are available. Change-Id: Ied46657bdfd2dd72dc97cf41b0eb7adcecacd18f BUG: 869559 Signed-off-by: Florian Haas <florian@hastexo.com> Reviewed-on: http://review.gluster.org/3043 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: fix for remove-brick on just created/stopped volumesAmar Tumballi2012-10-243-16/+57
| | | | | | | | | | | | | | | | in a fix to avoid race between stopping the brick and deleting it in remove-brick (15396f490d23c665d51a64a049679cb40472ab05) we moved delete of the brick inside stop volume, which was totally inside the 'if (volinfo->status == STARTED)' section. thus it made remove-brick of stopped/created volume as a failure. Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 867252 Change-Id: Ie251e59a0b7ddb6965d8d48fb2a3bdb3bd11653d Reviewed-on: http://review.gluster.org/4127 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Jeff Darcy <jdarcy@redhat.com>
* glusterd: do not log rdma not found messages in error modeRaghavendra Bhat2012-10-231-1/+1
| | | | | | | | | | Change-Id: Ie35b05ed2ee004bd6479ccdd3459cbcd9cf8c208 BUG: 867313 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4094 Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* NetBSD negative timeout missing support workaroundEmmanuel Dreyfus2012-10-201-1/+1
| | | | | | | | | | | | | Newer and simplier version: since the default of negative_timeout is 0, we can just avoid sending a fuse_entry in that case, and this is enough to work around the problem. BUG: 764655 Change-Id: Ibfc6230e3cb9871ccade7fb756e61ebc47cb6487 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/4115 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* In some cases AI_ADDRCONFIG confuses NetBSD 6.0Emmanuel Dreyfus2012-10-201-0/+2
| | | | | | | | | BUG: 764655 Change-Id: I29198c94c6788f9e01f57e11798f3d3d7cd9c8de Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/4105 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* nfs: do lookup on getattr after brick-status changeJeff Darcy2012-10-198-40/+171
| | | | | | | | | | | | | By doing a lookup, we get a chance to do all of the self-heal checks that would occur if we were using native protocol, and return proper status if the self-heal fails. Best of all, we don't need to misrepresent times. Change-Id: I76477d1e5fce4d83e4029e02fcdd71e81e23110d BUG: 830134 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4058 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: pre-commit regression testsAnand Avati2012-10-187-83/+234
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Framework for writing test cases to be submitted with patches. This framework and the test cases get exercised by Jenkins in the pre-commit regression test. Jenkins is configured to give a +1 verified vote only if the regression test passes without failures (which includes test cases added/changed by the patch being tested) Every patch should include a test case (either extensions/changes to existing test cases or add new ones, as appropriate). The test case should be part of the same commit so that both code and test case get reviewed together. Test cases added are cumulative. Every new patch gets tested against its own test case and every test case previously added. A lot of new commits in the near future will be pure test cases (with no code change) which will get added in "catch up" mode. The tool used for implementing test cases is 'prove', and the framework itself is modeled similar to the POSIX compliance filesystem test suite. Under the top level directory, a new directory named 'tests/' is added. This contains top level classifier directories and framework files/scripts. Functionality tests should be created under a classifier directory below 'tests/'. For e.g: tests/basic/mount.t tests/performance/write-behind.t Bugs which get fixed should include a test case script named by the bug id, so that we are guaranteed any new change will not bring the issue back. For e.g: tests/bugs/bug-123456.t Triggering of regression tests in Jenkins is manual at this point as we do not want the entire test suite to run against every revision of a patch while it is still in the review/resubmit cycle. Signed-off-by: Anand Avati <avati@redhat.com> Change-Id: I8078244619135ccaba38e068925f8ca85141055a BUG: 764966 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4101 Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterfs: add gf_mkostemp api and use it instead of mkostemp of libcRaghavendra Bhat2012-10-173-0/+114
| | | | | | | | | Change-Id: Icc12b99e2233d22037e2c4bb2b6966e45668b7dd BUG: 764890 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4091 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* object-storage: Don't catch generic exceptions around xattr callsPeter Portante2012-10-171-2/+2
| | | | | | | | | | | | | We should really avoid catching generic Exception objects around any of our system calls. This simple fix brings this code in line with the other code wrapping xattr calls. Change-Id: I75492a61081fbfbec34c8d91a47214858c67e405 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4099 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* object-storage: Refactor code to reduce Swift diffs carriedPeter Portante2012-10-1714-546/+379
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The upstream Swift code base contains the following commit which adds the ability to modify constraint values using the swift.conf file: https://github.com/openstack/swift/commit/a2ac5efaa64f57fbbe059066c6c4636dfd0715c2 These changes rely on the above commit being back-ported to Swift 1.4.8 (see https://github.com/portante/swift/commit/fc2421b04022ac6bbe9d5014362ec5f99f94c5e0). As a result, a good number of differences we carry can be removed, since the provided swift.conf file now contains the values we need. Along with these changes, we add middleware to get constraints loaded properly (via monkey patching) until subclassing is implemented in a future commit. We further simplify the diffs to a minimal set by storing the timestamp in file system metadata and moving new files to the plugins/middleware directory. Note that the original "gluster" middleware was in the swift.diff file, and has been renamed to "glusterfs" and moved to the new plugins/middleware directory. The "gluster" middleware is now a temporary way to get the constraints properly loaded (both of these middleware pieces should disappear in future commits when we refactor further to subclass the Swift objects instead of patching them). Change-Id: I9dc00d6b6cdd64e277896d75c2fb06431c3e69cb BUG: 862052 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4093 Tested-by: Peter Portante <pportant@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/dht: ignore empty ->hashed_subvol during lookupVenky Shankar2012-10-171-9/+1
| | | | | | | | | | | | | | | ->hashed_subvol is not valid (== NULL) when the subvolume the entity hashes to is down. For directories, we need not rely on ->hashed_subvol as we aggregate information from all subvolumes. So, during lookup, NULL ->hashed_subvol is ingored but logged. Change-Id: I306e4e274fe29d60ff028add4a6c3bcd67b2f314 Signed-off-by: Venky Shankar <vshankar@redhat.com> BUG: 856459 Reviewed-on: http://review.gluster.org/4046 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* cluster/distribute: Always return the latest time in struct iatt.shishir gowda2012-10-166-50/+264
| | | | | | | | | | | | | | | | | | | save the a/c/mtime in inode_ctx, and dht_inode_ctx_update checks the passed iatte, and updates the stat's time, and inode_ctx's time accordingly. For preparent times, only the iatt stat to be returned is updated, not the ctx. With this, update, WIPE is removed, as we would always be passing back the latest mtime, and hence cache times will be relevant. TODO-handle rename WIPE calls Change-Id: I8e4c738cd830f3fafeef789c9181f9c242ac96a2 BUG: 857791 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.org/3737 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* syncop: save and restore THIS from the time of context switchAnand Avati2012-10-161-0/+4
| | | | | | | | | | | | | | | | | | The current yield() code assumes that the point of yielding is always in the translator where the synctask was created. This can be a problem for nested syncops and/or where syncop is issued by a different translator. So, save the THIS pointer just before swapcontext() and restore it right after resuming. Change-Id: I86aad2329ccbc3ac1f04fbec3835136ff3fa79fb BUG: 862838 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4085 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Pranith Kumar Karampuri <pkarampu@redhat.com>
* mgmt/glusterd: avoid directly using conf->uuidPranith Kumar K2012-10-164-16/+16
| | | | | | | | | Change-Id: I398c8741b02aa2f34d428c948e93f422e520a9ab BUG: 862834 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4084 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* object-storage: change logging of some errors to warningsPeter Portante2012-10-161-12/+12
| | | | | | | | | | | | | There are a number of errors logged which should probably be warnings, given that the code recovers on those paths. Change-Id: Ie643bbccb71e7b84ba76d68bac473d1dde663c44 BUG: 866557 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4089 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Remove the test subdirectory diffs ahead of initial refactoring.Peter Portante2012-10-161-136/+0
| | | | | | | | | | | | | | | | | | A subsequent commit will refactor the changes required of Swift to be much more minimal in nature, but does so by relying on an upstream Swift change to allow constraint values specified in the swift.conf file (see https://github.com/openstack/swift/commit/a2ac5efaa64f57fbbe059066c6c4636dfd0715c2). As a result, we can remove the test subdirectory diffs and assume that they will be present as a result of the upstream patch above. Change-Id: Ic450aca235d4c9f345e480f9b761bcb2857bd689 BUG: 862052 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4082 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Reduce the number of gratuitous differences in constraints.Peter Portante2012-10-161-4/+6
| | | | | | | | | | | | | | Ahead of further refactoring to make things a bit easier to review, we have restored some of the code formatting as it was in the original constraints.py file from which this file as copied. Change-Id: Icd0b42b4790bc076c54dcbf08a9745648769acfd BUG: 862052 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4081 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfs: code cleanupRaghavendra Bhat2012-10-152-14/+12
| | | | | | | | | Change-Id: I99bbb720d8b42c8b3899bb1353c6b73f7fcd50f1 BUG: 764890 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4042 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Fix BZ 865858: remove unnecessary system calls around xattr opsPeter Portante2012-10-131-73/+19
| | | | | | | | | | | | | | | | | The following is a simple refactoring of the read and write metadata methods to just make calls to get/set/remove xattr operations instead of trying to stat/open/close the file. For a single GET operation, this brings down the number of system calls made from 13 to 3 for a file object with no significantly sized metadata (meaning, only 1 xattr key/value pair is needed to store the metadata). Change-Id: I698f5886d63d5203f130c8eac1536a3ee4b0dbfb BUG: 865858 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4078 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* write-behind: use uint64_t for overlap comparisonAnand Avati2012-10-131-4/+4
| | | | | | | | | off_t is 'long int' (signed word) and therefore ULLONG_MAX - 1 Change-Id: I027de7a1b2ca24865d5d787f9986930e97911ca4 BUG: 857673 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/4079
* Refactor to use pyxattr's get/set/remove methodsPeter Portante2012-10-131-9/+9
| | | | | | | | | | | | | These methods are not deprecated, the old ones with the xattr suffix are considered deprecated starting with 0.4 of pyxattr. Change-Id: I86ba7a44cec81a273931bf7e470de5eb04e82663 BUG: 865858 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4077 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Fix a small typ-o in the Swift READMEPeter Portante2012-10-131-1/+1
| | | | | | | | | Change-Id: I6c737bcc0d60d656df63ffe1c03ad336606ec090 BUG: 862052 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4080 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol/client: Conditional logging in client3_3_unlink_cbkVenkatesh Somyajulu2012-10-121-1/+5
| | | | | | | | | Change-Id: I4af398362cdb3f99782dcd3728988e4cf1fbb479 BUG: 861925 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/4069 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr : Edited log message in afr_sh_entry_expunge_entry_cbkVenkatesh Somyajulu2012-10-121-1/+2
| | | | | | | | | Change-Id: I9f7562d28c8bc798552c403164397f929a7bd1e7 BUG: 860246 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/4052 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* core: Add support for systemtapKrishnan Parthasarathi2012-10-121-0/+33
| | | | | | | | | | | | | - First cut (configure plumbing only) - Intended to allow people who want to test userspace probes for their favourite xlator(s). Change-Id: I5bf202073a2f1cc29dc4a55714167b7f48b463a1 BUG: 865734 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/3638 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/quota: Accept float numbers for quota limit.Varun Shastry2012-10-121-3/+3
| | | | | | | | | | | | Quota limit can be given a floating value like 2.5GB or 0.5TB, which was not possible before. Change-Id: I2c89fd521e8b70be51252677c7986abcfa9d11a2 BUG: 819394 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/4068 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterfs man page editVarun Shastry2012-10-111-11/+55
| | | | | | | | | | | | | Updated man page, * Added some of the options which were not there before. * Updated the default dirs. Change-Id: Ia796377120dc2fb990b2591c7607a16ef93f1fe2 BUG: 825906 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/4060 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Preventing client crashing as the callings of GF_CALLOC has been failed.linbaiye2012-10-114-31/+107
| | | | | | | | | | | | | As the callings of GF_CALLOC can seldom come to a failure, glusterfs client will crash due to segment fault. We should have returned once the variables of transaction's local can't be alloced. Change-Id: Ia3798b8349d832b23c7825e64dbad93ebe29cd1b BUG: 861335 Signed-off-by: linbaiye <linbaiye@gmail.com> Reviewed-on: http://review.gluster.org/4005 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* performance/write-behind: use try lock while taking statedumpsRaghavendra Bhat2012-10-111-2/+9
| | | | | | | | | | Change-Id: I690e8bf650d6e6e50899c2e17a79f42789e701eb BUG: 843792 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4036 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amarts@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: introduce "--" as option terminatorCsaba Henk2012-10-111-0/+14
| | | | | | | | | | | | | This way it becomes possible to pass option-like arguments to cli commands. Change-Id: I8eb1a44ce5d1bfe901d2b3e7cc7bfb84bb3012c9 BUG: 815194 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.org/4007 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* storage/posix: remove dependency on loc->path in posix_lookup()Amar Tumballi2012-10-111-1/+0
| | | | | | | | | Change-Id: I0a3bc8650d9ff83977be696aa5caf9c7570197fd Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 781318 Reviewed-on: http://review.gluster.org/3997 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* replicate: don't use synctask_new from within a synctaskJeff Darcy2012-10-111-3/+14
| | | | | | | | | | Change-Id: Iebf821ff720c63ab6da4b219d82c7f1d00769992 BUG: 862838 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4032 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: gluster volume heal $VN info sporadically reports nothing to healVenkatesh Somyajulu2012-10-111-24/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM: Whenever rsync is done at the mount point of a replicate volume and during the rsycn glusterd and bricks of one of the machine gets killed then executing gluster volume heal info gives results sporadically.Sometimes it says Number of entries are zero and other time it gives different output. When glusterd and brick of one of the machine gets killed then at other machine, RPC_CLNT_DISCONNECT will get triggered periodically. So it may happen that during the execution of gluster volume heal info command, RPC_CLNT_DISCONNECT also gets triggered and glusterd will assume that it got a new rpc_disconnet notification and glusterd will call the glusterd_op_ac_send_unlock_drain function instead of calling the glusterd_op_ac_rcvd_brick_op_acc function which is responsible for printing the entries. So because of RCP_CLNT_DISCONNECT notification, glusterd will execute functions responsible for RPC_CLNT_DISCONNECT(glusterd_op_ac_send_unlock_drain) rather than executing functions responsible for gluster volume heal info command(glusterd_op_ac_rcvd_brick_op_acc). FIX: Put a condition in for RPC_CLNT_DISCONNECT in the glusterd_peer_rpc_notify function so that if RPC_DISCONNECT is triggered for the first for a peer then glusterd mark that peer as disconnected so that if RPC_DISCONNET is triggered again, because peer is already marked as disconnected, glusterd will not inject EVENTR_ACK_DRAIN and prints the Number of entries. Change-Id: I770e3175b050fd7c7beb801b611a2dff9bfcbac8 BUG: 857503 Signed-off-by: Venkatesh Somyajulu <vsomyaju@redhat.com> Reviewed-on: http://review.gluster.org/4043 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* client-handshake: synchronize config.remote_port setting b/wRaghavendra G2012-10-112-13/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | rpc_clnt_reconnect and client_query_portmap_cbk problem: ------- Theoretically there is a possibility that we could complete querying the remote brick's port number before rpc_transport_connect can return. If rpc_clnt_reconnect happens to be the caller of rpc_transport_connect and we've already got the remote brick's port number by the time rpc_transport_connect returns, without synchronization, rpc_clnt_connect resets config.remote_port to zero even before we have attempted a connection with remote brick. fix: --- By making only poll thread do setting and resetting of config.remote_port, we avoid the race-condition. Change-Id: I51879ba1cac651a80ff5c9c070ec7fe1ceea9e05 BUG: 765051 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.org/4044 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>