summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* extras: Changed the exit status in start function to 0.Raghavendra Talur2013-01-111-1/+1
| | | | | | | | | | | | | | | | | | Problem: We were returning "1" when "glusterd start" was being called with service already running. As per http://refspecs.linuxbase.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptact.html we should consider it to be a success case and return 0. Fix: Just changed the return status from 1 to 0. Change-Id: I8d6d2014f0c32ba53834503e721e2a71df7330a8 BUG: 845653 Signed-off-by: Raghavendra Talur <rtalur@redhat.com> Reviewed-on: http://review.gluster.org/4348 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Changes to support automake-1.13Kaushal M2013-01-112-3/+3
| | | | | | | | | | | | | | automake-1.13 obsoletes some macros that were being used. This patch replaces these macros. Change-Id: I2a24a923f284e9b54fb57ccc27eb0b5ad8dd6050 BUG: 892882 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4368 Tested-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* tests: make EXPECT_WITHIN also fail on command failureKaushal M2013-01-102-2/+15
| | | | | | | | | Change-Id: I051bbe2344f19e647826ee177932ae8b95747ebd BUG: 764966 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4334 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: fix memory corruption when probe failsJeff Darcy2013-01-101-19/+22
| | | | | | | | | Change-Id: If161e9bebfd518b355aaf37af7805e804772dc2d BUG: 893851 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4372 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
* glusterd: Add GF_ASSERT check in glusterd volume op handlersKrutika Dhananjay2013-01-088-2/+20
| | | | | | | | | | Change-Id: Iea6ac1e612812ba8ffc4b60899a9e574a3b09ea6 BUG: 873549 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4346 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Set replace-brick id in op ctx only in origin glusterdKrishnan Parthasarathi2013-01-081-13/+17
| | | | | | | | | Change-Id: I8282f911fb47f4cfb45947b2810d84105c82b5ff BUG: 889999 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4352 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* cli: Fix task-id xml compilationKaushal M2013-01-081-0/+2
| | | | | | | | | Change-Id: I92ada7d5ba1eb46024f47c4f32c517db27ada576 BUG: 857330 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4342 Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: Made dst brick's port info available to all peersKrishnan Parthasarathi2013-01-043-22/+73
| | | | | | | | | Change-Id: I1f65743a31d95013fdf22cded91c314e9934a3a9 BUG: 816915 Signed-off-by: Krishnan Parthasarathi <kp@gluster.com> Reviewed-on: http://review.gluster.org/3275 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: log enhancements for volume startKrutika Dhananjay2013-01-048-78/+188
| | | | | | | | | | | | | | | | | | | | | * changed some of the log messages to give as much information as available in case of failure * added logs to identify on which machine lock/stage/commit failed * added macros to represent error strings to maintain uniformity among error messages for a given kind of error * moved error logs wherever possible, from caller to callee to avoid code duplication Change-Id: I0e98d5d3ba086c99240f2fbd642451f175f51942 BUG: 812356 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4353 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com> Tested-by: Vijay Bellur <vbellur@redhat.com>
* nfs: correct phrasing of nfs-mount-udp optionNiels de Vos2012-12-271-2/+3
| | | | | | | | | | | | | | | | | | | | `gluster volume set help` shows the following typo for the nfs.mount-udp option: Option: nfs.mount-udp Default Value: (null) Description: set the option to 'on' to enable mountd on UDP. Needed by Solaris NFS clients if NLM support isneeded Also, AIX NFS-clients seem to need this option, hence rephrasing the description to be more helpful. BUG: 889500 Change-Id: I91d88d74824da13dcfe828015d7b9e18abc93ef2 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/4350 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* glusterd: "volume status" for remote brick fails on cli.JulesWang2012-12-261-0/+20
| | | | | | | | | | | cli fails because key "brick-index-max" is missing in rsp dict. Change-Id: I38119bbd31b68fe3ad1152af2495dff7624d99b7 BUG: 888752 Signed-off-by: JulesWang <w.jq0722@gmail.com> Reviewed-on: http://review.gluster.org/4347 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* system/posix-acl: prevent NULL pointer dereference of group_ceVarun Shastry2012-12-262-1/+49
| | | | | | | | | | | | Thanks Amar Tumballi. Change-Id: I3ac9b46d4c3fcd12d1eec779317a03c47d267556 BUG: 887098 Signed-off-by: Varun Shastry <vshastry@redhat.com> Reviewed-on: http://review.gluster.org/4351 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* logging: Added fflush in _gf_log.Avra Sengupta2012-12-211-0/+2
| | | | | | | | | | Change-Id: I06444b6bc3b1acc8cabd863087bd3508de3c548c BUG: 889157 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/4344 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* glusterd: Remove invalid free of op_errstrKrutika Dhananjay2012-12-201-1/+0
| | | | | | | | | | | | Thanks to Raghavendra Bhat for pointing it out. Change-Id: I77b0f02a71ce273c9d1ffcbb1ce7e9d5b34d9de9 BUG: 873549 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4345 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* protocol/client: print a message regarding brick status in case of failureKrutika Dhananjay2012-12-201-1/+3
| | | | | | | | | | | | | | that way, it would help admins to look at the corresponding brick directly. All credit goes to Amar. Change-Id: I959df59111864cc0574945d827f8fe5f2d919491 BUG: 839021 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4341 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* core: remove all the 'inner' functions in codebaseAmar Tumballi2012-12-1915-420/+529
| | | | | | | | | | | | | | | | * move 'dict_keys_join()' from api/glfs_fops.c to libglusterfs/dict.c - also added an argument which is treated as a filter function if required, currently useful for fuse. * now 'make CFLAGS="-std=gnu99 -pedantic" 2>&1 | grep nested' gives no output. Change-Id: I4e18496fbd93ae1d3942026ef4931889cba015e8 Signed-off-by: Amar Tumballi <amarts@redhat.com> BUG: 875913 Reviewed-on: http://review.gluster.org/4187 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* api: update Python wrapperJeff Darcy2012-12-191-24/+395
| | | | | | | | | | | | | | This brings us back to functional parity with the C example, and also makes things more "Pythonic" (e.g. methods on Volume/File objects instead of bare functions). Change-Id: I46edfee46d91881e275de2f63e15d9f0a6448e80 BUG: 839950 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4286 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Peter Portante <pportant@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd, cli: Task id's for async tasksKaushal M2012-12-1920-329/+1607
| | | | | | | | | | | | | | | | | | | | | | This patch introduces task-id's for async tasks like rebalance, remove-brick and replace-brick. An id is generated for each task when it is started and displayed to the user in cli output. The status of running tasks is also included in the output of "volume status" along with its id, so that a user can easily track the progress of an async task. Also, * added tests for this feature into the regression test suite. * added a python script for creating files, 'create-files.py', courtesy Vijaykumar Koppad (vkoppad@redhat.com) into the test suite. This patch reverts the revert commit 698deb33d731df6de84da8ae8ee4045e1543a168. BUG: 857330 Change-Id: Id43d7cb629a38f47f733fbc18cb4c5f2f0327c7a Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4294 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol/server: Do not access key after GF_FREE in _delete_auth_opt()Krutika Dhananjay2012-12-191-11/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEMS: 1.'key' becomes a dangling pointer after the first call to dict_del() returns, in _delete_auth_opt(). Therefore, the second call to fnmatch() is made with 'key' pointing to deallocated space. 2. Also, the name _delete_auth_opt seems to suggest that the function is intended to match and delete "auth" options from the dictionary. But it winds up deleting all the options irrespective of whether the pattern match was successful or not. The same is true with _copy_auth_opt(). FIX: Changed _delete_auth_opt() to delete the key ONLY if it matches either of the two patterns (auth.addr.*.allow and auth.addr.*.reject). Similarly, changed _copy_auth_opt() along the same lines. Change-Id: Ic8664e5a0a29cefe43cb59a27e32fbdbeac154b5 BUG: 881062 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4337 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* tests: let basic/rpm.t cleanup after itself when not in DEBUG-modeNiels de Vos2012-12-191-4/+4
| | | | | | | | | | | | | | | | | The temporary working directory unders /var/tmp is not cleaned when debugging of the test is disabled. The logic should be the othetr way around. With this correction, the output while running is reduced as well. Nothing of the output contains useful information and clutters the testing output for no reason. BUG: 888743 Change-Id: Id7616ad41873f61fd5d435b380f98068f313d5a6 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/4340 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: Making the op-ret check for gluster peer probe --xml more robust.v3.4.0qa6Avra Sengupta2012-12-191-2/+2
| | | | | | | | | Change-Id: I75ca74a9e962ea47abbb2970e37dd182429b734b BUG: 879490 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/4335 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli: Fixing the xml output in failure cases for gluster peer detachAvra Sengupta2012-12-192-2/+41
| | | | | | | | | Change-Id: I87aadec1949fccadde396b95f31eeb6832e461b4 BUG: 879494 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/4336 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* cli: Fixing the xml output in failure cases for gluster peer probeAvra Sengupta2012-12-183-8/+53
| | | | | | | | | Change-Id: I9ebec995cbf47d9ced7140e37787e74ff9c63769 BUG: 879490 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/4301 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Tests: Print the actual, expected values for EXPECTPranith Kumar K2012-12-182-4/+18
| | | | | | | | | Change-Id: I394d23c0ea15bd340041550660cc5def017b5f15 BUG: 764966 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4327 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Tests: Redirect 'TEST' errors when it is expecting errorsPranith Kumar K2012-12-181-1/+6
| | | | | | | | | Change-Id: Iad2535eca7a58526d1a23cea9b7cf445a3846782 BUG: 764966 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4329 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* features/locks : Made changes to display brick information on clearing locks.Avra Sengupta2012-12-183-16/+188
| | | | | | | | | Change-Id: I664614677bc887ce087bfca067e6e57f0d6b659d BUG: 824753 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/4272 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc-transport/rdma: use 24008 as default listen port.Raghavendra G2012-12-181-0/+2
| | | | | | | | | | Change-Id: I021d5e2dbe3653d4303b64fe1ada0556cd4b7966 BUG: 878883 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.org/4323 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Revert "tests: Test afr mknod, create when one of the bricks is offline."Anand Avati2012-12-181-48/+0
| | | | | | | | | This reverts commit 29ea7b5c23571e7d2449b3ccd582d3fe70371ea9 Change-Id: I1ea8bab057fc215ef628b5762cd4958dd961830a Reviewed-on: http://review.gluster.org/4332 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* glusterd: Fix initialisation of thisKrutika Dhananjay2012-12-183-0/+23
| | | | | | | | | | Change-Id: I77f9b153d23ca5de1cb098cde5951e56f04d3a1c BUG: 873549 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4324 Reviewed-by: Amar Tumballi <amarts@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* geo-rep: do not access BaseException.message in syncdutilsNiels de Vos2012-12-181-2/+2
| | | | | | | | | | | | | | http://www.python.org/dev/peps/pep-0352/ explains that the .message property of BaseException is being removed. Most of the other exception handlers access <Exception>.args[] which should be suitable for this case too. Change-Id: I1810450b78d2b3d7f8bd07f2beb02cbe9e2adecb BUG: 888346 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/4328 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Tests: Print elapsed time per test filePranith Kumar K2012-12-171-1/+1
| | | | | | | | | Change-Id: I61f7653bec357ec2b49d5b7719e564c31c2addbf BUG: 764966 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4320 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Tests: Add util function to get changelog xattrPranith Kumar K2012-12-171-0/+6
| | | | | | | | | Change-Id: I3f6b79145e78b035950929e7ed8edb259525612f BUG: 864666 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4317 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: check for the -ve values returned from dict_serialized_lengthRaghavendra Bhat2012-12-171-1/+1
| | | | | | | | | Change-Id: I9fa7744b02791180ccb93adef10c363a1b38aa31 BUG: 838204 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4319 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* tests: Added basic sanity test for all volume-status cmdsKrishnan Parthasarathi2012-12-171-0/+63
| | | | | | | | | Change-Id: I482a38ca9f67a5f4b4cbc96731cb68c3b442c2d4 BUG: 764966 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4298 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* object-storage: only open file when requestedPeter Portante2012-12-172-4/+8
| | | | | | | | | | | | | | | | | | | Only open a file when the caller of the constructor indicates that it expects to have a file pointer to access in the "fp" field. Found by Junaid during review http://review.gluster.org/4284, Patch set 6. We also bump the version number to mark a line in the set of changes we want to perform a mini release with to double check for performance regressions. Change-Id: I13cf336bb519088890192ee111f4ece85a5982c4 BUG: 886730 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4303 Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* object-storage: don't sort object list, not req'dPeter Portante2012-12-171-3/+0
| | | | | | | | | | | | | | The REST API for listing objects in a container does not require that the list of objects be sorted (the API for listing containers in an account does require it). Since we can have thousands and thousands of objects in a container, don't sort them when it is not required. Change-Id: I6939ef3fec3ea3814a49e3a3046273304889831c BUG: 887301 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4312 Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* object-storage: do not list directory for deletePeter Portante2012-12-171-4/+5
| | | | | | | | | | | | | | | | Do not list the entire directory contents of the directory containing the file before deleting it. We have already verified the files existence constructing the Gluster_DiskFile object. This fixes a customer issue. See 885281 (https://bugzilla.redhat.com/show_bug.cgi?id=885281). Change-Id: I4425c42af3e03624370c779d74b7f073e6eef024 BUG: 885281 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4302 Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* object-storage: apply upstream DiskFile refactorPeter Portante2012-12-172-73/+81
| | | | | | | | | | | | | Apply the upstream DiskFile refactoring in ahead of its use to easiliy apply the temp file optimization. Change-Id: I2708733eed3d87759c70eb3d9e6cd74ef91d0c7b BUG: 876660 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4288 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* object-storage: a set of cleanups to DiskFilePeter Portante2012-12-172-132/+138
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Here are a set of cleanups for things noticed while working on the unit test coverage: * Remove unused constants, adding a constant for default disk chunk size * Document missing logger parameter from constructor * Add iter_hook paramater to constructor in anticipation of 1.7.4 support * Add back meta_file field even though it is not used in our version of the constructor for paranoid compatibility * Remove is_valid field as it is not referenced anywhere, and it is not a field of the super class * Rename fields only used internally by DiskFile with leading underscores * Convert to using os.path.join() instead of hard coded '/' references * Use data_file field where possible * Assert that put_metadata() will only work when the file exists * Remove update_object() method since it is identical to put_metadata() and a direct write will suffice * Create the directory object only if it does not exist when a marker directory is requested Change-Id: If207fed4c0f423e6bd3232e4507f87de877057c4 BUG: 876660 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4287 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* object-storage: Initial unittest of DiskFile classPeter Portante2012-12-175-49/+1080
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we had this ahead of time, we could have avoided the errors that were encountered leading to the fix-account-mapping fix (see http://review.gluster.org/4222). This represents 100% coverage of the DiskFile module, but the coverage report says otherwise, unfortunately. That is because the put() method invokes eventlets during the test run, and coverage is not able to accurately track the coverage lines properly. If one comments out the "tpool.execute()" line in DiskFile.put() the coverage report then reports 100% for the DiskFile module. Additionally, we changed DiskFile.put() in four ways that should not change its behavior: 1. Comments were added to explain various code paths and mark potential issues / fixes 2. It no longer returns a boolean value, matching the behavior of swift.obj.server.DiskFile.put() 3. It no longer logs a message when it detects a directory that already exists, instead is raises an exception We believe this is okay because we cannot find a code path that would lead to his condition. As a result, it makes it easier to test all the code paths in that routine. 4. It no longer logs a message when create_dir_object() fails, since create_dir_object() raises an exception on failure only We also modified create_dir_object() to not return a boolean as a result of the above behavior. Note that by implementing these tests up to this point we found three code paths that would have failed if encountered due to missing imports. We also made changes to the DiskFile module to make it a bit easier to test, also eliminating an extra stat system call when deleting directory objects. Change-Id: I3286de83c1ec7c5e8d6cab9354e1c4397cee7497 BUG: 870589 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4284 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com>
* cluster/dht: Add "afr.readdir-failover=off" option the rebalance processshishir gowda2012-12-162-7/+28
| | | | | | | | | | | | | | | | | By failing over readdir (default behaviour), rebalance could get duplicate files, as readdir would re-read from offset 0. Rebalance should not attempt to migrate these files again. Additionally, we need to handle these cases as failure in rebalance crawl. No test case provided, as we cannot determine the read child in afr. Change-Id: If07508b4f92dacc17e0f695b48a866c7c66004be BUG: 859387 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.org/4300 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* NULL reference fix in gfid logEmmanuel Dreyfus2012-12-151-6/+6
| | | | | | | | | | | On callbacks, make sure loc.inode is not NULL before priting its gfid. BUG: 815227 Change-Id: Iab22b65217b5711ad8a92c83e335d9cb1a23841c Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/4313 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* write-behind: fixes issues with iobuf length for large writesKaushal M2012-12-131-5/+15
| | | | | | | | | | | | | | | | Use of an unsigned type in some calculations of size would lead to segmentation faults, if several large adjacent writes came in concurrently. Also, improves buffer allocation code to take the size required into account. Credits for the patch go to Amar. Change-Id: I8a09c52d49909e4ee8e7d4dcfa02ec33ea36a551 BUG: 880948 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4307 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: fix peer probe cli response on errorKaushal M2012-12-131-23/+19
| | | | | | | | | | | | | | | A peer probe with peers with differing op-versions or with unresolvable addresses would not reply to the cli with the error. This regression was caused by some changes introduced into glusterd_peer_rpc_notify(), which caused the cli reply path not to be executed. Change-Id: I0392b61e0a1dc22fa074529bdba0e357f938d013 BUG: 885591 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4293 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Make afr quorum options visible in volume set helpPranith Kumar K2012-12-132-2/+14
| | | | | | | | | | Change-Id: I705d814f63094279532806db0e1e0fc2815fc107 BUG: 884328 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4306 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Tests: Added util function for option help presencePranith Kumar K2012-12-131-0/+5
| | | | | | | | | | Change-Id: Iec9816af11d5ecb743adecdf335e97267994f758 BUG: 884328 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4305 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Spurious reserved port warning fixEmmanuel Dreyfus2012-12-131-1/+5
| | | | | | | | | | | | reserved ports is a Linux specitic concept. Make no warnings for other systems. BUG: 815227 Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Change-Id: I40037b9e99e7fcbdd0d153865ee7c2ef3733132e Reviewed-on: http://review.gluster.org/4308 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* NetBSD MS_RDONLY portability build fixEmmanuel Dreyfus2012-12-122-0/+6
| | | | | | | | | | | NetBSD uses MNT_RDONLY where Linux uses MS_RDONLY BUG: 815227 Change-Id: I8d78831f07e575b215aabc46eaa66e5e277bda0e Signed-off-by: Emmanuel Dreyfus <manu@netbsd.org> Reviewed-on: http://review.gluster.org/4299 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* build: include OCF resource agents by default and package themNiels de Vos2012-12-126-11/+129
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change introduces a glusterfs-resource-agents sub-package that contains the Open Cluster Framework (OCF) Resource Agents (RA). It also changes the build infrastructure to include the RA by default, making them available for anyone who is interested in using them with a OCF compatible Hight-Availability solution like Pacemaker. Build the RPMs without RA: $ make dist && rpmbuild -ta --without ocf *.gz Build the RPMs with RA (default): $ make dist && rpmbuild -ta *.gz There is no need to run ./autogen.sh from within the .spec, the whole autotools infrastructure is included in the 'make dist' tarball already. This also adds a test-case which builds the rpms with mock for the latest two EPEL releases. Change-Id: I12ef5f30f466868825352376156fb4e56b135c58 BUG: 869559 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: http://review.gluster.org/4130 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
* RHEL init script: ability to overwrite options from sysconfigFilip Pytloun2012-12-124-2/+28
| | | | | | | | | Change-Id: I15df0aef73e097a9ccfb00e2d4cae81d3a5a82fc BUG: 885739 Signed-off-by: Filip Pytloun <filip.pytloun@gooddata.com> Reviewed-on: http://review.gluster.org/4290 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Niels de Vos <ndevos@redhat.com>