summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* glusterd: Set op-version for quorum optionsv3.4.0qa5Kaushal M2012-12-111-2/+2
| | | | | | | | | Change-Id: I693cc96c1dc7dc560c3c25698f08b846e8a48fca BUG: 839595 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4291 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Added virt group file - template for 'group' setKrishnan Parthasarathi2012-12-112-1/+8
| | | | | | | | | | | | | | | | | | - This sample file contains the set of volume options that are associated with volumes that would be used to store VMs. - To enable the set of options present in this file one must do the following, - # cp extras/group-virt.example /var/lib/glusterd/groups/<group-name> # gluster volume set <volume-name> group <group-name> Change-Id: I8848d3d222ce114900db885aeef2f20c83ece28c BUG: 851237 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4232 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* gsyncd / geo-rep: do not start geo-rep if replace brick is in progressVenky Shankar2012-12-113-1/+77
| | | | | | | | | Change-Id: I9db32544ceb6f90c8231aaf40d722f6869a72614 BUG: 861945 Signed-off-by: Venky Shankar <vshankar@redhat.com> Reviewed-on: http://review.gluster.org/4289 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: Remember type of split-brain in inode-ctxPranith Kumar K2012-12-116-117/+199
| | | | | | | | | | | | | Along with this change, fixed the race of setting the split-brain status in inode-ctx after unwinding the fop from self-heal in case of back-ground self-heal. Change-Id: Ifc829300df485f50f139443802e8b6dc7038b4ad BUG: 873962 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4198 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: log appropriate message when locking failsKrutika Dhananjay2012-12-1111-197/+379
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PROBLEM: When a transaction is already in progress, and the user tries to execute another glusterd operation, the second operation fails as glusterd fails to acquire lock. But to the user, a message like "Operation failed" does not give ample information about why the operation failed. FIX: Made glusterd_op_txn_begin use and initialise error string, which is needed to capture failure in the "lock" phase. Also made gd_sync_task_begin set error string appropriately when locking fails. In the process, I had to introduce error string in some glusterd_handle_* functions. And because I introduced error string in these handlers, I decided to also set them in places where these handlers could possibly fail. HOW I TESTED IT: For want of a better idea, I "commented out" the call to "glusterd_unlock", recompiled glusterd and ran two glusterd volume operations, one after the other. The second operation fails with the message "Another transaction is in progress. Please try again after sometime." as expected. The tests were performed on two volume ops : one of them synctask'ized (volume start) and the other NOT (volume create). Change-Id: Ia862972929872ae2f053707a544824d9cadc37be BUG: 873549 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4197 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/distribute: re-set layouts to prevent overlapsshishir gowda2012-12-115-8/+131
| | | | | | | | | | | | | | | | | When subvols-per-directory option is used, with bricks addition/removal the layouts might get distributed to other subvols, which were not part of the layout before. We need to clean up layouts on old subvolumes, to prevent overlaps. Also, we need to make sure if layout-cnt is never less than subvolume-cnt. Change-Id: I00994a092ca0c99aedcc41bd9412d43460f88a04 BUG: 884455 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.org/4281 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Synchronize ls-loop with main-scriptPranith Kumar K2012-12-111-7/+6
| | | | | | | | | Change-Id: If9a15e4c272baa28eee4f2fdfdf52b2e032b3a96 BUG: 884452 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4292 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* object-storage: unit tests to 100% cover utilsPeter Portante2012-12-111-12/+146
| | | | | | | | | | Change-Id: I2d540e16cc3d420b9bb88e6857e9795d56e34529 BUG: 884327 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4225 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* object-storage: use temp file optimization for pklPeter Portante2012-12-113-10/+73
| | | | | | | | | | | | | | | | | | Override OpenStack Swift's swift.common.utils.write_pickle with our own implementation that uses the GlusterFS temporary file operation. A file name '.<FILENAME>.<RANDOM>' will hash to the same GlusterFS node as a file named '<FILENAME>', those avoiding a move of the file on a rename. This is part of the work needed to address BZ 876660 (https://bugzilla.redhat.com/show_bug.cgi?id=876660). Change-Id: I1cb9f97f289ab2ca76ec9221366df74de08268bb BUG: 876660 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4224 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* cli: fail vol set when value = empty string/string with all whitespacesKrutika Dhananjay2012-12-101-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | PROBLEMS: a. 'volume set' operation accepts empty strings and strings containing all whitespaces for value. The result - subsequent attempts to start glusterd fail. b. 'volume set group' operation, when passed an empty string or string containing all spaces as value, fopens the wrong file. FIX: Made volume set parser in cli check for and invalidate value if its length is 0 after all the whitespaces have been stripped off. Change-Id: I6792ee1fe9452d8e25e1fd1eeb1b9981be3389f1 BUG: 859927 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4246 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: fail vol set when value = empty string/string with all whitespacesKrutika Dhananjay2012-12-103-38/+163
| | | | | | | | | | | | | | | | | | | | | | PROBLEM: 'volume set' operation accepts empty strings and strings containing all whitespaces for value. The result - subsequent attempts to start glusterd fail. FIX: Added relevant checks in xlator_option_validate_* functions in options.c and in conversion functions in common-utils.c to invalidate wrong option values. Change-Id: I33232c6b42ab4fcce85c2d0e0b0da145fc9232c3 BUG: 859927 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4033 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpcsvc: Add an extra log messageKaushal M2012-12-102-2/+6
| | | | | | | | | | | | Adds an extra log message in rpcvsc_check_and_reply_error(). Also, makes a small change in the test-script. Change-Id: I2b686e6fa86529cc4fbf0066df64057a9784b849 BUG: 884452 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4285 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* object-storage: Use "-dev" in the version stringPeter Portante2012-12-102-2/+2
| | | | | | | | | | | | | | | | | | | Currently, we have not solved the account mapping story entirely (we don't have a way to support more than one account to gluster volume in the mapping). As such, do not declare this as the final version. Also update the default RHS 2.0 spec file to "-3" for the release number to refer to the fact that we now have a working account mapping (see http://review.gluster.org/4222). Change-Id: Ia1cd0d18c1d7a7b20f732cc0ff867fecda30a7af BUG: 870589 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4283 Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com>
* Fix xdr_to_generic success checkKaushal M2012-12-0913-201/+287
| | | | | | | | | | | | | | | | This patch fixes the success check for xdr_to_generic function across the codebase. Also, cleans up the brick_op actors table in glusterfsd-mgmt.c to make sure that the actors are called directly by rpcsvc. Change-Id: I3086585f30c44f69f1bc83665f89e30025f76d3a BUG: 884452 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4278 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpcsvc: do a 'iobuf_ref()' on buffer while synctaskizing actorKaushal M2012-12-093-13/+70
| | | | | | | | | | | | | | | | | | Starting rpc actors using synctask causes rpcsvc to return before the actor actually finishes its actions. This would cause the buffer to be unreffed by socket and be possibly reused, before the actor used it, leading to failures in the actor. This patch makes rpcsvc take a ref on the buffer when synctaskizing the actor and store it in the request structure, and then later unref it when the request structure is destroyed. This makes sure that the buffer is not reused before the actor has finished. Change-Id: I8f81e1fef8f3719db220471d2d8ffb8916958956 BUG: 884452 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4277 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: cmd history echoes the last command string word twice with --mode=scriptKrutika Dhananjay2012-12-072-0/+40
| | | | | | | | | | | | | | | | | | | | | | | | PROBLEM: When a gluster command is executed with --mode=script option enabled, the last word in the command string is echoed twice in command history. Example: [2012-12-03 05:29:16.083176] : volume start dis dis : SUCCESS FIX: Terminate argv with NULL when the words are shifted after omitting "--mode=script" from it. Change-Id: I3a2623efe02e58c97c34554988938a9299425492 BUG: 823081 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4255 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: add print-logdir optionKrutika Dhananjay2012-12-071-1/+6
| | | | | | | | | | Change-Id: I92fe55d72aa597cbac57a51d2e15b35d2bcfef0e BUG: 823081 Signed-off-by: Krutika Dhananjay <kdhananj@redhat.com> Reviewed-on: http://review.gluster.org/4275 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* object-storage: enforce RPM package dependenciesPeter Portante2012-12-071-18/+10
| | | | | | | | | | | | | We now have access to openstack-swift-* packages that work with these sources so we can enforce the dependencies and what gets obsoleted. Change-Id: I83f442f3eb2424d176a2257f3498ed39eed32251 BUG: 870589 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4223 Reviewed-by: Mohammed Junaid <junaid@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
* object-storage: fix account mappingPeter Portante2012-12-064-10/+8
| | | | | | | | | | | | | | | | | | | | | Fix the account mapping so that we always use what is provided by the request. With this fix, "/mnt/gluster-object/AUTH_ufo0" directory hierachies won't be created. But this fix does not restore the one-to-one account to gluster volume name mapping. When the user runs the /usr/bin/gluster-swift-gen-builders script, it still only allows one cluster volume, and that is the only volume that is used. So the account names are effectively ignored. A future set of changes will address that problem. Change-Id: I2df608de2f00fd356a09c500d49fe12cc1a0a574 BUG: 870589 Signed-off-by: Peter Portante <peter.portante@redhat.com> Reviewed-on: http://review.gluster.org/4222 Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com> Tested-by: Kaleb KEITHLEY <kkeithle@redhat.com> Reviewed-by: Mohammed Junaid <junaid@redhat.com>
* BD backend documentation updateM. Mohan Kumar2012-12-051-0/+130
| | | | | | | | | BUG: 805138 Change-Id: I2b4eb3fb7bad59c5dadf7f22fcc4d2b2a783984a Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Reviewed-on: http://review.gluster.org/4273 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* man page update for BD backend xlatorM. Mohan Kumar2012-12-051-2/+21
| | | | | | | | | BUG: 805138 Change-Id: Ifbceb329ba9039e6617d377c6b7fdb67d2383ddd Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com> Reviewed-on: http://review.gluster.org/4274 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* cluster/afr: Empty string should not be default option valPranith Kumar K2012-12-054-5/+75
| | | | | | | | | | | | Glusterd does not allow empty string as default value. Changed afr option values to disallow empty string as value. Change-Id: I92a2d658907dbc6101e1139dd91f548acb5506f5 BUG: 859927 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4271 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Add util function to kill brickPranith Kumar K2012-12-051-0/+9
| | | | | | | | | Change-Id: Ic67edd7edeaab16461c0009b49d951bfb4d79929 BUG: 859927 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4270 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* protocol/client: log ENOENT errors in debug mode.Raghavendra Bhat2012-12-041-2/+3
| | | | | | | | | Change-Id: I9b4ffb4a2f6be7ff5a0521f6582a9bc6f172e26c BUG: 872490 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4153 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd-hooks: Made hook runtime work with synctask'ized codepath(s)Krishnan Parthasarathi2012-12-042-9/+65
| | | | | | | | | Change-Id: If66799c204483c3486a2b8ca842bb1b5f2e53997 BUG: 877992 Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com> Reviewed-on: http://review.gluster.org/4210 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc: check the ctx->listener before accessing rpcsvc objectRaghavendra Bhat2012-12-042-3/+19
| | | | | | | | | Change-Id: I3c913d1fab07deb41eec05c5adc29a3964315b43 BUG: 858487 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4230 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Revert "glusterd: add "volume label" command"Anand Avati2012-12-0410-410/+7
| | | | | | | | | | | This reverts commit dad16a51ba7e6b1c57529423c57257dbce97ee93 Test script causing "silent" failures during execution. Change-Id: I26dbb8ed22256071cb415cc3aff572ef8372600e Reviewed-on: http://review.gluster.org/4268 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* Revert "glusterd, cli: Task id's for async tasks"Anand Avati2012-12-0420-1608/+329
| | | | | | | | | | | This reverts commit ed15521d4e5af2b52b78fd33711e7562f5273bc6 Strangely, the test scripts are "silently" passing for failures too. Reverting patch for now. Change-Id: I802ec1634c7863dc373cc7dc4a47bd4baa72764e Reviewed-on: http://review.gluster.org/4267 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cluster/afr: mark new entry changelog for create/mknod failuresPranith Kumar K2012-12-045-67/+228
| | | | | | | | | | | | | | | | | | | | | | Problem: When create/mknod fails on some of the nodes, appropriate pending data/metadata changelogs are not assigned. This was not considered to be an issue because entry self-heal would do the assigning of appropriate changelog after creating new entries. But using the combination of rebalance and remove brick we can construct a case where a file with same name and gfid can be created in a dir with different data and link-to xattr without any changelog. Fix: When a create/mknod failure is observed mark the appropriate changelog on the new file created. Change-Id: I4c32cbf5594a13fb14deaf97ff30b2fff11cbfd6 BUG: 858212 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4207 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* tests: Util commands for rebalance and afr child-up, shd upPranith Kumar K2012-12-041-0/+40
| | | | | | | | | Change-Id: I175171524b750dff5b2ec0c11dc006d77123ecd5 BUG: 858212 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4237 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* tests: Test afr mknod, create when one of the bricks is offline.Pranith Kumar K2012-12-041-0/+48
| | | | | | | | | | | Also tests the test case in bug 858212. Change-Id: I00e1c3f6142e9dab6868d8fd9ef66d39a7d3fae2 BUG: 858212 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4238 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* rpc-transport/socket: implement read-ahead of RPC headersAnand Avati2012-12-043-7/+137
| | | | | | | | | | | | | This reduces the number of read() system calls on the socket to complete the full RPC fragment reading. Change-Id: I421a53af195ead4aad70e09e0172a61ad7912d83 BUG: 821087 Signed-off-by: Anand Avati <avati@redhat.com> Reviewed-on: http://review.gluster.org/3855 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Amar Tumballi <amarts@redhat.com>
* afr: use data trylock mode in read/write self-heal trigger pathsBrian Foster2012-12-041-1/+8
| | | | | | | | | | | | | | | | | | | | | | Self-heal data lock contention between clients and glustershd instances can lead to long wait and user response times if the client ends up pending its lock on glustershd self-heal of a large file. We have reports of guest vm instances going completely unresponsive during self-heal of virtual disk images. Optimize the read/write self-heal trigger codepath (i.e., afr_open_fd_fix()) to trylock for self-heal and skip the self-heal otherwise to minimize the likelihood of a running/active guest of competing with glustershd on arrival of a brick. Note that lock contention is still possible from the client (e.g., via lookup). BUG: 874045 Change-Id: I406443c061ff6acd2a851179626b78352caa5c03 Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.org/4258 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* afr: support self-heal data trylock mechanismBrian Foster2012-12-044-8/+15
| | | | | | | | | | | | | | | Introduce a block flag to support an optional blocking or non-blocking mode in the self-heal data locking mechanism. All callers are modified to use blocking mode, which is the current default behavior (no change in behavior is introduced by this commit). BUG: 874045 Change-Id: Ib7ff9984578fa11de4e3b6981508100cdddd37cd Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.org/4257 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd, cli: Task id's for async tasksKaushal M2012-12-0420-329/+1608
| | | | | | | | | | | | | | | | | | | | 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. Change-Id: Ib0c0d12e0d6c8f72ace48d303d7ff3102157e876 BUG: 857330 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/3942 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* storage/posix: if create returns EXIST, donot set gfid/xattrsshishir gowda2012-12-041-0/+4
| | | | | | | | | Change-Id: I9f2b75b10bde428d36d6516aa09c18e590d17ed9 BUG: 864801 Signed-off-by: shishir gowda <sgowda@redhat.com> Reviewed-on: http://review.gluster.org/4265 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* tests/bug-830665: use the default H0Brian Foster2012-12-041-1/+2
| | | | | | | | | | | | | | The use of 'hostname -s' leads to a failure on my VM due to attempting to create the volume on localhost. Use the default H0 value. BUG: 830665 Change-Id: Icf23c89d2387fe747aca6d99af12f7d4e1e3fbf0 Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.org/4266 Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* afr: make flush non-transactionalBrian Foster2012-12-043-139/+38
| | | | | | | | | | | | | | | | | | Flush is historically a transaction to ensure all previous writes were complete. This is no longer required as write-behind has learned to make flush a barrier operation (re: conversation w/ Avati). Flush taking a full file lock causes VMs running on afr volumes to stall when a migration occurs and self-heal is in progress. Make afr_flush() a non-transactional operation. BUG: 874045 Change-Id: If2db83823e280c86b1b29b41361eed7081601632 Signed-off-by: Brian Foster <bfoster@redhat.com> Reviewed-on: http://review.gluster.org/4261 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* glusterd: add "volume label" commandJeff Darcy2012-12-0410-7/+410
| | | | | | | | | | | | | | | | | This command is necessary when the local disk/filesystem containing a brick is unexpectedly lost and then recreated. Since 961bc80c, trying to start the brick will fail because the trusted.glusterfs.volume-id xattr is missing, and if we can't start it then we can't replace-brick or self-heal so we're stuck in a permanently degraded state. This command provides a way to label the empty brick with the proper volume ID so that further repair actions become possible. Change-Id: I1c1e5273a018b7a6b8d0852daf111ddc3fddfdc2 BUG: 860297 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4259 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* dht: support auto-NUFA optionJeff Darcy2012-12-044-10/+154
| | | | | | | | | | | | | | | Many people have asked for behavior like the old NUFA, which builds and seems to run but was previously impossible to enable/configure in a standard way. This change allows NUFA to be enabled instead of DHT from the command line, with automatic selection of the local subvolume on each host. Change-Id: I0065938db3922361fd450a6c1919a4cbbf6f202e BUG: 882278 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4234 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* fix memory leaksRaghavendra Bhat2012-12-043-1/+5
| | | | | | | | | | | | | * write-behind: free the inode context in wb_forget * distribute: in readdirp callback put the allocated context to the inode * distribute: check if the layout is NULL before accessing it in layout_unref Change-Id: I7698f81b85b99d06bf6b01fc1a6e51e1593b5e27 BUG: 790709 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4250 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* geo-rep / gsyncd: play nicely with peer multiplexing when setting a checkpointCsaba Henk2012-12-041-5/+16
| | | | | | | | | | | | | | | | | | | | | | | | The gsyncd invocation that instruments the "geo-rep config" command is multiplexed over peers to ensure the uniformity of configuration. In general, that works well, but checkpoint setting is a special case, because (unlike other instances of config-set) it is logged (as recording of checkpoint events is part of the feature). Problem is that the path components leading to the log file are created only on the original node, where gsyncd was started. Therefore the logging attempt will fail on the other nodes. Fix: ignore if opening the logfile on behalf of checkpoint setting fails with ENOENT. Change-Id: I677f3f081bf4b9e3ba4d25d58979d86931e6beb4 BUG: 881997 Signed-off-by: Csaba Henk <csaba@redhat.com> Reviewed-on: http://review.gluster.org/4248 Reviewed-by: Niels de Vos <ndevos@redhat.com> Tested-by: Christos Triantafyllidis <ctrianta@redhat.com> Reviewed-by: Christos Triantafyllidis <ctrianta@redhat.com> Reviewed-by: Anand Avati <avati@redhat.com>
* libglusterfs: fix unused-but-set-variable warningPranith Kumar K2012-12-041-3/+2
| | | | | | | | | | Change-Id: Ie152169a70eaec9554382b39d43ae7ffa04f041c BUG: 762989 Signed-off-by: Pranith Kumar K <pkarampu@redhat.com> Reviewed-on: http://review.gluster.org/4264 Reviewed-by: Raghavendra Bhat <raghavendra@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* tests: Introduce new test primitive EXPECT_WITHINKaushal M2012-12-041-1/+36
| | | | | | | | | | | | | | Introduces a new test primitive EXPECT_WITHIN with syntax, EXPECT_WITHIN <timeout in seconds> <expected output> <command> which runs the given command every second and compares its output with the expected output, till the timeout occurs. Change-Id: I91c6de157e5d33fffafe532ceba84e2a9223356f BUG: 857330 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/4263 Reviewed-by: Anand Avati <avati@redhat.com> Tested-by: Anand Avati <avati@redhat.com>
* nfs: do opendir for "naked" readdirp to force self-heal checksJeff Darcy2012-12-032-0/+138
| | | | | | | | | | | | | Instead of an opendir, the first thing the Linux NFS client usually sends us is a readdirp at offset zero, effectively bypassing our self-heal checks. Detect this condition and issue our own opendir to compensate. Change-Id: I69463370abd6235d705bf80b8c77fae4a61096ae BUG: 830665 Signed-off-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-on: http://review.gluster.org/4067 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
* cli: fix incorrect xml output of brick tag.JulesWang2012-12-031-5/+0
| | | | | | | | | | | | | | | | | | | | Incorrect output: <brick> <brick> </brick> </brick> Expected output: <brick></brick> <brick></brick> Change-Id: I40c30feda4e6f3f1ec5da4122f8965b61c511ae6 BUG: 880993 Signed-off-by: JulesWang <w.jq0722@gmail.com> Reviewed-on: http://review.gluster.org/4262 Reviewed-by: Kaushal M <kaushal@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: Kaushal M <kaushal@redhat.com>
* socket,rdma: before binding to any port check if it is a reserved portRaghavendra Bhat2012-12-035-24/+214
| | | | | | | | | | | | * The list of ports which are reserved is obtained by reading the file /proc/sys/net/ipv4/ip_local_reserved_ports. Change-Id: I3a832f53efbb79dd719b34a30cbaf28269f25816 BUG: 762989 Signed-off-by: Raghavendra Bhat <raghavendra@redhat.com> Reviewed-on: http://review.gluster.org/4131 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>